diff --git a/.buildkite/scripts/build_kibana.sh b/.buildkite/scripts/build_kibana.sh index e811af224e9af..61a1ba4ee1ce5 100755 --- a/.buildkite/scripts/build_kibana.sh +++ b/.buildkite/scripts/build_kibana.sh @@ -28,6 +28,11 @@ if [[ "${GITHUB_PR_LABELS:-}" == *"ci:deploy-cloud"* ]]; then --skip-docker-ubi \ --skip-docker-centos \ --skip-docker-contexts + + CLOUD_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" docker.elastic.co/kibana-ci/kibana-cloud) + cat << EOF | buildkite-agent annotate --style "info" --context cloud-image + Cloud image: $CLOUD_IMAGE +EOF fi echo "--- Archive Kibana Distribution" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9b8fee1bd5612..a64ab63494b35 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -22,7 +22,6 @@ # Vis Editors /x-pack/plugins/lens/ @elastic/kibana-vis-editors -/src/plugins/advanced_settings/ @elastic/kibana-vis-editors /src/plugins/charts/ @elastic/kibana-vis-editors /src/plugins/vis_default_editor/ @elastic/kibana-vis-editors /src/plugins/vis_types/metric/ @elastic/kibana-vis-editors @@ -34,10 +33,12 @@ /src/plugins/vis_types/vislib/ @elastic/kibana-vis-editors /src/plugins/vis_types/xy/ @elastic/kibana-vis-editors /src/plugins/vis_types/pie/ @elastic/kibana-vis-editors +/src/plugins/vis_types/heatmap/ @elastic/kibana-vis-editors /src/plugins/visualize/ @elastic/kibana-vis-editors /src/plugins/visualizations/ @elastic/kibana-vis-editors /src/plugins/chart_expressions/expression_tagcloud/ @elastic/kibana-vis-editors /src/plugins/chart_expressions/expression_metric/ @elastic/kibana-vis-editors +/src/plugins/chart_expressions/expression_heatmap/ @elastic/kibana-vis-editors /src/plugins/url_forwarding/ @elastic/kibana-vis-editors /packages/kbn-tinymath/ @elastic/kibana-vis-editors /x-pack/test/functional/apps/lens @elastic/kibana-vis-editors @@ -261,6 +262,7 @@ /src/plugins/home/server/*.ts @elastic/kibana-core /src/plugins/home/server/services/ @elastic/kibana-core /src/plugins/kibana_overview/ @elastic/kibana-core +/src/plugins/advanced_settings/ @elastic/kibana-core /x-pack/plugins/global_search_bar/ @elastic/kibana-core #CC# /src/core/server/csp/ @elastic/kibana-core #CC# /src/plugins/saved_objects/ @elastic/kibana-core diff --git a/.i18nrc.json b/.i18nrc.json index 80dbfee949a6c..9485f5b9b84e7 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -28,6 +28,7 @@ "expressionRepeatImage": "src/plugins/expression_repeat_image", "expressionRevealImage": "src/plugins/expression_reveal_image", "expressionShape": "src/plugins/expression_shape", + "expressionHeatmap": "src/plugins/chart_expressions/expression_heatmap", "expressionTagcloud": "src/plugins/chart_expressions/expression_tagcloud", "expressionMetricVis": "src/plugins/chart_expressions/expression_metric", "inputControl": "src/plugins/input_control_vis", @@ -69,6 +70,7 @@ "visTypeVislib": "src/plugins/vis_types/vislib", "visTypeXy": "src/plugins/vis_types/xy", "visTypePie": "src/plugins/vis_types/pie", + "visTypeHeatmap": "src/plugins/vis_types/heatmap", "visualizations": "src/plugins/visualizations", "visualize": "src/plugins/visualize", "apmOss": "src/plugins/apm_oss", diff --git a/dev_docs/contributing/standards.mdx b/dev_docs/contributing/standards.mdx index 172a83935b966..d2f31f3a4faa2 100644 --- a/dev_docs/contributing/standards.mdx +++ b/dev_docs/contributing/standards.mdx @@ -67,6 +67,14 @@ Every public API should have a release tag specified at the top of it’s docume Every team should be collecting telemetry metrics on it’s public API usage. This will be important for knowing when it’s safe to make breaking changes. The Core team will be looking into ways to make this easier and an automatic part of registration (see [#112291](https://github.com/elastic/kibana/issues/112291)). +### APM + +Kibana server and client are instrumented with APM node and APM RUM clients respectively, tracking serveral types of transactions by default, such as `page-load`, `request`, etc. +You may introduce custom transactions. Please refer to the [APM documentation](https://www.elastic.co/guide/en/apm/get-started/current/index.html) and follow these guidelines when doing so: + +- Use dashed syntax for transaction types and names: `my-transaction-type` and `my-transaction-name` +- [Refrain from adding too many custom labels](https://www.elastic.co/guide/en/apm/get-started/current/metadata.html) + ### Documentation Every public API should be documented inside the [docs/api](https://github.com/elastic/kibana/tree/main/docs/api) folder in asciidoc (this content will eventually be migrated to mdx to support the new docs system). If a public REST API is undocumented, you should either document it, or make it internal. diff --git a/dev_docs/key_concepts/building_blocks.mdx b/dev_docs/key_concepts/building_blocks.mdx index da3d0f32780be..6536019f668cf 100644 --- a/dev_docs/key_concepts/building_blocks.mdx +++ b/dev_docs/key_concepts/building_blocks.mdx @@ -72,7 +72,7 @@ Check out are a high-level, space-aware + are a high-level, space-aware abstraction layer that sits above Data Streams and Elasticsearch indices. Index Patterns provide users the ability to define and customize the data they wish to search and filter on, on a per-space basis. For example, users can specify a set of indices, and they can customize the field list with runtime fields, diff --git a/dev_docs/tutorials/data_views.mdx b/dev_docs/tutorials/data_views.mdx index 453146d81c4d7..76c4bff8e51e3 100644 --- a/dev_docs/tutorials/data_views.mdx +++ b/dev_docs/tutorials/data_views.mdx @@ -83,4 +83,4 @@ await data.indexPatterns.delete(dataViewId); ### Data view HTTP API -Rest-like HTTP CRUD+ API - [docs](https://www.elastic.co/guide/en/kibana/master/index-patterns-api.html) +Rest-like HTTP CRUD+ API - [docs](https://www.elastic.co/guide/en/kibana/master/data-views-api.html) diff --git a/dev_docs/tutorials/endpoints.mdx b/dev_docs/tutorials/endpoints.mdx index 1d6fc0edf1e64..5f2fc7da010c7 100644 --- a/dev_docs/tutorials/endpoints.mdx +++ b/dev_docs/tutorials/endpoints.mdx @@ -3,24 +3,105 @@ id: kibDevTutorialServerEndpoint slug: /kibana-dev-docs/tutorials/registering-endpoints title: Registering and accessing an endpoint summary: Learn how to register a new endpoint and access it -date: 2021-10-05 +date: 2021-11-24 tags: ['kibana', 'dev', 'architecture', 'tutorials'] --- -## Registering an endpoint +## The HTTP service API + +### The server-side HTTP service The server-side `HttpService` allows server-side plugins to register endpoints with built-in support for request validation. These endpoints may be used by client-side code or be exposed as a public API for users. Most plugins integrate directly with this service. The service allows plugins to: -- to extend the Kibana server with custom HTTP API. -- to execute custom logic on an incoming request or server response. -- to implement custom authentication and authorization strategy. +- extend the Kibana server with custom HTTP API. +- execute custom logic on an incoming request or server response. +- implement custom authentication and authorization strategy. See [the server-side HTTP service API docs](https://github.com/elastic/kibana/blob/main/docs/development/core/server/kibana-plugin-core-server.httpservicesetup.md) -**Registering a basic GET endpoint** +### The client-side HTTP service + +The client-side counterpart of the HTTP service provides an API to communicate with the Kibana server via HTTP interface. +The client-side `HttpService` is a preconfigured wrapper around `window.fetch` that includes some default behavior and automatically handles common errors (such as session expiration). + +**The service should only be used for access to backend endpoints registered by the same plugin.** Feel free to use another HTTP client library to request 3rd party services. + + + See [the client-side HTTP service API docs](https://github.com/elastic/kibana/blob/main/docs/development/core/public/kibana-plugin-core-public.httpsetup.md) + + +## Registering an endpoint + +Registering an endpoint, or `route`, is done during the `setup` lifecycle stage of a plugin. The first step to register a route +is to create a [router](https://github.com/elastic/kibana/blob/main/docs/development/core/server/kibana-plugin-core-server.irouter.md) +using the `http` core service. + +Once the router is instantiated, it is possible to use its APIs, such as `router.get` or `router.post` to create a route for the equivalent +HTTP method. All these APIs share the same signature, and receive two parameters: +- `route` - the route configuration, such as the `path` of the route, or the parameter validation schemas +- `handler` - the handler function that will be called when a request matching the route configuration is received + +When invoked, the `handler` receive three parameters: `context`, `request`, and `response`, and must return a response that will be sent to serve +the request. +- `context` is a request-bound context exposed for the request. It allows for example to use an elasticsearch client bound to the request's credentials. +- `request` contains information related to the request, such as the path and query parameter +- `response` contains factory helpers to create the response to return from the endpoint + + + See the [request](https://github.com/elastic/kibana/blob/main/docs/development/core/server/kibana-plugin-core-server.kibanarequest.md) + and [response](https://github.com/elastic/kibana/blob/main/docs/development/core/server/kibana-plugin-core-server.kibanaresponsefactory.md) + documentation + + +## Basic examples + +### Registering a GET endpoint + +The following snippet demonstrate how to create a basic `GET` endpoint on the `/api/my_plugin/get_object` path: + +```ts +import type { CoreSetup, Plugin } from 'kibana/server'; + +export class MyPlugin implements Plugin { + public setup(core: CoreSetup) { + const router = core.http.createRouter(); + router.get( + { + path: '/api/my_plugin/get_object', + validate: false, + }, + async (context, request, response) => { + return response.ok({ + body: { result: 'everything is alright'}, + }); + } + ); + } +} +``` + +consuming the endpoint from the client-side using core's `http` service would then look like: + +```ts +import { HttpStart } from 'kibana/public'; + +interface ResponseType { + result: string; +}; + +async function fetchData(http: HttpStart) { + return await http.get(`/api/my_plugin/get_object`); +} +``` + +### Using and validating path parameters + +It is possible to specify dynamic parameters in the `path` of the endpoint using the `{name}` syntax. +When doing so, the associated validation schema must be defined via the `validate.params` option +of the route definition. ```ts import { schema } from '@kbn/config-schema'; @@ -29,59 +110,329 @@ import type { CoreSetup, Plugin } from 'kibana/server'; export class MyPlugin implements Plugin { public setup(core: CoreSetup) { const router = core.http.createRouter(); - - const validate = { - params: schema.object({ - id: schema.string(), - }), - }; - - router.get({ - path: '/api/my_plugin/{id}', - validate - }, - async (context, request, response) => { - const data = await findObject(request.params.id); - if (!data) return response.notFound(); - return response.ok({ - body: data, - headers: { - 'content-type': 'application/json' + router.get( + { + path: '/api/my_plugin/get_object/{id}', + validate: { + params: schema.object({ + id: schema.string(), + }) + }, + }, + async (context, request, response) => { + const { id } = request.params; + const data = await findObject(id); + if (!data) { + return response.notFound(); } - }); - }); + return response.ok({ body: data }); + } + ); } } ``` - - See [the routing example plugin](https://github.com/elastic/kibana/blob/main/examples/routing_example) for more route registration examples. - +consuming the endpoint from the client-side using core's `http` service would then look like: + +```ts +import { HttpStart } from 'kibana/public'; +import { MyObjectType } from '../common/types'; -## Consuming the endpoint from the client-side +async function fetchData(http: HttpStart, id: string) { + return await http.get(`/api/my_plugin/get_object/${id}`); +} +``` -The client-side HTTP service provides an API to communicate with the Kibana server via HTTP interface. -The client-side `HttpService` is a preconfigured wrapper around `window.fetch` that includes some default behavior and automatically handles common errors (such as session expiration). +### Registering a POST endpoint and validating the payload -**The service should only be used for access to backend endpoints registered by the same plugin.** Feel free to use another HTTP client library to request 3rd party services. +Similar to the validation we performed against the path parameters in the previous example, the `body` validation schema +must be provided when registering a `post` handler that will access the payload. + +```ts +import { schema } from '@kbn/config-schema'; +import type { CoreSetup, Plugin } from 'kibana/server'; + +export class MyPlugin implements Plugin { + public setup(core: CoreSetup) { + const router = core.http.createRouter(); + router.post( + { + path: '/api/my_plugin/objects/{id}/update', + validate: { + params: schema.object({ + id: schema.string(), + }), + body: schema.object({ + title: schema.string(), + description: schema.string() + }), + }, + }, + async (context, request, response) => { + const { id } = request.params; + const { title, description } = request.body; + await updateObject(id, { title, description }); + return response.ok({ body: { updated: true }}); + } + ); + } +} +``` + +consuming the endpoint from the client-side using core's `http` service would then look like: ```ts import { HttpStart } from 'kibana/public'; -interface ResponseType {…}; +interface ResponseType { + updated: boolean; +}; -async function fetchData(http: HttpStart, id: string) { - return await http.get( - `/api/my_plugin/${id}`, - { query: … }, - ); +interface UpdateOptions { + title?: string; + description?: string; +} + +async function fetchData(http: HttpStart, id: string, { title, description }: UpdateOptions) { + return await http.post(`/api/my_plugin/objects/${id}/update`, { + body: JSON.stringify({ title, description }) + }); } ``` - - See [the client-side HTTP service API docs](https://github.com/elastic/kibana/blob/main/docs/development/core/public/kibana-plugin-core-public.httpsetup.md) - +### Using the query parameters + +Similar to the `body` validation, the query parameters schema has to be defined using the `validate.query` +option of the route definition to be accessible from the handler. + +```ts +import { schema } from '@kbn/config-schema'; +import type { CoreSetup, Plugin } from 'kibana/server'; + +export class MyPlugin implements Plugin { + public setup(core: CoreSetup) { + const router = core.http.createRouter(); + router.get( + { + path: '/api/my_plugin/objects/find', + validate: { + query: schema.object({ + term: schema.maybe(schema.string()), + page: schema.number({ min: 1, defaultValue: 1 }), + perPage: schema.number({ min: 5, max: 50, defaultValue: 10 }), + }), + }, + }, + async (context, request, response) => { + const { term, page, perPage } = request.query; + const results = await findObjects(term, { page, perPage }); + return response.ok({ body: { results } }); + } + ); + } +} +``` + +consuming the endpoint from the client-side using core's `http` service would then look like: + +```ts +import { HttpStart } from 'kibana/public'; +import { MyObjectType } from '../common/types'; + +interface ResponseType { + results: MyObjectType[]; +}; + +interface UpdateOptions { + term?: string; + page?: number; + perPage?: number; +} + +async function fetchData(http: HttpStart, { term, page, perPage }: UpdateOptions) { + return await http.get(`/api/my_plugin/objects/find`, { + query: { term, page, perPage }, + }); +} +``` + +## Customizing the response + +### Attaching headers to the response + +All APIs of the `response` parameter of the handler accept a `headers` property that can be used +to define headers to attach to the response. + +```ts +import type { CoreSetup, Plugin } from 'kibana/server'; + +export class MyPlugin implements Plugin { + public setup(core: CoreSetup) { + const router = core.http.createRouter(); + router.get( + { + path: '/api/my_plugin/some_text_response', + validate: false, + }, + async (context, request, response) => { + return response.ok({ + body: 'some plain text response', + headers: { + 'content-type': 'text/plain', + 'cache-control': 'must-revalidate', + }, + }); + } + ); + } +} +``` + +### Defining a specific HTTP status code for the response + +The `response` parameter of the handler already provides APIs for the most common HTTP response codes, such as +- `response.ok` for `200` +- `response.notFound` for `404` +- `response.badRequest` for `400` +- and so on + +However, some of the less commonly used return codes don't have such helpers. In that case, the `response.custom` +and/or `response.customError` APIs should be used. + +```ts +import type { CoreSetup, Plugin } from 'kibana/server'; + +export class MyPlugin implements Plugin { + public setup(core: CoreSetup) { + const router = core.http.createRouter(); + router.get( + { + path: '/api/my_plugin/some_text_response', + validate: false, + }, + async (context, request, response) => { + return response.custom({ + body: `Kibana is a teapot`, + statusCode: 418, + }); + } + ); + } +} +``` + +## Some advanced usages + +### Handling request cancellation + +Some request lifecycle events are exposed to the handler via `request.events` in the form of `rxjs` +observables, such as `request.events.aborted$` that emits if/when the request is canceled by the client. + +These observables can either be used directly, or be used to control an `AbortController`. + +```ts +import { schema } from '@kbn/config-schema'; +import type { CoreSetup, Plugin } from 'kibana/server'; + +export class MyPlugin implements Plugin { + public setup(core: CoreSetup) { + const router = core.http.createRouter(); + router.get( + { + path: '/api/my_plugin/objects/find', + validate: { + query: schema.object({ + term: schema.maybe(schema.string()), + }), + }, + }, + async (context, request, response) => { + const { term } = request.query; + const { aborted$ } = request.events; + + const abortController = new AbortController(); + aborted$.subscribe(() => { + abortController.abort(); + }); + + const results = await findObjects(term, { abortController }); + return response.ok({ body: results }); + } + ); + } +} +``` + +### Disabling authentication for an endpoint + +By default, when security is enabled, endpoints require the user to be authenticated to be accessed, +and will return a `401 - Unauthorized` otherwise. + +It is possible to disable this requirement using the `authRequired` option of the route. + +```ts +import type { CoreSetup, Plugin } from 'kibana/server'; + +export class MyPlugin implements Plugin { + public setup(core: CoreSetup) { + const router = core.http.createRouter(); + router.get( + { + path: '/api/my_plugin/get_object', + validate: false, + options: { + authRequired: false, + }, + }, + async (context, request, response) => { + return response.ok({ + body: { authenticated: request.auth.isAuthenticated }, + }); + } + ); + } +} +``` + +Note that in addition to `true` and `false`, `authRequired` accepts a third value, `'optional'`. When used, +Kibana will try to authenticate the user but will allow access to the endpoint regardless of the result. In that +case, the developer needs to manually checks if the user is authenticated via `request.auth.isAuthenticated`. + +### Accessing the url or route configuration from the handler + +In some advanced use cases, such as generic handlers being used for multiple routes, it can be useful to know, +from within the handler, the route configuration and the actual url that was requested by the user. This can +be achieved by using the `url` and `route` properties of the `request` parameter of the handler. + +request.url / request.route + +```ts +import type { CoreSetup, Plugin } from 'kibana/server'; + +export class MyPlugin implements Plugin { + public setup(core: CoreSetup) { + const router = core.http.createRouter(); + router.get( + { + path: '/api/my_plugin/get_object', + validate: false, + options: { + authRequired: false, + }, + }, + async (context, request, response) => { + const { url, route } = request; + return response.ok({ + body: `You requested ${route.method} ${url}`, + }); + } + ); + } +} +``` + +## More examples - See [the routing example plugin](https://github.com/elastic/kibana/blob/main/examples/routing_example) for more endpoint consumption examples. + See [the routing example plugin](https://github.com/elastic/kibana/blob/main/examples/routing_example) for more route registration examples. diff --git a/docs/api/alerting.asciidoc b/docs/api/alerting.asciidoc index ad2d358d17ba0..931165ce5f485 100644 --- a/docs/api/alerting.asciidoc +++ b/docs/api/alerting.asciidoc @@ -1,7 +1,7 @@ [[alerting-apis]] == Alerting APIs -The following APIs are available for {kib} alerting. +The following APIs are available for Alerting. * <> to create a rule diff --git a/docs/api/alerting/list_rule_types.asciidoc b/docs/api/alerting/list_rule_types.asciidoc index 21ace9f3105c0..e7b433064eec9 100644 --- a/docs/api/alerting/list_rule_types.asciidoc +++ b/docs/api/alerting/list_rule_types.asciidoc @@ -4,7 +4,7 @@ List rule types ++++ -Retrieve a list of alerting rule types that the user is authorized to access. +Retrieve a list of rule types that the user is authorized to access. Each rule type includes a list of consumer features. Within these features, users are authorized to perform either `read` or `all` operations on rules of that type. This helps determine which rule types users can read, but not create or modify. diff --git a/docs/api/dashboard-api.asciidoc b/docs/api/dashboard-api.asciidoc index e6f54dd9156ec..e8d0a829d178d 100644 --- a/docs/api/dashboard-api.asciidoc +++ b/docs/api/dashboard-api.asciidoc @@ -4,7 +4,7 @@ deprecated::[7.15.0,Both of these APIs have been deprecated in favor of <> and <>.] Import and export dashboards with the corresponding saved objects, such as visualizations, saved -searches, and index patterns. +searches, and data views. WARNING: Do not write documents directly to the `.kibana` index. When you write directly to the `.kibana` index, the data becomes corrupted and permanently breaks future {kib} versions. diff --git a/docs/api/data-views.asciidoc b/docs/api/data-views.asciidoc new file mode 100644 index 0000000000000..d7380cbd97c99 --- /dev/null +++ b/docs/api/data-views.asciidoc @@ -0,0 +1,42 @@ +[[data-views-api]] +== Data views API + +experimental[] Manage data views, formerly known as {kib} index patterns. + +WARNING: Do not write documents directly to the `.kibana` index. When you write directly +to the `.kibana` index, the data becomes corrupted and permanently breaks future {kib} versions. + +WARNING: Use the data views APIs for managing data views instead of lower-level <>. + +The following data views APIs are available: + +* Data views + ** <> to retrieve a single data view + ** <> to create data view + ** <> to partially updated data view + ** <> to delete a data view +* Default data views + ** <> to retrieve a default data view + ** <> to set a default data view +* Fields + ** <> to change field metadata, such as `count`, `customLabel` and `format` +* Runtime fields + ** <> to retrieve a runtime field + ** <> to create a runtime field + ** <> to create or update a runtime field + ** <> to partially update an existing runtime field + ** <> to delete a runtime field + +include::data-views/get.asciidoc[] +include::data-views/create.asciidoc[] +include::data-views/update.asciidoc[] +include::data-views/delete.asciidoc[] +include::data-views/default-get.asciidoc[] +include::data-views/default-set.asciidoc[] +include::data-views/update-fields.asciidoc[] +include::data-views/runtime-fields/get.asciidoc[] +include::data-views/runtime-fields/create.asciidoc[] +include::data-views/runtime-fields/upsert.asciidoc[] +include::data-views/runtime-fields/update.asciidoc[] +include::data-views/runtime-fields/delete.asciidoc[] + diff --git a/docs/api/index-patterns/create.asciidoc b/docs/api/data-views/create.asciidoc similarity index 64% rename from docs/api/index-patterns/create.asciidoc rename to docs/api/data-views/create.asciidoc index 521e25931ad49..c1666589b7e2b 100644 --- a/docs/api/index-patterns/create.asciidoc +++ b/docs/api/data-views/create.asciidoc @@ -1,45 +1,45 @@ -[[index-patterns-api-create]] -=== Create index pattern API +[[data-views-api-create]] +=== Create data view API ++++ -Create index pattern +Create data view ++++ -experimental[] Create {kib} index patterns. +experimental[] Create data views. -[[index-patterns-api-create-request]] +[[data-views-api-create-request]] ==== Request `POST :/api/index_patterns/index_pattern` `POST :/s//api/index_patterns/index_pattern` -[[index-patterns-api-create-path-params]] +[[data-views-api-create-path-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. -[[index-patterns-api-create-body-params]] +[[data-views-api-create-body-params]] ==== Request body -`override`:: (Optional, boolean) Overrides an existing index pattern if an -index pattern with the provided title already exists. The default is `false`. +`override`:: (Optional, boolean) Overrides an existing data view if a +data view with the provided title already exists. The default is `false`. -`refresh_fields`:: (Optional, boolean) Reloads index pattern fields after -the index pattern is stored. The default is `false`. +`refresh_fields`:: (Optional, boolean) Reloads data view fields after +the data view is stored. The default is `false`. -`index_pattern`:: (Required, object) The index pattern object. All fields are optional. +`index_pattern`:: (Required, object) The data view object. All fields are optional. -[[index-patterns-api-create-request-codes]] +[[data-views-api-create-request-codes]] ==== Response code `200`:: Indicates a successful call. -[[index-patterns-api-create-example]] +[[data-views-api-create-example]] ==== Examples -Create an index pattern with a custom title: +Create a data view with a custom title: [source,sh] -------------------------------------------------- @@ -67,7 +67,7 @@ $ curl -X POST api/index_patterns/index_pattern -------------------------------------------------- // KIBANA -At creation, all index pattern fields are optional: +At creation, all data view fields are optional: [source,sh] -------------------------------------------------- @@ -92,7 +92,7 @@ $ curl -X POST api/index_patterns/index_pattern // KIBANA -The API returns the index pattern object: +The API returns the data view object: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns/default-get.asciidoc b/docs/api/data-views/default-get.asciidoc similarity index 59% rename from docs/api/index-patterns/default-get.asciidoc rename to docs/api/data-views/default-get.asciidoc index 5c7e8e01ce399..300a0612b18ea 100644 --- a/docs/api/index-patterns/default-get.asciidoc +++ b/docs/api/data-views/default-get.asciidoc @@ -1,34 +1,34 @@ -[[index-patterns-api-default-get]] -=== Get default index pattern API +[[data-views-api-default-get]] +=== Get default data view API ++++ -Get default index pattern +Get default data view ++++ -experimental[] Retrieve a default index pattern ID. Kibana UI uses default index pattern unless user picks a different one. +experimental[] Retrieve a default data view ID. Kibana UI uses the default data view unless user picks a different one. -[[index-patterns-api-default-get-request]] +[[data-views-api-default-get-request]] ==== Request `GET :/api/index_patterns/default` `GET :/s//api/index_patterns/default` -[[index-patterns-api-default-get-params]] +[[data-views-api-default-get-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. -[[index-patterns-api-default-get-codes]] +[[data-views-api-default-get-codes]] ==== Response code `200`:: Indicates a successful call. -[[index-patterns-api-default-get-example]] +[[data-views-api-default-get-example]] ==== Example -Retrieve the default index pattern id: +Retrieve the default data view id: [source,sh] -------------------------------------------------- @@ -36,7 +36,7 @@ $ curl -X GET api/index_patterns/default -------------------------------------------------- // KIBANA -The API returns an ID of a default index pattern: +The API returns an ID of a default data view: [source,sh] -------------------------------------------------- @@ -45,7 +45,7 @@ The API returns an ID of a default index pattern: } -------------------------------------------------- -In case there is no default index pattern, the API returns: +In case there is no default data view, the API returns: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns/default-set.asciidoc b/docs/api/data-views/default-set.asciidoc similarity index 64% rename from docs/api/index-patterns/default-set.asciidoc rename to docs/api/data-views/default-set.asciidoc index 3b3cec6be6324..752054cfb1748 100644 --- a/docs/api/index-patterns/default-set.asciidoc +++ b/docs/api/data-views/default-set.asciidoc @@ -1,43 +1,43 @@ -[[index-patterns-api-default-set]] -=== Set default index pattern API +[[data-views-api-default-set]] +=== Set default data view API ++++ -Set default index pattern +Set default data view ++++ -experimental[] Set a default index pattern ID. Kibana UI will use default index pattern unless user picks a different one. +experimental[] Set a default data view ID. Kibana UI will use the default data view unless user picks a different one. The API doesn't validate if given `index_pattern_id` is a valid id. -[[index-patterns-api-default-set-request]] +[[data-views-api-default-set-request]] ==== Request `POST :/api/index_patterns/default` `POST :/s//api/index_patterns/default` -[[index-patterns-api-default-set-params]] +[[data-views-api-default-set-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. -[[index-patterns-api-default-set-body]] +[[data-views-api-default-set-body]] ==== Request body -`index_pattern_id`:: (Required, `string` or `null`) Sets a default index pattern id. Use `null` to unset a default index pattern. +`index_pattern_id`:: (Required, `string` or `null`) Sets a default data view id. Use `null` to unset a default data view. -`force`:: (Optional, boolean) Updates existing default index pattern id. The default is `false`. +`force`:: (Optional, boolean) Updates existing default data view id. The default is `false`. -[[index-patterns-api-default-set-codes]] +[[data-views-api-default-set-codes]] ==== Response code `200`:: Indicates a successful call. -[[index-patterns-api-default-set-example]] +[[data-views-api-default-set-example]] ==== Example -Set the default index pattern id if none is set: +Set the default data view id if none is set: [source,sh] -------------------------------------------------- @@ -49,7 +49,7 @@ $ curl -X POST api/index_patterns/default // KIBANA -Upsert the default index pattern: +Upsert the default data view: [source,sh] -------------------------------------------------- @@ -61,7 +61,7 @@ $ curl -X POST api/index_patterns/default -------------------------------------------------- // KIBANA -Unset the default index pattern: +Unset the default data view: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns/delete.asciidoc b/docs/api/data-views/delete.asciidoc similarity index 51% rename from docs/api/index-patterns/delete.asciidoc rename to docs/api/data-views/delete.asciidoc index a25f2f13e0b41..9bc63c89365e7 100644 --- a/docs/api/index-patterns/delete.asciidoc +++ b/docs/api/data-views/delete.asciidoc @@ -1,38 +1,38 @@ -[[index-patterns-api-delete]] -=== Delete index pattern API +[[data-views-api-delete]] +=== Delete data view API ++++ -Delete index pattern +Delete data view ++++ -experimental[] Delete {kib} index patterns. +experimental[] Delete data views. -WARNING: Once you delete an index pattern, _it cannot be recovered_. +WARNING: Once you delete a data view, _it cannot be recovered_. -[[index-patterns-api-delete-request]] +[[data-views-api-delete-request]] ==== Request `DELETE :/api/index_patterns/index_pattern/` `DELETE :/s//api/index_patterns/index_pattern/` -[[index-patterns-api-delete-path-params]] +[[data-views-api-delete-path-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. `id`:: - (Required, string) The ID of the index pattern you want to delete. + (Required, string) The ID of the data view you want to delete. -[[index-patterns-api-delete-response-codes]] +[[data-views-api-delete-response-codes]] ==== Response code `200`:: - Indicates that index pattern is deleted. Returns an empty response body. + Indicates that data view is deleted. Returns an empty response body. ==== Example -Delete an index pattern object with the `my-pattern` ID: +Delete a data view object with the `my-pattern` ID: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns/get.asciidoc b/docs/api/data-views/get.asciidoc similarity index 67% rename from docs/api/index-patterns/get.asciidoc rename to docs/api/data-views/get.asciidoc index 64588e63f62ae..0584dfeae1cd5 100644 --- a/docs/api/index-patterns/get.asciidoc +++ b/docs/api/data-views/get.asciidoc @@ -1,40 +1,40 @@ -[[index-patterns-api-get]] -=== Get index pattern API +[[data-views-api-get]] +=== Get data view API ++++ -Get index pattern +Get data view ++++ -experimental[] Retrieve a single {kib} index pattern by ID. +experimental[] Retrieve a single data view by ID. -[[index-patterns-api-get-request]] +[[data-views-api-get-request]] ==== Request `GET :/api/index_patterns/index_pattern/` `GET :/s//api/index_patterns/index_pattern/` -[[index-patterns-api-get-params]] +[[data-views-api-get-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. `id`:: -(Required, string) The ID of the index pattern you want to retrieve. +(Required, string) The ID of the data view you want to retrieve. -[[index-patterns-api-get-codes]] +[[data-views-api-get-codes]] ==== Response code `200`:: Indicates a successful call. `404`:: -The specified index pattern and ID doesn't exist. +The specified data view and ID doesn't exist. -[[index-patterns-api-get-example]] +[[data-views-api-get-example]] ==== Example -Retrieve the index pattern object with the `my-pattern` ID: +Retrieve the data view object with the `my-pattern` ID: [source,sh] -------------------------------------------------- @@ -42,7 +42,7 @@ $ curl -X GET api/index_patterns/index_pattern/my-pattern -------------------------------------------------- // KIBANA -The API returns an index pattern object: +The API returns a data view object: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/create.asciidoc b/docs/api/data-views/runtime-fields/create.asciidoc similarity index 74% rename from docs/api/index-patterns/runtime-fields/create.asciidoc rename to docs/api/data-views/runtime-fields/create.asciidoc index b0773c29e5309..442bede9cba7a 100644 --- a/docs/api/index-patterns/runtime-fields/create.asciidoc +++ b/docs/api/data-views/runtime-fields/create.asciidoc @@ -1,4 +1,4 @@ -[[index-patterns-runtime-field-api-create]] +[[data-views-runtime-field-api-create]] === Create runtime field API ++++ Create runtime field @@ -6,23 +6,23 @@ experimental[] Create a runtime field -[[index-patterns-runtime-field-create-request]] +[[data-views-runtime-field-create-request]] ==== Request `POST :/api/index_patterns/index_pattern//runtime_field` `POST :/s//api/index_patterns/index_pattern//runtime_field` -[[index-patterns-runtime-field-create-params]] +[[data-views-runtime-field-create-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. `index_pattern_id`:: -(Required, string) The ID of the index pattern. +(Required, string) The ID of the data view. -[[index-patterns-runtime-field-create-body]] +[[data-views-runtime-field-create-body]] ==== Request body `name`:: (Required, string) The name for a runtime field. @@ -30,10 +30,10 @@ experimental[] Create a runtime field `runtimeField`:: (Required, object) The runtime field definition object. -[[index-patterns-runtime-field-create-example]] +[[data-views-runtime-field-create-example]] ==== Examples -Create a runtime field on an index pattern: +Create a runtime field on a data view: [source,sh] -------------------------------------------------- @@ -50,7 +50,7 @@ $ curl -X POST api/index_patterns/index_pattern//runtime_field -------------------------------------------------- // KIBANA -The API returns created runtime field object and update index pattern object: +The API returns created runtime field object and updated data view object: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/delete.asciidoc b/docs/api/data-views/runtime-fields/delete.asciidoc similarity index 70% rename from docs/api/index-patterns/runtime-fields/delete.asciidoc rename to docs/api/data-views/runtime-fields/delete.asciidoc index 840789fe1ec23..b2a8e9f310477 100644 --- a/docs/api/index-patterns/runtime-fields/delete.asciidoc +++ b/docs/api/data-views/runtime-fields/delete.asciidoc @@ -1,26 +1,26 @@ -[[index-patterns-runtime-field-api-delete]] +[[data-views-runtime-field-api-delete]] === Delete runtime field API ++++ Delete runtime field ++++ -experimental[] Delete a runtime field from an index pattern. +experimental[] Delete a runtime field from a data view. -[[index-patterns-runtime-field-api-delete-request]] +[[data-views-runtime-field-api-delete-request]] ==== Request `DELETE :/api/index_patterns/index_pattern//runtime_field/` `DELETE :/s//api/index_patterns/index_pattern//runtime_field/` -[[index-patterns-runtime-field-api-delete-path-params]] +[[data-views-runtime-field-api-delete-path-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. `index_pattern_id`:: -(Required, string) The ID of the index pattern your want to delete a runtime field from. +(Required, string) The ID of the data view your want to delete a runtime field from. `name`:: (Required, string) The name of the runtime field you want to delete. @@ -28,7 +28,7 @@ experimental[] Delete a runtime field from an index pattern. ==== Example -Delete a runtime field from an index pattern: +Delete a runtime field from a data view: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/get.asciidoc b/docs/api/data-views/runtime-fields/get.asciidoc similarity index 78% rename from docs/api/index-patterns/runtime-fields/get.asciidoc rename to docs/api/data-views/runtime-fields/get.asciidoc index 42bd209c708bc..66530ae5f3f3f 100644 --- a/docs/api/index-patterns/runtime-fields/get.asciidoc +++ b/docs/api/data-views/runtime-fields/get.asciidoc @@ -1,4 +1,4 @@ -[[index-patterns-runtime-field-api-get]] +[[data-views-runtime-field-api-get]] === Get runtime field API ++++ Get runtime field @@ -6,30 +6,30 @@ experimental[] Get a runtime field -[[index-patterns-runtime-field-get-request]] +[[data-views-runtime-field-get-request]] ==== Request `GET :/api/index_patterns/index_pattern//runtime_field/` `GET :/s//api/index_patterns/index_pattern//runtime_field/` -[[index-patterns-runtime-field-get-params]] +[[data-views-runtime-field-get-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. `index_pattern_id`:: -(Required, string) The ID of the index pattern. +(Required, string) The ID of the data view. `name`:: (Required, string) The name of the runtime field you want to retrieve. -[[index-patterns-runtime-field-get-example]] +[[data-views-runtime-field-get-example]] ==== Example -Retrieve a runtime field named `foo` of index pattern with the `my-pattern` ID: +Retrieve a runtime field named `foo` of data view with the `my-pattern` ID: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/update.asciidoc b/docs/api/data-views/runtime-fields/update.asciidoc similarity index 75% rename from docs/api/index-patterns/runtime-fields/update.asciidoc rename to docs/api/data-views/runtime-fields/update.asciidoc index f34460896f7bc..970826560f4a8 100644 --- a/docs/api/index-patterns/runtime-fields/update.asciidoc +++ b/docs/api/data-views/runtime-fields/update.asciidoc @@ -1,4 +1,4 @@ -[[index-patterns-runtime-field-api-update]] +[[data-views-runtime-field-api-update]] === Update runtime field API ++++ Update runtime field @@ -6,26 +6,26 @@ experimental[] Update an existing runtime field -[[index-patterns-runtime-field-update-request]] +[[data-views-runtime-field-update-request]] ==== Request `POST :/api/index_patterns/index_pattern//runtime_field/` `POST :/s//api/index_patterns/index_pattern//runtime_field/` -[[index-patterns-runtime-field-update-params]] +[[data-views-runtime-field-update-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. `index_pattern_id`:: -(Required, string) The ID of the index pattern. +(Required, string) The ID of the data view. `name`:: (Required, string) The name of the runtime field you want to update. -[[index-patterns-runtime-field-update-body]] +[[data-views-runtime-field-update-body]] ==== Request body `runtimeField`:: (Required, object) The runtime field definition object. @@ -37,10 +37,10 @@ You can update following fields: -[[index-patterns-runtime-field-update-example]] +[[data-views-runtime-field-update-example]] ==== Examples -Update an existing runtime field on an index pattern: +Update an existing runtime field on a data view: [source,sh] -------------------------------------------------- @@ -55,7 +55,7 @@ $ curl -X POST api/index_patterns/index_pattern//runtime_field -------------------------------------------------- // KIBANA -The API returns updated runtime field object and updated index pattern object: +The API returns updated runtime field object and updated data view object: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/upsert.asciidoc b/docs/api/data-views/runtime-fields/upsert.asciidoc similarity index 78% rename from docs/api/index-patterns/runtime-fields/upsert.asciidoc rename to docs/api/data-views/runtime-fields/upsert.asciidoc index 1b436db19c62e..427aa30afa94a 100644 --- a/docs/api/index-patterns/runtime-fields/upsert.asciidoc +++ b/docs/api/data-views/runtime-fields/upsert.asciidoc @@ -1,4 +1,4 @@ -[[index-patterns-runtime-field-api-upsert]] +[[data-views-runtime-field-api-upsert]] === Upsert runtime field API ++++ Upsert runtime field @@ -6,23 +6,23 @@ experimental[] Create or update an existing runtime field -[[index-patterns-runtime-field-upsert-request]] +[[data-views-runtime-field-upsert-request]] ==== Request `PUT :/api/index_patterns/index_pattern//runtime_field` `PUT :/s//api/index_patterns/index_pattern//runtime_field` -[[index-patterns-runtime-field-upsert-params]] +[[data-views-runtime-field-upsert-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. `index_pattern_id`:: -(Required, string) The ID of the index pattern. +(Required, string) The ID of the data view. -[[index-patterns-runtime-field-upsert-body]] +[[data-views-runtime-field-upsert-body]] ==== Request body `name`:: (Required, string) The name for a new runtime field or a name of an existing runtime field. @@ -30,10 +30,10 @@ experimental[] Create or update an existing runtime field `runtimeField`:: (Required, object) The runtime field definition object. -[[index-patterns-runtime-field-upsert-example]] +[[data-views-runtime-field-upsert-example]] ==== Examples -Create or update an existing runtime field on an index pattern: +Create or update an existing runtime field on a data view: [source,sh] -------------------------------------------------- @@ -50,7 +50,7 @@ $ curl -X PUT api/index_patterns/index_pattern//runtime_field -------------------------------------------------- // KIBANA -The API returns created or updated runtime field object and updated index pattern object: +The API returns created or updated runtime field object and updated data view object: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns/update-fields.asciidoc b/docs/api/data-views/update-fields.asciidoc similarity index 79% rename from docs/api/index-patterns/update-fields.asciidoc rename to docs/api/data-views/update-fields.asciidoc index e3f98631bb52a..929dee27b9da1 100644 --- a/docs/api/index-patterns/update-fields.asciidoc +++ b/docs/api/data-views/update-fields.asciidoc @@ -1,43 +1,43 @@ -[[index-patterns-fields-api-update]] -=== Update index pattern fields API +[[data-views-fields-api-update]] +=== Update data view fields API ++++ -Update index pattern fields metadata +Update data view fields metadata ++++ experimental[] Update fields presentation metadata, such as `count`, `customLabel`, and `format`. You can update multiple fields in one request. Updates are merged with persisted metadata. To remove existing metadata, specify `null` as the value. -[[index-patterns-fields-api-update-request]] +[[data-views-fields-api-update-request]] ==== Request `POST :/api/index_patterns/index_pattern//fields` `POST :/s//api/index_patterns/index_pattern//fields` -[[index-patterns-fields-api-update-path-params]] +[[data-views-fields-api-update-path-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. `id`:: -(Required, string) The ID of the index pattern fields you want to update. +(Required, string) The ID of the data view fields you want to update. -[[index-patterns-fields-api-update-request-body]] +[[data-views-fields-api-update-request-body]] ==== Request body `fields`:: (Required, object) the field object -[[index-patterns-fields-api-update-errors-codes]] +[[data-views-fields-api-update-errors-codes]] ==== Response code `200`:: Indicates a successful call. -[[index-patterns-fields-api-update-example]] +[[data-views-fields-api-update-example]] ==== Examples Set popularity `count` for field `foo`: @@ -89,7 +89,7 @@ $ curl -X POST api/saved_objects/index-pattern/my-pattern/fields // KIBANA -The endpoint returns the updated index pattern object: +The endpoint returns the updated data view object: [source,sh] -------------------------------------------------- { diff --git a/docs/api/index-patterns/update.asciidoc b/docs/api/data-views/update.asciidoc similarity index 67% rename from docs/api/index-patterns/update.asciidoc rename to docs/api/data-views/update.asciidoc index 2d5fe882d448d..6157d46888277 100644 --- a/docs/api/index-patterns/update.asciidoc +++ b/docs/api/data-views/update.asciidoc @@ -1,36 +1,36 @@ -[[index-patterns-api-update]] -=== Update index pattern API +[[data-views-api-update]] +=== Update data view API ++++ -Update index pattern +Update data view ++++ -experimental[] Update part of an index pattern. Only the specified fields are updated in the -index pattern. Unspecified fields stay as they are persisted. +experimental[] Update part of an data view. Only the specified fields are updated in the +data view. Unspecified fields stay as they are persisted. -[[index-patterns-api-update-request]] +[[data-views-api-update-request]] ==== Request `POST :/api/index_patterns/index_pattern/` `POST :/s//api/index_patterns/index_pattern/` -[[index-patterns-api-update-path-params]] +[[data-views-api-update-path-params]] ==== Path parameters `space_id`:: (Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. `id`:: - (Required, string) The ID of the index pattern you want to update. + (Required, string) The ID of the data view you want to update. -[[index-patterns-api-update-request-body]] +[[data-views-api-update-request-body]] ==== Request body -`refresh_fields`:: (Optional, boolean) Reloads the index pattern fields after -the index pattern is updated. The default is `false`. +`refresh_fields`:: (Optional, boolean) Reloads the data view fields after +the data view is updated. The default is `false`. `index_pattern`:: - (Required, object) The index patterns fields you want to update. + (Required, object) The data view fields you want to update. + You can partially update the following fields: @@ -43,16 +43,16 @@ You can partially update the following fields: * `type` * `typeMeta` -[[index-patterns-api-update-errors-codes]] +[[data-views-api-update-errors-codes]] ==== Response code `200`:: Indicates a successful call. -[[index-patterns-api-update-example]] +[[data-views-api-update-example]] ==== Examples -Update a title of the `` index pattern: +Update a title of the `` data view: [source,sh] -------------------------------------------------- @@ -100,7 +100,7 @@ $ curl -X POST api/saved_objects/index-pattern/my-pattern -------------------------------------------------- // KIBANA -The API returns the updated index pattern object: +The API returns the updated data view object: [source,sh] -------------------------------------------------- diff --git a/docs/api/index-patterns.asciidoc b/docs/api/index-patterns.asciidoc deleted file mode 100644 index b343d80b4fc15..0000000000000 --- a/docs/api/index-patterns.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[[index-patterns-api]] -== Index patterns APIs - -experimental[] Manage {kib} index patterns. - -WARNING: Do not write documents directly to the `.kibana` index. When you write directly -to the `.kibana` index, the data becomes corrupted and permanently breaks future {kib} versions. - -WARNING: Use the index patterns API for managing {kib} index patterns instead of lower-level <>. - -The following index patterns APIs are available: - -* Index patterns - ** <> to retrieve a single {kib} index pattern - ** <> to create {kib} index pattern - ** <> to partially updated {kib} index pattern - ** <> to delete {kib} index pattern -* Default index pattern - ** <> to retrieve a default index pattern - ** <> to set a default index pattern -* Fields - ** <> to change field metadata, such as `count`, `customLabel` and `format` -* Runtime fields - ** <> to retrieve a runtime field - ** <> to create a runtime field - ** <> to create or update a runtime field - ** <> to partially update an existing runtime field - ** <> to delete a runtime field - -include::index-patterns/get.asciidoc[] -include::index-patterns/create.asciidoc[] -include::index-patterns/update.asciidoc[] -include::index-patterns/delete.asciidoc[] -include::index-patterns/default-get.asciidoc[] -include::index-patterns/default-set.asciidoc[] -include::index-patterns/update-fields.asciidoc[] -include::index-patterns/runtime-fields/get.asciidoc[] -include::index-patterns/runtime-fields/create.asciidoc[] -include::index-patterns/runtime-fields/upsert.asciidoc[] -include::index-patterns/runtime-fields/update.asciidoc[] -include::index-patterns/runtime-fields/delete.asciidoc[] - diff --git a/docs/api/saved-objects.asciidoc b/docs/api/saved-objects.asciidoc index 0625beb793c31..fcb4b119c06c6 100644 --- a/docs/api/saved-objects.asciidoc +++ b/docs/api/saved-objects.asciidoc @@ -6,7 +6,7 @@ Manage {kib} saved objects, including dashboards, visualizations, and more. WARNING: Do not write documents directly to the `.kibana` index. When you write directly to the `.kibana` index, the data becomes corrupted and permanently breaks future {kib} versions. -NOTE: For managing {kib} index patterns, use the <>. +NOTE: For managing {kib} index patterns, use the <>. The following saved objects APIs are available: diff --git a/docs/apm/api.asciidoc b/docs/apm/api.asciidoc index 8bf1b38920141..a7e2a93e0944e 100644 --- a/docs/apm/api.asciidoc +++ b/docs/apm/api.asciidoc @@ -10,7 +10,6 @@ Some APM app features are provided via a REST API: * <> * <> -* <> * <> [float] @@ -71,6 +70,13 @@ curl -X POST \ }' ---- +[float] +[[kibana-api]] +=== Kibana API + +In addition to the APM specific API endpoints, Kibana provides its own <> +which you can use to automate certain aspects of configuring and deploying Kibana. + //// ******************************************************* ******************************************************* @@ -474,90 +480,6 @@ curl -X POST \ ******************************************************* //// -[[kibana-api]] -=== Kibana API - -In addition to the APM specific API endpoints, Kibana provides its own <> -which you can use to automate certain aspects of configuring and deploying Kibana. -An example is below. - -[[api-create-apm-index-pattern]] -==== Customize the APM index pattern - -Use Kibana's <> to update the default APM index pattern on the fly. - -The following example sets the default APM app index pattern to `some-other-pattern-*`: - -[source,sh] ----- -curl -X PUT "localhost:5601/api/saved_objects/index-pattern/apm_static_index_pattern_id" \ <1> --H 'Content-Type: application/json' \ --H 'kbn-xsrf: true' \ --H 'Authorization: Basic ${YOUR_AUTH_TOKEN}' \ --d' { - "attributes": { - "title": "some-other-pattern-*", <2> - } - }' ----- -<1> `apm_static_index_pattern_id` is the internal, hard-coded ID of the APM index pattern. -This value should not be changed -<2> Your custom index pattern matcher. - -The API returns the following: - -[source,json] ----- -{ - "id":"apm_static_index_pattern_id", - "type":"index-pattern", - "updated_at":"2020-07-06T22:55:59.555Z", - "version":"WzYsMV0=", - "attributes":{ - "title":"some-other-pattern-*" - } -} ----- - -To view the new APM app index pattern, use the <>: - -[source,sh] ----- -curl -X GET "localhost:5601/api/saved_objects/index-pattern/apm_static_index_pattern_id" \ <1> --H 'kbn-xsrf: true' \ --H 'Authorization: Basic ${YOUR_AUTH_TOKEN}' ----- -<1> `apm_static_index_pattern_id` is the internal, hard-coded ID of the APM index pattern. - -The API returns the following: - -[source,json] ----- -{ - "id":"apm_static_index_pattern_id", - "type":"index-pattern", - "updated_at":"2020-07-06T22:55:59.555Z", - "version":"WzYsMV0=", - "attributes":{...} - "fieldFormatMap":"{...} - "fields":"[{...},{...},...] - "sourceFilters":"[{\"value\":\"sourcemap.sourcemap\"}]", - "timeFieldName":"@timestamp", - "title":"some-other-pattern-*" - }, - ... -} ----- - -// More examples will go here - -More information on Kibana's API is available in <>. - -//// -******************************************************* -******************************************************* -//// - [role="xpack"] [[rum-sourcemap-api]] === RUM source map API diff --git a/docs/apm/apm-alerts.asciidoc b/docs/apm/apm-alerts.asciidoc index 42016ac08bfc7..d8ce1fafc783c 100644 --- a/docs/apm/apm-alerts.asciidoc +++ b/docs/apm/apm-alerts.asciidoc @@ -107,7 +107,7 @@ From this page, you can disable, mute, and delete APM alerts. [[apm-alert-more-info]] === More information -See {kibana-ref}/alerting-getting-started.html[alerting and actions] for more information. +See {kibana-ref}/alerting-getting-started.html[Alerting] for more information. NOTE: If you are using an **on-premise** Elastic Stack deployment with security, communication between Elasticsearch and Kibana must have TLS configured. diff --git a/docs/apm/images/apm-setup.png b/docs/apm/images/apm-setup.png index 3410ebf69d846..8aadd8911c6e8 100644 Binary files a/docs/apm/images/apm-setup.png and b/docs/apm/images/apm-setup.png differ diff --git a/docs/apm/set-up.asciidoc b/docs/apm/set-up.asciidoc index 3cbe45ec913b7..481ac52d8ffdc 100644 --- a/docs/apm/set-up.asciidoc +++ b/docs/apm/set-up.asciidoc @@ -8,28 +8,13 @@ APM is available via the navigation sidebar in {Kib}. If you have not already installed and configured Elastic APM, -the *Add data* page will get you started. +follow the three steps on the *Add data* page to get started: -[role="screenshot"] -image::apm/images/apm-setup.png[Installation instructions on the APM page in Kibana] - -[float] -[[apm-configure-index-pattern]] -=== Load the index pattern - -Index patterns tell {kib} which {es} indices you want to explore. -An APM index pattern is necessary for certain features in the APM app, like the query bar. -To set up the correct index pattern, on the *Add data* page, click *Load Kibana objects*. +. Start APM Server +. Add APM agents +. Load Kibana objects [role="screenshot"] -image::apm/images/apm-index-pattern.png[Setup index pattern for APM in Kibana] - -TIP: To use a custom index pattern, -adjust Kibana's <> or use the <>. - -[float] -[[apm-getting-started-next]] -=== Next steps +image::apm/images/apm-setup.png[Installation instructions on the APM page in Kibana] -No further configuration in the APM app is required. -Install an APM Agent library in your service to begin visualizing and analyzing your data! +That's it! You're now ready to explore your data. diff --git a/docs/developer/getting-started/debugging.asciidoc b/docs/developer/getting-started/debugging.asciidoc index 1254462d2e4ea..f3308a1267386 100644 --- a/docs/developer/getting-started/debugging.asciidoc +++ b/docs/developer/getting-started/debugging.asciidoc @@ -130,3 +130,71 @@ Once you're finished, you can stop Kibana normally, then stop the {es} and APM s ---- ./scripts/compose.py stop ---- + +=== Using {kib} server logs +{kib} Logs is a great way to see what's going on in your application and to debug performance issues. Navigating through a large number of generated logs can be overwhelming, and following are some techniques that you can use to optimize the process. + +Start by defining a problem area that you are interested in. For example, you might be interested in seeing how a particular {kib} Plugin is performing, so no need to gather logs for all of {kib}. Or you might want to focus on a particular feature, such as requests from the {kib} server to the {es} server. +Depending on your needs, you can configure {kib} to generate logs for a specific feature. +[source,yml] +---- +logging: + appenders: + file: + type: file + fileName: ./kibana.log + layout: + type: json + +### gather all the Kibana logs into a file +logging.root: + appenders: [file] + level: all + +### or gather a subset of the logs +logging.loggers: + ### responses to an HTTP request + - name: http.server.response + level: debug + appenders: [file] + ### result of a query to the Elasticsearch server + - name: elasticsearch.query + level: debug + appenders: [file] + ### logs generated by my plugin + - name: plugins.myPlugin + level: debug + appenders: [file] +---- +WARNING: Kibana's `file` appender is configured to produce logs in https://www.elastic.co/guide/en/ecs/master/ecs-reference.html[ECS JSON] format. It's the only format that includes the meta information necessary for https://www.elastic.co/guide/en/apm/agent/nodejs/current/log-correlation.html[log correlation] out-of-the-box. + +The next step is to define what https://www.elastic.co/observability[observability tools] are available. +For a better experience, set up an https://www.elastic.co/guide/en/apm/get-started/current/observability-integrations.html[Observability integration] provided by Elastic to debug your application with the <> +To debug something quickly without setting up additional tooling, you can work with <> + +[[debugging-logs-apm-ui]] +==== APM UI +*Prerequisites* {kib} logs are configured to be in https://www.elastic.co/guide/en/ecs/master/ecs-reference.html[ECS JSON] format to include tracing identifiers. + +To debug {kib} with the APM UI, you must set up the APM infrastructure. You can find instructions for the setup process +https://www.elastic.co/guide/en/apm/get-started/current/observability-integrations.html[on the Observability integrations page]. + +Once you set up the APM infrastructure, you can enable the APM agent and put {kib} under load to collect APM events. To analyze the collected metrics and logs, use the APM UI as demonstrated https://www.elastic.co/guide/en/kibana/master/transactions.html#transaction-trace-sample[in the docs]. + +[[plain-kibana-logs]] +==== Plain {kib} logs +*Prerequisites* {kib} logs are configured to be in https://www.elastic.co/guide/en/ecs/master/ecs-reference.html[ECS JSON] format to include tracing identifiers. + +Open {kib} Logs and search for an operation you are interested in. +For example, suppose you want to investigate the response times for queries to the `/api/telemetry/v2/clusters/_stats` {kib} endpoint. +Open Kibana Logs and search for the HTTP server response for the endpoint. It looks similar to the following (some fields are omitted for brevity). +[source,json] +---- +{ + "message":"POST /api/telemetry/v2/clusters/_stats 200 1014ms - 43.2KB", + "log":{"level":"DEBUG","logger":"http.server.response"}, + "trace":{"id":"9b99131a6f66587971ef085ef97dfd07"}, + "transaction":{"id":"d0c5bbf14f5febca"} +} +---- +You are interested in the https://www.elastic.co/guide/en/ecs/current/ecs-tracing.html#field-trace-id[trace.id] field, which is a unique identifier of a trace. The `trace.id` provides a way to group multiple events, like transactions, which belong together. You can search for `"trace":{"id":"9b99131a6f66587971ef085ef97dfd07"}` to get all the logs that belong to the same trace. This enables you to see how many {es} requests were triggered during the `9b99131a6f66587971ef085ef97dfd07` trace, what they looked like, what {es} endpoints were hit, and so on. diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 2f0be0c39a3b8..e997c0bc68cde 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -94,6 +94,10 @@ This API doesn't support angular, for registering angular dev tools, bootstrap a |Expression Error plugin adds an error renderer to the expression plugin. The renderer will display the error image. +|{kib-repo}blob/{branch}/src/plugins/chart_expressions/expression_heatmap[expressionHeatmap] +|WARNING: Missing README. + + |{kib-repo}blob/{branch}/src/plugins/expression_image/README.md[expressionImage] |Expression Image plugin adds an image renderer to the expression plugin. The renderer will display the given image. @@ -274,6 +278,10 @@ It acts as a container for a particular visualization and options tabs. Contains The plugin exposes the static DefaultEditorController class to consume. +|{kib-repo}blob/{branch}/src/plugins/vis_types/heatmap[visTypeHeatmap] +|WARNING: Missing README. + + |{kib-repo}blob/{branch}/src/plugins/vis_type_markdown/README.md[visTypeMarkdown] |The markdown visualization that can be used to place text panels on dashboards. diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md index 7669b9b644916..403d8594999a7 100644 --- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md +++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md @@ -72,13 +72,11 @@ readonly links: { readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; - readonly nativeAuth: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; - readonly standardAuth: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; @@ -105,7 +103,6 @@ readonly links: { readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; - readonly nativeAuth: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; @@ -113,7 +110,6 @@ readonly links: { readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; - readonly standardAuth: string; readonly synch: string; readonly zendesk: string; }; diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md index 6aa528d4f04d1..131d4452c980c 100644 --- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md +++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md @@ -17,5 +17,5 @@ export interface DocLinksStart | --- | --- | --- | | [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | string | | | [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | string | | -| [links](./kibana-plugin-core-public.doclinksstart.links.md) | { readonly settings: string; readonly elasticStackGetStarted: string; readonly upgrade: { readonly upgradingElasticStack: string; }; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly cloud: { readonly indexManagement: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record<string, string>; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly appSearch: { readonly apiRef: string; readonly apiClients: string; readonly apiKeys: string; readonly authentication: string; readonly crawlRules: string; readonly curations: string; readonly duplicateDocuments: string; readonly entryPoints: string; readonly guide: string; readonly indexingDocuments: string; readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; readonly nativeAuth: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; readonly standardAuth: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; }; readonly enterpriseSearch: { readonly configuration: string; readonly licenseManagement: string; readonly mailService: string; readonly usersAccess: string; }; readonly workplaceSearch: { readonly box: string; readonly confluenceCloud: string; readonly confluenceServer: string; readonly customSources: string; readonly customSourcePermissions: string; readonly documentPermissions: string; readonly dropbox: string; readonly externalIdentities: string; readonly gitHub: string; readonly gettingStarted: string; readonly gmail: string; readonly googleDrive: string; readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; readonly nativeAuth: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; readonly security: string; readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; readonly standardAuth: string; readonly synch: string; readonly zendesk: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite\_missing\_bucket: string; readonly date\_histogram: string; readonly date\_range: string; readonly date\_format\_pattern: string; readonly filter: string; readonly filters: string; readonly geohash\_grid: string; readonly histogram: string; readonly ip\_range: string; readonly range: string; readonly significant\_terms: string; readonly terms: string; readonly terms\_doc\_count\_error: string; readonly avg: string; readonly avg\_bucket: string; readonly max\_bucket: string; readonly min\_bucket: string; readonly sum\_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative\_sum: string; readonly derivative: string; readonly geo\_bounds: string; readonly geo\_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving\_avg: string; readonly percentile\_ranks: string; readonly serial\_diff: string; readonly std\_dev: string; readonly sum: string; readonly top\_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: string; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record<string, string>; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }; readonly securitySolution: { readonly trustedApps: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record<string, string>; readonly ml: Record<string, string>; readonly transforms: Record<string, string>; readonly visualize: Record<string, string>; readonly apis: Readonly<{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; simulatePipeline: string; timeUnits: string; updateTransform: string; }>; readonly observability: Readonly<{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }>; readonly alerting: Record<string, string>; readonly maps: Readonly<{ guide: string; importGeospatialPrivileges: string; gdalTutorial: string; }>; readonly monitoring: Record<string, string>; readonly security: Readonly<{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; elasticsearchEnableApiKeys: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }>; readonly spaces: Readonly<{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }>; readonly watcher: Record<string, string>; readonly ccs: Record<string, string>; readonly plugins: Record<string, string>; readonly snapshotRestore: Record<string, string>; readonly ingest: Record<string, string>; readonly fleet: Readonly<{ beatsAgentComparison: string; guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; settingsFleetServerProxySettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; installElasticAgent: string; installElasticAgentStandalone: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; apiKeysLearnMore: string; onPremRegistry: string; }>; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; readonly endpoints: { readonly troubleshooting: string; }; } | | +| [links](./kibana-plugin-core-public.doclinksstart.links.md) | { readonly settings: string; readonly elasticStackGetStarted: string; readonly upgrade: { readonly upgradingElasticStack: string; }; readonly apm: { readonly kibanaSettings: string; readonly supportedServiceMaps: string; readonly customLinks: string; readonly droppedTransactionSpans: string; readonly upgrading: string; readonly metaData: string; }; readonly canvas: { readonly guide: string; }; readonly cloud: { readonly indexManagement: string; }; readonly dashboard: { readonly guide: string; readonly drilldowns: string; readonly drilldownsTriggerPicker: string; readonly urlDrilldownTemplateSyntax: string; readonly urlDrilldownVariables: string; }; readonly discover: Record<string, string>; readonly filebeat: { readonly base: string; readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; readonly suricataModule: string; readonly zeekModule: string; }; readonly auditbeat: { readonly base: string; readonly auditdModule: string; readonly systemModule: string; }; readonly metricbeat: { readonly base: string; readonly configure: string; readonly httpEndpoint: string; readonly install: string; readonly start: string; }; readonly appSearch: { readonly apiRef: string; readonly apiClients: string; readonly apiKeys: string; readonly authentication: string; readonly crawlRules: string; readonly curations: string; readonly duplicateDocuments: string; readonly entryPoints: string; readonly guide: string; readonly indexingDocuments: string; readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; }; readonly enterpriseSearch: { readonly configuration: string; readonly licenseManagement: string; readonly mailService: string; readonly usersAccess: string; }; readonly workplaceSearch: { readonly box: string; readonly confluenceCloud: string; readonly confluenceServer: string; readonly customSources: string; readonly customSourcePermissions: string; readonly documentPermissions: string; readonly dropbox: string; readonly externalIdentities: string; readonly gitHub: string; readonly gettingStarted: string; readonly gmail: string; readonly googleDrive: string; readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; readonly security: string; readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; readonly synch: string; readonly zendesk: string; }; readonly heartbeat: { readonly base: string; }; readonly libbeat: { readonly getStarted: string; }; readonly logstash: { readonly base: string; }; readonly functionbeat: { readonly base: string; }; readonly winlogbeat: { readonly base: string; }; readonly aggs: { readonly composite: string; readonly composite\_missing\_bucket: string; readonly date\_histogram: string; readonly date\_range: string; readonly date\_format\_pattern: string; readonly filter: string; readonly filters: string; readonly geohash\_grid: string; readonly histogram: string; readonly ip\_range: string; readonly range: string; readonly significant\_terms: string; readonly terms: string; readonly terms\_doc\_count\_error: string; readonly avg: string; readonly avg\_bucket: string; readonly max\_bucket: string; readonly min\_bucket: string; readonly sum\_bucket: string; readonly cardinality: string; readonly count: string; readonly cumulative\_sum: string; readonly derivative: string; readonly geo\_bounds: string; readonly geo\_centroid: string; readonly max: string; readonly median: string; readonly min: string; readonly moving\_avg: string; readonly percentile\_ranks: string; readonly serial\_diff: string; readonly std\_dev: string; readonly sum: string; readonly top\_hits: string; }; readonly runtimeFields: { readonly overview: string; readonly mapping: string; }; readonly scriptedFields: { readonly scriptFields: string; readonly scriptAggs: string; readonly painless: string; readonly painlessApi: string; readonly painlessLangSpec: string; readonly painlessSyntax: string; readonly painlessWalkthrough: string; readonly luceneExpressions: string; }; readonly search: { readonly sessions: string; readonly sessionLimits: string; }; readonly indexPatterns: { readonly introduction: string; readonly fieldFormattersNumber: string; readonly fieldFormattersString: string; readonly runtimeFields: string; }; readonly addData: string; readonly kibana: string; readonly upgradeAssistant: { readonly overview: string; readonly batchReindex: string; readonly remoteReindex: string; }; readonly rollupJobs: string; readonly elasticsearch: Record<string, string>; readonly siem: { readonly privileges: string; readonly guide: string; readonly gettingStarted: string; readonly ml: string; readonly ruleChangeLog: string; readonly detectionsReq: string; readonly networkMap: string; readonly troubleshootGaps: string; }; readonly securitySolution: { readonly trustedApps: string; }; readonly query: { readonly eql: string; readonly kueryQuerySyntax: string; readonly luceneQuerySyntax: string; readonly percolate: string; readonly queryDsl: string; }; readonly date: { readonly dateMath: string; readonly dateMathIndexNames: string; }; readonly management: Record<string, string>; readonly ml: Record<string, string>; readonly transforms: Record<string, string>; readonly visualize: Record<string, string>; readonly apis: Readonly<{ bulkIndexAlias: string; byteSizeUnits: string; createAutoFollowPattern: string; createFollower: string; createIndex: string; createSnapshotLifecyclePolicy: string; createRoleMapping: string; createRoleMappingTemplates: string; createRollupJobsRequest: string; createApiKey: string; createPipeline: string; createTransformRequest: string; cronExpressions: string; executeWatchActionModes: string; indexExists: string; openIndex: string; putComponentTemplate: string; painlessExecute: string; painlessExecuteAPIContexts: string; putComponentTemplateMetadata: string; putSnapshotLifecyclePolicy: string; putIndexTemplateV1: string; putWatch: string; simulatePipeline: string; timeUnits: string; updateTransform: string; }>; readonly observability: Readonly<{ guide: string; infrastructureThreshold: string; logsThreshold: string; metricsThreshold: string; monitorStatus: string; monitorUptime: string; tlsCertificate: string; uptimeDurationAnomaly: string; }>; readonly alerting: Record<string, string>; readonly maps: Readonly<{ guide: string; importGeospatialPrivileges: string; gdalTutorial: string; }>; readonly monitoring: Record<string, string>; readonly security: Readonly<{ apiKeyServiceSettings: string; clusterPrivileges: string; elasticsearchSettings: string; elasticsearchEnableSecurity: string; elasticsearchEnableApiKeys: string; indicesPrivileges: string; kibanaTLS: string; kibanaPrivileges: string; mappingRoles: string; mappingRolesFieldRules: string; runAsPrivilege: string; }>; readonly spaces: Readonly<{ kibanaLegacyUrlAliases: string; kibanaDisableLegacyUrlAliasesApi: string; }>; readonly watcher: Record<string, string>; readonly ccs: Record<string, string>; readonly plugins: Record<string, string>; readonly snapshotRestore: Record<string, string>; readonly ingest: Record<string, string>; readonly fleet: Readonly<{ beatsAgentComparison: string; guide: string; fleetServer: string; fleetServerAddFleetServer: string; settings: string; settingsFleetServerHostSettings: string; settingsFleetServerProxySettings: string; troubleshooting: string; elasticAgent: string; datastreams: string; datastreamsNamingScheme: string; installElasticAgent: string; installElasticAgentStandalone: string; upgradeElasticAgent: string; upgradeElasticAgent712lower: string; learnMoreBlog: string; apiKeysLearnMore: string; onPremRegistry: string; }>; readonly ecs: { readonly guide: string; }; readonly clients: { readonly guide: string; readonly goOverview: string; readonly javaIndex: string; readonly jsIntro: string; readonly netGuide: string; readonly perlGuide: string; readonly phpGuide: string; readonly pythonGuide: string; readonly rubyOverview: string; readonly rustGuide: string; }; readonly endpoints: { readonly troubleshooting: string; }; } | | diff --git a/docs/development/core/public/kibana-plugin-core-public.scopedhistory._constructor_.md b/docs/development/core/public/kibana-plugin-core-public.scopedhistory._constructor_.md index 32b0950aa1065..67264a26ac5db 100644 --- a/docs/development/core/public/kibana-plugin-core-public.scopedhistory._constructor_.md +++ b/docs/development/core/public/kibana-plugin-core-public.scopedhistory._constructor_.md @@ -9,13 +9,13 @@ Constructs a new instance of the `ScopedHistory` class Signature: ```typescript -constructor(parentHistory: History, basePath: string); +constructor(parentHistory: History, basePath: string); ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| parentHistory | History | | +| parentHistory | History<HistoryLocationState> | | | basePath | string | | diff --git a/docs/development/core/public/kibana-plugin-core-public.scopedhistory.block.md b/docs/development/core/public/kibana-plugin-core-public.scopedhistory.block.md index eb632465e4699..acbb06c6aa6ec 100644 --- a/docs/development/core/public/kibana-plugin-core-public.scopedhistory.block.md +++ b/docs/development/core/public/kibana-plugin-core-public.scopedhistory.block.md @@ -9,5 +9,5 @@ Add a block prompt requesting user confirmation when navigating away from the cu Signature: ```typescript -block: (prompt?: string | boolean | History.TransitionPromptHook | undefined) => UnregisterCallback; +block: (prompt?: string | boolean | TransitionPromptHook | undefined) => UnregisterCallback; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.scopedhistory.createsubhistory.md b/docs/development/core/public/kibana-plugin-core-public.scopedhistory.createsubhistory.md index a976eeed912b2..7c5dfccb5b008 100644 --- a/docs/development/core/public/kibana-plugin-core-public.scopedhistory.createsubhistory.md +++ b/docs/development/core/public/kibana-plugin-core-public.scopedhistory.createsubhistory.md @@ -9,5 +9,5 @@ Creates a `ScopedHistory` for a subpath of this `ScopedHistory`. Useful Signature: ```typescript -createSubHistory: (basePath: string) => ScopedHistory; +createSubHistory: (basePath: string) => ScopedHistory; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md b/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md index 0d04fc3d6a860..a3c369b143b4a 100644 --- a/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md +++ b/docs/development/core/public/kibana-plugin-core-public.scopedhistory.md @@ -28,9 +28,9 @@ export declare class ScopedHistory implements Hi | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [action](./kibana-plugin-core-public.scopedhistory.action.md) | | Action | The last action dispatched on the history stack. | -| [block](./kibana-plugin-core-public.scopedhistory.block.md) | | (prompt?: string \| boolean \| History.TransitionPromptHook<HistoryLocationState> \| undefined) => UnregisterCallback | Add a block prompt requesting user confirmation when navigating away from the current page. | +| [block](./kibana-plugin-core-public.scopedhistory.block.md) | | (prompt?: string \| boolean \| TransitionPromptHook<HistoryLocationState> \| undefined) => UnregisterCallback | Add a block prompt requesting user confirmation when navigating away from the current page. | | [createHref](./kibana-plugin-core-public.scopedhistory.createhref.md) | | (location: LocationDescriptorObject<HistoryLocationState>, { prependBasePath }?: { prependBasePath?: boolean \| undefined; }) => Href | Creates an href (string) to the location. If prependBasePath is true (default), it will prepend the location's path with the scoped history basePath. | -| [createSubHistory](./kibana-plugin-core-public.scopedhistory.createsubhistory.md) | | <SubHistoryLocationState = unknown>(basePath: string) => ScopedHistory<SubHistoryLocationState> | Creates a ScopedHistory for a subpath of this ScopedHistory. Useful for applications that may have sub-apps that do not need access to the containing application's history. | +| [createSubHistory](./kibana-plugin-core-public.scopedhistory.createsubhistory.md) | | (basePath: string) => ScopedHistory<HistoryLocationState> | Creates a ScopedHistory for a subpath of this ScopedHistory. Useful for applications that may have sub-apps that do not need access to the containing application's history. | | [go](./kibana-plugin-core-public.scopedhistory.go.md) | | (n: number) => void | Send the user forward or backwards in the history stack. | | [goBack](./kibana-plugin-core-public.scopedhistory.goback.md) | | () => void | Send the user one location back in the history stack. Equivalent to calling [ScopedHistory.go(-1)](./kibana-plugin-core-public.scopedhistory.go.md). If no more entries are available backwards, this is a no-op. | | [goForward](./kibana-plugin-core-public.scopedhistory.goforward.md) | | () => void | Send the user one location forward in the history stack. Equivalent to calling [ScopedHistory.go(1)](./kibana-plugin-core-public.scopedhistory.go.md). If no more entries are available forwards, this is a no-op. | diff --git a/docs/development/core/server/kibana-plugin-core-server.kibanaresponsefactory.md b/docs/development/core/server/kibana-plugin-core-server.kibanaresponsefactory.md index b2e2b4bc6003f..91cb6c370d759 100644 --- a/docs/development/core/server/kibana-plugin-core-server.kibanaresponsefactory.md +++ b/docs/development/core/server/kibana-plugin-core-server.kibanaresponsefactory.md @@ -12,14 +12,32 @@ Set of helpers used to create `KibanaResponse` to form HTTP response on an incom kibanaResponseFactory: { custom: | Error | Buffer | Stream | { message: string | Error; - attributes?: Record | undefined; + attributes?: ResponseErrorAttributes | undefined; } | undefined>(options: CustomHttpResponseOptions) => KibanaResponse; - badRequest: (options?: ErrorHttpResponseOptions) => KibanaResponse; - unauthorized: (options?: ErrorHttpResponseOptions) => KibanaResponse; - forbidden: (options?: ErrorHttpResponseOptions) => KibanaResponse; - notFound: (options?: ErrorHttpResponseOptions) => KibanaResponse; - conflict: (options?: ErrorHttpResponseOptions) => KibanaResponse; - customError: (options: CustomHttpResponseOptions) => KibanaResponse; + badRequest: (options?: ErrorHttpResponseOptions) => KibanaResponse; + unauthorized: (options?: ErrorHttpResponseOptions) => KibanaResponse; + forbidden: (options?: ErrorHttpResponseOptions) => KibanaResponse; + notFound: (options?: ErrorHttpResponseOptions) => KibanaResponse; + conflict: (options?: ErrorHttpResponseOptions) => KibanaResponse; + customError: (options: CustomHttpResponseOptions) => KibanaResponse; redirected: (options: RedirectResponseOptions) => KibanaResponse | Buffer | Stream>; ok: (options?: HttpResponseOptions) => KibanaResponse | Buffer | Stream>; accepted: (options?: HttpResponseOptions) => KibanaResponse | Buffer | Stream>; diff --git a/docs/management/advanced-options.asciidoc b/docs/management/advanced-options.asciidoc index 581f13cbc2992..5906f2dd5008f 100644 --- a/docs/management/advanced-options.asciidoc +++ b/docs/management/advanced-options.asciidoc @@ -521,7 +521,10 @@ Enables the legacy time axis for charts in Lens, Discover, Visualize and TSVB The maximum number of buckets a datasource can return. High numbers can have a negative impact on your browser rendering performance. [[visualization-visualize-pieChartslibrary]]`visualization:visualize:legacyPieChartsLibrary`:: -The visualize editor uses new pie charts with improved performance, color palettes, label positioning, and more. Enable this option if you prefer to use to the legacy charts library. +The visualize editor uses new pie charts with improved performance, color palettes, label positioning, and more. Enable this option if you prefer to use the legacy charts library. + +[[visualization-visualize-heatmapChartslibrary]]`visualization:visualize:legacyHeatmapChartsLibrary`:: +Disable this option if you prefer to use the new heatmap charts with improved performance, legend settings, and more.. [[visualize-enablelabs]]`visualize:enableLabs`:: Enables users to create, view, and edit experimental visualizations. When disabled, diff --git a/docs/management/connectors/action-types/servicenow-itom.asciidoc b/docs/management/connectors/action-types/servicenow-itom.asciidoc index 017290dde9b15..af231c327f955 100644 --- a/docs/management/connectors/action-types/servicenow-itom.asciidoc +++ b/docs/management/connectors/action-types/servicenow-itom.asciidoc @@ -1,25 +1,31 @@ [role="xpack"] [[servicenow-itom-action-type]] -=== ServiceNow connector and action +=== ServiceNow ITOM connector and action ++++ ServiceNow ITOM ++++ -The ServiceNow ITOM connector uses the https://docs.servicenow.com/bundle/rome-it-operations-management/page/product/event-management/task/send-events-via-web-service.html[Event API] to create ServiceNow events. +The {sn} ITOM connector uses the https://docs.servicenow.com/bundle/rome-it-operations-management/page/product/event-management/task/send-events-via-web-service.html[Event API] to create {sn} events. + +[float] +[[servicenow-itom-connector-prerequisites]] +==== Prerequisites +Create an integration user in {sn} and assign it the following roles. + +* `personalize_choices`: Allows the user to retrieve Choice element options, such as Severity. +* `evt_mgmt_integration`: Enables integration with external event sources by allowing the user to create events. [float] [[servicenow-itom-connector-configuration]] ==== Connector configuration -ServiceNow ITOM connectors have the following configuration properties. +{sn} ITOM connectors have the following configuration properties. -Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action. -URL:: ServiceNow instance URL. +Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** connector listing, and in the connector list when configuring an action. +URL:: {sn} instance URL. Username:: Username for HTTP Basic authentication. Password:: Password for HTTP Basic authentication. -The ServiceNow user requires at minimum read, create, and update access to the Event table and read access to the https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/localization/reference/r_ChoicesTable.html[sys_choice]. If you don't provide access to sys_choice, then the choices will not render. - [float] [[servicenow-itom-connector-networking-configuration]] ==== Connector networking configuration @@ -55,12 +61,12 @@ Secrets defines sensitive information for the connector type. [[define-servicenow-itom-ui]] ==== Define connector in Stack Management -Define ServiceNow ITOM connector properties. +Define {sn} ITOM connector properties. [role="screenshot"] image::management/connectors/images/servicenow-itom-connector.png[ServiceNow ITOM connector] -Test ServiceNow ITOM action parameters. +Test {sn} ITOM action parameters. [role="screenshot"] image::management/connectors/images/servicenow-itom-params-test.png[ServiceNow ITOM params test] @@ -69,7 +75,7 @@ image::management/connectors/images/servicenow-itom-params-test.png[ServiceNow I [[servicenow-itom-action-configuration]] ==== Action configuration -ServiceNow ITOM actions have the following configuration properties. +{sn} ITOM actions have the following configuration properties. Source:: The name of the event source type. Node:: The Host that the event was triggered for. @@ -77,7 +83,7 @@ Type:: The type of event. Resource:: The name of the resource. Metric name:: Name of the metric. Source instance (event_class):: Specific instance of the source. -Message key:: All actions sharing this key will be associated with the same ServiceNow alert. Default value: `:`. +Message key:: All actions sharing this key will be associated with the same {sn} alert. Default value: `:`. Severity:: The severity of the event. Description:: The details about the event. @@ -85,6 +91,6 @@ Refer to https://docs.servicenow.com/bundle/rome-it-operations-management/page/p [float] [[configuring-servicenow-itom]] -==== Configure ServiceNow ITOM +==== Configure {sn} ITOM -ServiceNow offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents. +{sn} offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents. diff --git a/docs/management/connectors/action-types/servicenow-sir.asciidoc b/docs/management/connectors/action-types/servicenow-sir.asciidoc index 8847a99fe3af0..70500b26c16e6 100644 --- a/docs/management/connectors/action-types/servicenow-sir.asciidoc +++ b/docs/management/connectors/action-types/servicenow-sir.asciidoc @@ -1,25 +1,83 @@ [role="xpack"] [[servicenow-sir-action-type]] -=== ServiceNow connector and action +=== ServiceNow SecOps connector and action ++++ ServiceNow SecOps ++++ -The ServiceNow SecOps connector uses the https://docs.servicenow.com/bundle/orlando-application-development/page/integrate/inbound-rest/concept/c_TableAPI.html[V2 Table API] to create ServiceNow security incidents. +The {sn} SecOps connector uses the https://docs.servicenow.com/bundle/orlando-application-development/page/integrate/inbound-rest/concept/c_TableAPI.html[V2 Table API] to create {sn} security incidents. + +[float] +[[servicenow-sir-connector-prerequisites]] +==== Prerequisites +After upgrading from {stack} version 7.15.0 or earlier to version 7.16.0 or later, you must complete the following within your {sn} instance before creating a new {sn} SecOps connector or <>: + +* Install https://store.servicenow.com/sn_appstore_store.do#!/store/application/2f0746801baeb01019ae54e4604bcb0f[Elastic for Security Operations (SecOps)] from the {sn} Store. +* Create a {sn} integration user and assign it the appropriate roles. +* Create a Cross-Origin Resource Sharing (CORS) rule. + +*Create a {sn} integration user* + +To ensure authenticated communication between Elastic and {sn}, create a {sn} integration user and assign it the appropriate roles.  + +. In your {sn} instance, go to *System Security -> Users and Groups -> Users*. +. Click *New*. +. Complete the form, then right-click on the menu bar and click *Save*. +. Go to the *Roles* tab and click *Edit*. +. Assign the integration user the following roles:  +* `import_set_loader` +* `import_transformer` +* `personalize_choices` +* `sn_si.basic` +* `x_elas2_sir_int.integration_user` +. Click *Save*. + +*Create a CORS rule* + +A CORS rule is required for communication between Elastic and {sn}. To create a CORS rule: + +. In your {sn} instance, go to *System Web Services -> REST -> CORS Rules*. +. Click *New*. +. Configure the rule as follows: +* *Name*: Name the rule. +* *REST API*: Set the rule to use the Elastic SecOps API by choosing `Elastic SIR API [x_elas2_sir_int/elastic_api]`. +* *Domain*: Enter the Kibana URL. +. Go to the *HTTP methods* tab and select *GET*. +. Click *Submit* to create the rule. + +[float] +[[servicenow-sir-connector-update]] +==== Update a deprecated {sn} SecOps connector + +{sn} SecOps connectors created in {stack} version 7.15.0 or earlier are marked as deprecated after you upgrade to version 7.16.0 or later. Deprecated connectors have a yellow icon after their name and display a warning message when selected. + +[role="screenshot"] +image::management/connectors/images/servicenow-sir-update-connector.png[Shows deprecated ServiceNow connectors] + +IMPORTANT: Deprecated connectors will continue to function with the rules they were added to and can be assigned to new rules. However, it is strongly recommended to update deprecated connectors or <> to ensure you have access to connector enhancements, such as updating incidents. + +To update a deprecated connector: + +. Open the main menu and go to *Stack Management -> Rules and connectors -> Connectors*. +. Select the deprecated connector to open the *Edit connector* flyout. +. In the warning message, click *Update this connector*. +. Complete the guided steps in the *Edit connector* flyout. +.. Install https://store.servicenow.com/sn_appstore_store.do#!/store/application/2f0746801baeb01019ae54e4604bcb0f[Elastic for Security Operations (SecOps)] from the {sn} Store and complete the <>. +.. Enter the URL of your {sn} instance. +.. Enter the username and password of your {sn} instance. +. Click *Update*. [float] [[servicenow-sir-connector-configuration]] ==== Connector configuration -ServiceNow SecOps connectors have the following configuration properties. +{sn} SecOps connectors have the following configuration properties. Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action. -URL:: ServiceNow instance URL. +URL:: {sn} instance URL. Username:: Username for HTTP Basic authentication. Password:: Password for HTTP Basic authentication. -The ServiceNow user requires at minimum read, create, and update access to the Security Incident table and read access to the https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/localization/reference/r_ChoicesTable.html[sys_choice]. If you don't provide access to sys_choice, then the choices will not render. - [float] [[servicenow-sir-connector-networking-configuration]] ==== Connector networking configuration @@ -48,7 +106,7 @@ Config defines information for the connector type. `apiUrl`:: An address that corresponds to *URL*. `usesTableApi`:: A boolean that indicates if the connector uses the Table API or the Import Set API. -Note: If `usesTableApi` is set to false the Elastic application should be installed in ServiceNow. +NOTE: If `usesTableApi` is set to false, the Elastic application should be installed in {sn}. Secrets defines sensitive information for the connector type. @@ -59,12 +117,12 @@ Secrets defines sensitive information for the connector type. [[define-servicenow-sir-ui]] ==== Define connector in Stack Management -Define ServiceNow SecOps connector properties. +Define {sn} SecOps connector properties. [role="screenshot"] image::management/connectors/images/servicenow-sir-connector.png[ServiceNow SecOps connector] -Test ServiceNow SecOps action parameters. +Test {sn} SecOps action parameters. [role="screenshot"] image::management/connectors/images/servicenow-sir-params-test.png[ServiceNow SecOps params test] @@ -79,13 +137,16 @@ Short description:: A short description for the incident, used for searching Priority:: The priority of the incident. Category:: The category of the incident. Subcategory:: The subcategory of the incident. -Correlation ID:: All actions sharing this ID will be associated with the same ServiceNow security incident. If an incident exists in ServiceNow with the same correlation ID the security incident will be updated. Default value: `:`. -Correlation Display:: A descriptive label of the alert for correlation purposes in ServiceNow. +Correlation ID:: Connectors using the same Correlation ID will be associated with the same {sn} incident. This value determines whether a new {sn} incident will be created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the Correlation ID value in {sn}. The maximum character length for this value is 100 characters. + +NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that {sn} will create a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, {sn} creates and continually updates a single incident record for the alert. + +Correlation Display:: A descriptive label of the alert for correlation purposes in {sn}. Description:: The details about the incident. Additional comments:: Additional information for the client, such as how to troubleshoot the issue. [float] [[configuring-servicenow-sir]] -==== Configure ServiceNow SecOps +==== Configure {sn} SecOps -ServiceNow offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents. +{sn} offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents. diff --git a/docs/management/connectors/action-types/servicenow.asciidoc b/docs/management/connectors/action-types/servicenow.asciidoc index bfa8c7db657d0..73e3baaca2ad1 100644 --- a/docs/management/connectors/action-types/servicenow.asciidoc +++ b/docs/management/connectors/action-types/servicenow.asciidoc @@ -1,25 +1,82 @@ [role="xpack"] [[servicenow-action-type]] -=== ServiceNow connector and action +=== ServiceNow ITSM connector and action ++++ ServiceNow ITSM ++++ -The ServiceNow ITSM connector uses the https://docs.servicenow.com/bundle/orlando-application-development/page/integrate/inbound-rest/concept/c_TableAPI.html[V2 Table API] to create ServiceNow incidents. +The {sn} ITSM connector uses the https://docs.servicenow.com/bundle/orlando-application-development/page/integrate/inbound-rest/concept/c_TableAPI.html[V2 Table API] to create {sn} incidents. + +[float] +[[servicenow-itsm-connector-prerequisites]] +==== Prerequisites +After upgrading from {stack} version 7.15.0 or earlier to version 7.16.0 or later, you must complete the following within your {sn} instance before creating a new {sn} ITSM connector or <>: + +* Install https://store.servicenow.com/sn_appstore_store.do#!/store/application/7148dbc91bf1f450ced060a7234bcb88[Elastic for ITSM] from the {sn} Store. +* Create a {sn} integration user and assign it the appropriate roles. +* Create a Cross-Origin Resource Sharing (CORS) rule. + +*Create a {sn} integration user* + +To ensure authenticated communication between Elastic and {sn}, create a {sn} integration user and assign it the appropriate roles. + +. In your {sn} instance, go to *System Security -> Users and Groups -> Users*. +. Click *New*. +. Complete the form, then right-click on the menu bar and click *Save*. +. Go to the *Roles* tab and click *Edit*. +. Assign the integration user the following roles:  +* `import_set_loader` +* `import_transformer` +* `personalize_choices` +* `x_elas2_inc_int.integration_user` +. Click *Save*. + +*Create a CORS rule* + +A CORS rule is required for communication between Elastic and {sn}. To create a CORS rule: + +. In your {sn} instance, go to *System Web Services -> REST -> CORS Rules*. +. Click *New*. +. Configure the rule as follows: +* *Name*: Name the rule. +* *REST API*: Set the rule to use the Elastic ITSM API by choosing `Elastic ITSM API [x_elas2_inc_int/elastic_api]`. +* *Domain*: Enter the Kibana URL. +. Go to the *HTTP methods* tab and select *GET*. +. Click *Submit* to create the rule. + +[float] +[[servicenow-itsm-connector-update]] +==== Update a deprecated {sn} ITSM connector + +{sn} ITSM connectors created in {stack} version 7.15.0 or earlier are marked as deprecated after you upgrade to version 7.16.0 or later. Deprecated connectors have a yellow icon after their name and display a warning message when selected. + +[role="screenshot"] +image::management/connectors/images/servicenow-sir-update-connector.png[Shows deprecated ServiceNow connectors] + +IMPORTANT: Deprecated connectors will continue to function with the rules they were added to and can be assigned to new rules. However, it is strongly recommended to update deprecated connectors or <> to ensure you have access to connector enhancements, such as updating incidents. + +To update a deprecated connector: + +. Open the main menu and go to *Stack Management -> Rules and connectors -> Connectors*. +. Select the deprecated connector to open the *Edit connector* flyout. +. In the warning message, click *Update this connector*. +. Complete the guided steps in the *Edit connector* flyout. +.. Install https://store.servicenow.com/sn_appstore_store.do#!/store/application/7148dbc91bf1f450ced060a7234bcb88[Elastic for ITSM] and complete the <>. +.. Enter the URL of your {sn} instance. +.. Enter the username and password of your {sn} instance. +. Click *Update*. [float] [[servicenow-connector-configuration]] ==== Connector configuration -ServiceNow ITSM connectors have the following configuration properties. +{sn} ITSM connectors have the following configuration properties. Name:: The name of the connector. The name is used to identify a connector in the **Stack Management** UI connector listing, and in the connector list when configuring an action. -URL:: ServiceNow instance URL. +URL:: {sn} instance URL. Username:: Username for HTTP Basic authentication. Password:: Password for HTTP Basic authentication. -The ServiceNow user requires at minimum read, create, and update access to the Incident table and read access to the https://docs.servicenow.com/bundle/paris-platform-administration/page/administer/localization/reference/r_ChoicesTable.html[sys_choice]. If you don't provide access to sys_choice, then the choices will not render. - [float] [[servicenow-connector-networking-configuration]] ==== Connector networking configuration @@ -48,7 +105,7 @@ Config defines information for the connector type. `apiUrl`:: An address that corresponds to *URL*. `usesTableApi`:: A boolean that indicates if the connector uses the Table API or the Import Set API. -Note: If `usesTableApi` is set to false the Elastic application should be installed in ServiceNow. +NOTE: If `usesTableApi` is set to false, the Elastic application should be installed in {sn}. Secrets defines sensitive information for the connector type. @@ -59,12 +116,12 @@ Secrets defines sensitive information for the connector type. [[define-servicenow-ui]] ==== Define connector in Stack Management -Define ServiceNow ITSM connector properties. +Define {sn} ITSM connector properties. [role="screenshot"] image::management/connectors/images/servicenow-connector.png[ServiceNow connector] -Test ServiceNow ITSM action parameters. +Test {sn} ITSM action parameters. [role="screenshot"] image::management/connectors/images/servicenow-params-test.png[ServiceNow params test] @@ -73,21 +130,24 @@ image::management/connectors/images/servicenow-params-test.png[ServiceNow params [[servicenow-action-configuration]] ==== Action configuration -ServiceNow ITSM actions have the following configuration properties. +{sn} ITSM actions have the following configuration properties. Urgency:: The extent to which the incident resolution can delay. Severity:: The severity of the incident. Impact:: The effect an incident has on business. Can be measured by the number of affected users or by how critical it is to the business in question. Category:: The category of the incident. Subcategory:: The category of the incident. -Correlation ID:: All actions sharing this ID will be associated with the same ServiceNow incident. If an incident exists in ServiceNow with the same correlation ID the incident will be updated. Default value: `:`. -Correlation Display:: A descriptive label of the alert for correlation purposes in ServiceNow. +Correlation ID:: Connectors using the same Correlation ID will be associated with the same {sn} incident. This value determines whether a new {sn} incident will be created or an existing one is updated. Modifying this value is optional; if not modified, the rule ID and alert ID are combined as `{{ruleID}}:{{alert ID}}` to form the Correlation ID value in {sn}. The maximum character length for this value is 100 characters. + +NOTE: Using the default configuration of `{{ruleID}}:{{alert ID}}` ensures that {sn} will create a separate incident record for every generated alert that uses a unique alert ID. If the rule generates multiple alerts that use the same alert IDs, {sn} creates and continually updates a single incident record for the alert. + +Correlation Display:: A descriptive label of the alert for correlation purposes in {sn}. Short description:: A short description for the incident, used for searching the contents of the knowledge base. Description:: The details about the incident. Additional comments:: Additional information for the client, such as how to troubleshoot the issue. [float] [[configuring-servicenow]] -==== Configure ServiceNow +==== Configure {sn} -ServiceNow offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents. +{sn} offers free https://developer.servicenow.com/dev.do#!/guides/madrid/now-platform/pdi-guide/obtaining-a-pdi[Personal Developer Instances], which you can use to test incidents. diff --git a/docs/management/connectors/images/servicenow-params-test.png b/docs/management/connectors/images/servicenow-params-test.png index 79f1580c873d2..d8a85608bd40e 100644 Binary files a/docs/management/connectors/images/servicenow-params-test.png and b/docs/management/connectors/images/servicenow-params-test.png differ diff --git a/docs/management/connectors/images/servicenow-sir-update-connector.png b/docs/management/connectors/images/servicenow-sir-update-connector.png new file mode 100644 index 0000000000000..5a12ad971f62f Binary files /dev/null and b/docs/management/connectors/images/servicenow-sir-update-connector.png differ diff --git a/docs/redirects.asciidoc b/docs/redirects.asciidoc index 8b77bb7555027..6fafe1ce2506d 100644 --- a/docs/redirects.asciidoc +++ b/docs/redirects.asciidoc @@ -15,6 +15,10 @@ Refer to {ref}/snapshot-restore.html[Snapshot and Restore]. == Tutorial: Snapshot and Restore Refer to {ref}/snapshot-restore.html[Snapshot and Restore]. +[role="exclude",id="configuring-tls-communication"] +== Encrypt communications in {kib} +Refer to <>. + [role="exclude",id="configuring-tls"] == Encrypt TLS communications in {kib} Refer to {ref}/security-basic-setup-https.html#encrypt-kibana-http[Encrypt HTTP client communications for {kib}]. @@ -376,3 +380,63 @@ This content has moved. Refer to <>. == Index patterns has been renamed to data views. This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-api"] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-api-create"] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-api-default-get"] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-api-default-set"] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-api-delete"] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-api-get"] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-runtime-field-api-create"] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-runtime-field-api-delete] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-runtime-field-api-get] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-runtime-field-api-update] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-runtime-field-api-upsert] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. + +[role="exclude",id="index-patterns-api-update] +== Index patterns has been renamed to data views. + +This content has moved. Refer to <>. diff --git a/docs/settings/alert-action-settings.asciidoc b/docs/settings/alert-action-settings.asciidoc index 38a73ec92313f..f0c22ebf8b730 100644 --- a/docs/settings/alert-action-settings.asciidoc +++ b/docs/settings/alert-action-settings.asciidoc @@ -5,7 +5,7 @@ Alerting and action settings ++++ -Alerts and actions are enabled by default in {kib}, but require you configure the following in order to use them: +Alerting and actions are enabled by default in {kib}, but require you to configure the following: . <>. . <>. @@ -126,7 +126,7 @@ into a single string. This configuration can be used for environments where the files cannot be made available. `xpack.actions.enabledActionTypes` {ess-icon}:: -A list of action types that are enabled. It defaults to `[*]`, enabling all types. The names for built-in {kib} action types are prefixed with a `.` and include: `.server-log`, `.slack`, `.email`, `.index`, `.pagerduty`, and `.webhook`. An empty list `[]` will disable all action types. +A list of action types that are enabled. It defaults to `[*]`, enabling all types. The names for built-in {kib} action types are prefixed with a `.` and include: `.email`, `.index`, `.jira`, `.pagerduty`, `.resilient`, `.server-log`, `.servicenow`, .`servicenow-itom`, `.servicenow-sir`, `.slack`, `.swimlane`, `.teams`, and `.webhook`. An empty list `[]` will disable all action types. + Disabled action types will not appear as an option when creating new connectors, but existing connectors and actions of that type will remain in {kib} and will not function. diff --git a/docs/settings/apm-settings.asciidoc b/docs/settings/apm-settings.asciidoc index d343aa12ec806..77a250a14f929 100644 --- a/docs/settings/apm-settings.asciidoc +++ b/docs/settings/apm-settings.asciidoc @@ -101,6 +101,8 @@ Changing these settings may disable features of the APM App. | `xpack.apm.indices.sourcemap` {ess-icon} | Matcher for all source map indices. Defaults to `apm-*`. +| `xpack.apm.autocreateApmIndexPattern` {ess-icon} + | Set to `false` to disable the automatic creation of the APM index pattern when the APM app is opened. Defaults to `true`. |=== // end::general-apm-settings[] \ No newline at end of file diff --git a/docs/setup/connect-to-elasticsearch.asciidoc b/docs/setup/connect-to-elasticsearch.asciidoc index b1d9d3ea2ea18..1d698e9087937 100644 --- a/docs/setup/connect-to-elasticsearch.asciidoc +++ b/docs/setup/connect-to-elasticsearch.asciidoc @@ -1,67 +1,86 @@ [[connect-to-elasticsearch]] -== Add your data -++++ -Add data -++++ +== Add data -To start working with your data in {kib}, use one of the many ingest options, -available from the home page. -You can collect data from an app or service, -or upload a file that contains your data. If you're not ready to use your own data, -add a sample data set and give {kib} a test drive. +The best way to add data to the Elastic Stack is to use one of our many integrations, +which are pre-packaged assets that are available for a wide array of popular +services and platforms. With integrations, you can add monitoring for logs and +metrics, protect systems from security threats, and more. -[role="screenshot"] -image::images/addData_home_7.15.0.png[Built-in options for adding data to Kibana: Add data, Add Elastic Agent, Upload a file] - -[float] -[[add-data-tutorial-kibana]] -=== Add data - -Want to ingest logs, metrics, security, or application data? -Install and configure a Beats data shipper or other module to periodically collect the data -and send it to {es}. You can then use the pre-built dashboards to explore and analyze the data. +All integrations are available in a single view, and +{kib} guides you there from the *Welcome* screen, home page, and main menu. [role="screenshot"] -image::images/add-data-tutorials.png[Add Data tutorials] +image::images/add-integration.png[Integrations page from which you can choose integrations to start collecting and analyzing data] -[discrete] -=== Add Elastic Agent +NOTE: When an integration is available for both +https://www.elastic.co/guide/en/fleet/master/beats-agent-comparison.html[Elastic Agent and Beats], +the *Integrations* view defaults to the +Elastic Agent integration, if it is generally available (GA). +To show a +Beats integration, use the filter below the side navigation. -*Elastic Agent* is the next generation of -data integration modules, offering -a centralized way to set up your integrations. +[float] +=== Add data with Elastic solutions + +A good place to start is with one of our Elastic solutions, which +offer experiences for common use cases. + +* *Web site search crawler.* +Discover, extract, and index your web content into App Search engines using the +{app-search-ref}/web-crawler.html[Enterprise Search web site crawler]. +Search across Google Drive, GitHub, Salesforce, and many other web services using +{workplace-search-ref}/workplace-search-content-sources.html[Workplace Search content sources]. + +* *Elastic APM.* +Get logs, metrics, traces, and uptime data into the Elastic Stack. +Integrations are available for popular services and platforms, +such as Nginx, AWS, and MongoDB, +and generic input types like log files. +Refer to {observability-guide}/observability-introduction.html[Elastic Observability] +for more information. + +* *Endpoint Security.* +Protect your hosts and send logs, metrics, and endpoint security data +to Elastic Security. +Refer to {security-guide}/ingest-data.html[Ingest data to Elastic Security] +for more information. -With *Fleet*, you can add -and manage integrations for popular services and platforms, providing -an easy way to collect your data, and manage {elastic-agent} installations in standalone or {fleet} mode. The integrations -ship with dashboards and visualizations, -so you can quickly get insights into your data, and {fleet} mode offers several advantages: +[float] +=== Add data with programming languages -* A central place to configure and monitor your {agents}. +Add any data to the Elastic Stack using a programming language, +such as JavaScript, Java, Python, and Ruby. +Details for each programming language library that Elastic provides are in the +https://www.elastic.co/guide/en/elasticsearch/client/index.html[{es} Client documentation]. -* An overview of the data ingest in your {es} cluster. +If you are running {kib} on our hosted {es} Service, +click *View deployment details* on the *Integrations* view +to verify your {es} endpoint and Cloud ID, and create API keys for integestion. -* Multiple integrations to collect and transform data. +[float] +=== Add sample data -[role="screenshot"] -image::images/addData_fleet_7.15.0.png[Add data using Fleet] +Sample data sets come with sample visualizations, dashboards, and more to help you +explore {kib} before you add your own data. +In the *Integrations* view, search for *Sample Data*, and then add the type of +data you want. -To get started, refer to -{observability-guide}/ingest-logs-metrics-uptime.html[Ingest logs, metrics, and uptime data with {agent}]. +[role="screenshot"] +image::images/add-sample-data.png[eCommerce, flights, and web logs sample data sets that you can explore in Kibana] [discrete] [[upload-data-kibana]] -=== Upload a file +=== Upload a data file If you have a log file or delimited CSV, TSV, or JSON file, you can upload it, view its fields and metrics, and optionally import it into {es}. +In the *Integrations* view, search for *Upload a file*, and then drop your file on the target. -NOTE: This feature is not intended for use as part of a repeated production -process, but rather for the initial exploration of your data. +By default, you can upload a file up to 100 MB. This value is configurable up to 1 GB in +<>. -You can upload a file up to 100 MB. This value is configurable up to 1 GB in -<>. To upload a file with geospatial -data, refer to <>. +NOTE: The upload feature is not intended for use as part of a repeated production +process, but rather for the initial exploration of your data. [role="screenshot"] image::images/add-data-fv.png[Uploading a file in {kib}] @@ -70,22 +89,16 @@ The {stack-security-features} provide roles and privileges that control which users can upload files. To upload a file in {kib} and import it into an {es} index, you'll need: -* `all` {kib} privileges for *Discover* * `manage_pipeline` or `manage_ingest_pipelines` cluster privilege * `create`, `create_index`, `manage`, and `read` index privileges for the index +* `all` {kib} privileges for *Discover* and *Data Views Management* -You can manage your roles, privileges, and spaces in **{stack-manage-app}** in -{kib}. For more information, refer to -<>. +You can manage your roles, privileges, and spaces in **{stack-manage-app}**. [discrete] -=== Additional options for loading your data - -If the {kib} ingest options don't work for you, you can index your -data into Elasticsearch with {ref}/getting-started-index.html[REST APIs] -or https://www.elastic.co/guide/en/elasticsearch/client/index.html[client libraries]. -After you add your data, you're required to create a <> to tell -{kib} where to find the data. +=== What's next? -* To add data for Elastic Observability, refer to {observability-guide}/add-observability-data.html[Send data to Elasticsearch]. -* To add data for Elastic Security, refer to https://www.elastic.co/guide/en/security/current/ingest-data.html[Ingest data to Elastic Security]. +To take your investigation +to a deeper level, use <> and quickly gain insight to your data: +search and filter your data, get information about the structure of the fields, +and analyze your findings in a visualization. diff --git a/docs/setup/images/add-data-fv.png b/docs/setup/images/add-data-fv.png index 062d5ed88b3ca..45edbbc0fdad7 100644 Binary files a/docs/setup/images/add-data-fv.png and b/docs/setup/images/add-data-fv.png differ diff --git a/docs/setup/images/add-data-tutorials.png b/docs/setup/images/add-data-tutorials.png deleted file mode 100644 index 2827d7e3367f8..0000000000000 Binary files a/docs/setup/images/add-data-tutorials.png and /dev/null differ diff --git a/docs/setup/images/add-integration.png b/docs/setup/images/add-integration.png new file mode 100644 index 0000000000000..7c183a7f1e194 Binary files /dev/null and b/docs/setup/images/add-integration.png differ diff --git a/docs/setup/images/add-sample-data.png b/docs/setup/images/add-sample-data.png new file mode 100644 index 0000000000000..4907d6d649f44 Binary files /dev/null and b/docs/setup/images/add-sample-data.png differ diff --git a/docs/setup/images/addData_fleet_7.15.0.png b/docs/setup/images/addData_fleet_7.15.0.png deleted file mode 100644 index 206a079a7f470..0000000000000 Binary files a/docs/setup/images/addData_fleet_7.15.0.png and /dev/null differ diff --git a/docs/setup/images/addData_home_7.15.0.png b/docs/setup/images/addData_home_7.15.0.png deleted file mode 100644 index 36ba6afc27c10..0000000000000 Binary files a/docs/setup/images/addData_home_7.15.0.png and /dev/null differ diff --git a/docs/setup/images/integration-filter.png b/docs/setup/images/integration-filter.png new file mode 100644 index 0000000000000..4d8989679a859 Binary files /dev/null and b/docs/setup/images/integration-filter.png differ diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index 9e2f981e92f92..14c1002fd348a 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -21,7 +21,7 @@ configuration using `${MY_ENV_VAR}` syntax. |=== | `console.ui.enabled:` -Toggling this causes the server to regenerate assets on the next startup, +| Toggling this causes the server to regenerate assets on the next startup, which may cause a delay before pages start being served. Set to `false` to disable Console. *Default: `true`* diff --git a/docs/user/alerting/alerting-getting-started.asciidoc b/docs/user/alerting/alerting-getting-started.asciidoc index 80ad1bb630f53..584d45dc088fd 100644 --- a/docs/user/alerting/alerting-getting-started.asciidoc +++ b/docs/user/alerting/alerting-getting-started.asciidoc @@ -125,18 +125,18 @@ image::images/rule-concepts-summary.svg[Rules, connectors, alerts and actions wo [[alerting-concepts-differences]] == Differences from Watcher -{kib} alerting and <> are both used to detect conditions and can trigger actions in response, but they are completely independent alerting systems. +Alerting and <> are both used to detect conditions and can trigger actions in response, but they are completely independent alerting systems. This section will clarify some of the important differences in the function and intent of the two systems. -Functionally, {kib} alerting differs in that: +Functionally, Alerting differs in that: * Scheduled checks are run on {kib} instead of {es} * {kib} <> through *rule types*, whereas watches provide low-level control over inputs, conditions, and transformations. * {kib} rules track and persist the state of each detected condition through *alerts*. This makes it possible to mute and throttle individual alerts, and detect changes in state such as resolution. -* Actions are linked to *alerts* in {kib} alerting. Actions are fired for each occurrence of a detected condition, rather than for the entire rule. +* Actions are linked to *alerts* in Alerting. Actions are fired for each occurrence of a detected condition, rather than for the entire rule. -At a higher level, {kib} alerting allows rich integrations across use cases like <>, <>, <>, and <>. +At a higher level, Alerting allows rich integrations across use cases like <>, <>, <>, and <>. Pre-packaged *rule types* simplify setup and hide the details of complex, domain-specific detections, while providing a consistent interface across {kib}. -- diff --git a/docs/user/alerting/alerting-setup.asciidoc b/docs/user/alerting/alerting-setup.asciidoc index 9aae3a27cf373..6f8caedde3e18 100644 --- a/docs/user/alerting/alerting-setup.asciidoc +++ b/docs/user/alerting/alerting-setup.asciidoc @@ -5,7 +5,7 @@ Set up ++++ -The Alerting feature is automatically enabled in {kib}, but might require some additional configuration. +Alerting is automatically enabled in {kib}, but might require some additional configuration. [float] [[alerting-prerequisites]] @@ -17,9 +17,9 @@ If you are using an *on-premises* Elastic Stack deployment: If you are using an *on-premises* Elastic Stack deployment with <>: -* If you are unable to access Alerting, ensure that you have not {ref}/security-settings.html#api-key-service-settings[explicitly disabled API keys]. +* If you are unable to access {kib} Alerting, ensure that you have not {ref}/security-settings.html#api-key-service-settings[explicitly disabled API keys]. -The Alerting framework uses queries that require the `search.allow_expensive_queries` setting to be `true`. See the scripts {ref}/query-dsl-script-query.html#_allow_expensive_queries_4[documentation]. +The alerting framework uses queries that require the `search.allow_expensive_queries` setting to be `true`. See the scripts {ref}/query-dsl-script-query.html#_allow_expensive_queries_4[documentation]. [float] [[alerting-setup-production]] @@ -27,7 +27,7 @@ The Alerting framework uses queries that require the `search.allow_expensive_que When relying on alerting and actions as mission critical services, make sure you follow the <>. -See <> for more information on the scalability of {kib} alerting. +See <> for more information on the scalability of Alerting. [float] [[alerting-security]] diff --git a/docs/user/alerting/alerting-troubleshooting.asciidoc b/docs/user/alerting/alerting-troubleshooting.asciidoc index e45a77d48da9c..74a32b94975ad 100644 --- a/docs/user/alerting/alerting-troubleshooting.asciidoc +++ b/docs/user/alerting/alerting-troubleshooting.asciidoc @@ -5,7 +5,7 @@ Troubleshooting ++++ -The Alerting framework provides many options for diagnosing problems with Rules and Connectors. +Alerting provides many options for diagnosing problems with Rules and Connectors. [float] [[alerting-kibana-log]] diff --git a/docs/user/alerting/troubleshooting/alerting-common-issues.asciidoc b/docs/user/alerting/troubleshooting/alerting-common-issues.asciidoc index 408b18143f27f..52153cfdde747 100644 --- a/docs/user/alerting/troubleshooting/alerting-common-issues.asciidoc +++ b/docs/user/alerting/troubleshooting/alerting-common-issues.asciidoc @@ -35,7 +35,7 @@ Actions run long after the status of a rule changes, sending a notification of t *Solution* Rules and actions run as background tasks by each {kib} instance at a default rate of ten tasks every three seconds. -When diagnosing issues related to Alerting, focus on the tasks that begin with `alerting:` and `actions:`. +When diagnosing issues related to alerting, focus on the tasks that begin with `alerting:` and `actions:`. Alerting tasks always begin with `alerting:`. For example, the `alerting:.index-threshold` tasks back the <>. Action tasks always begin with `actions:`. For example, the `actions:.index` tasks back the <>. diff --git a/docs/user/api.asciidoc b/docs/user/api.asciidoc index e17d52675437e..1564d78c8f444 100644 --- a/docs/user/api.asciidoc +++ b/docs/user/api.asciidoc @@ -91,7 +91,7 @@ include::{kib-repo-dir}/api/spaces-management.asciidoc[] include::{kib-repo-dir}/api/role-management.asciidoc[] include::{kib-repo-dir}/api/session-management.asciidoc[] include::{kib-repo-dir}/api/saved-objects.asciidoc[] -include::{kib-repo-dir}/api/index-patterns.asciidoc[] +include::{kib-repo-dir}/api/data-views.asciidoc[] include::{kib-repo-dir}/api/alerting.asciidoc[] include::{kib-repo-dir}/api/actions-and-connectors.asciidoc[] include::{kib-repo-dir}/api/dashboard-api.asciidoc[] diff --git a/docs/user/introduction.asciidoc b/docs/user/introduction.asciidoc index 8972f92831717..fa5801e622706 100644 --- a/docs/user/introduction.asciidoc +++ b/docs/user/introduction.asciidoc @@ -169,9 +169,8 @@ them in bulk operations. === Secure {kib} {kib} offers a range of security features for you to control who has access to what. -The security features are automatically turned on when -{ref}/security-minimal-setup.html[security is enabled in -{es}]. For a description of all available configuration options, +{ref}/configuring-stack-security.html[Security is enabled automatically] when you enroll {kib} with a secured {es} cluster. +For a description of all available configuration options, refer to <>. [float] @@ -234,7 +233,7 @@ To get the most from the search feature, follow these tips: |Search by type |`type:dashboard` -Available types: `application`, `canvas-workpad`, `dashboard`, `index-pattern`, `lens`, `maps`, `query`, `search`, `visualization` +Available types: `application`, `canvas-workpad`, `dashboard`, `data-view`, `lens`, `maps`, `query`, `search`, `visualization` |Search by tag |`tag:mytagname` + diff --git a/docs/user/monitoring/kibana-alerts.asciidoc b/docs/user/monitoring/kibana-alerts.asciidoc index f6deaed7fa3b9..eedc19a189887 100644 --- a/docs/user/monitoring/kibana-alerts.asciidoc +++ b/docs/user/monitoring/kibana-alerts.asciidoc @@ -3,7 +3,7 @@ = {kib} alerts The {stack} {monitor-features} provide -<> out-of-the box to notify you +<> out-of-the box to notify you of potential issues in the {stack}. These rules are preconfigured based on the best practices recommended by Elastic. However, you can tailor them to meet your specific needs. diff --git a/docs/user/production-considerations/task-manager-troubleshooting.asciidoc b/docs/user/production-considerations/task-manager-troubleshooting.asciidoc index 98201087b9aae..09eb304646e96 100644 --- a/docs/user/production-considerations/task-manager-troubleshooting.asciidoc +++ b/docs/user/production-considerations/task-manager-troubleshooting.asciidoc @@ -975,7 +975,7 @@ server log [12:41:33.672] [info][plugins][taskManager][taskManager] TaskManager -------------------------------------------------- If you see that message and no other errors that relate to Task Manager, it’s most likely that Task Manager is running fine and has simply not had the chance to pick the task up yet. -If, on the other hand, the runAt is severely overdue, then it’s worth looking for other Task Manager or Alerting related errors, as something else may have gone wrong. +If, on the other hand, the runAt is severely overdue, then it’s worth looking for other Task Manager or alerting-related errors, as something else may have gone wrong. It’s worth looking at the status field, as it might have failed, which would explain why it hasn’t been picked up or it might be running which means the task might simply be a very long running one. [float] diff --git a/docs/user/security/securing-communications/elasticsearch-mutual-tls.asciidoc b/docs/user/security/securing-communications/elasticsearch-mutual-tls.asciidoc index 1bc1f579ecbc7..d0a0cb49c36bd 100644 --- a/docs/user/security/securing-communications/elasticsearch-mutual-tls.asciidoc +++ b/docs/user/security/securing-communications/elasticsearch-mutual-tls.asciidoc @@ -33,8 +33,7 @@ configures {kib} to authenticate with {es} using a needs to map the client certificate's distinguished name (DN) to the appropriate `kibana_system` role. -NOTE: Using a PKI realm is a gold feature. For a comparison of the Elastic -license levels, see https://www.elastic.co/subscriptions[the subscription page]. +NOTE: Using a PKI realm is a https://www.elastic.co/subscriptions[subscription feature]. [discrete] ==== Configure {kib} and {es} to use mutual TLS authentication diff --git a/docs/user/security/tutorials/how-to-secure-access-to-kibana.asciidoc b/docs/user/security/tutorials/how-to-secure-access-to-kibana.asciidoc index afe76dcabb844..dd913a5bb28d8 100644 --- a/docs/user/security/tutorials/how-to-secure-access-to-kibana.asciidoc +++ b/docs/user/security/tutorials/how-to-secure-access-to-kibana.asciidoc @@ -11,9 +11,9 @@ This guide introduces you to three of {kib}'s security features: spaces, roles, [float] === Spaces -Do you have multiple teams or tenants using {kib}? Do you want a “playground” to experiment with new visualizations or alerts? If so, then <> can help. +Do you have multiple teams or tenants using {kib}? Do you want a “playground” to experiment with new visualizations or rules? If so, then <> can help. -Think of a space as another instance of {kib}. A space allows you to organize your <>, <>, <>, and much more into their own categories. For example, you might have a Marketing space for your marketeers to track the results of their campaigns, and an Engineering space for your developers to {apm-guide-ref}/apm-overview.html[monitor application performance]. +Think of a space as another instance of {kib}. A space allows you to organize your <>, <>, <>, and much more into their own categories. For example, you might have a Marketing space for your marketeers to track the results of their campaigns, and an Engineering space for your developers to {apm-guide-ref}/apm-overview.html[monitor application performance]. The assets you create in one space are isolated from other spaces, so when you enter a space, you only see the assets that belong to that space. diff --git a/examples/embeddable_examples/public/book/book_embeddable.tsx b/examples/embeddable_examples/public/book/book_embeddable.tsx index faf0cb8ab272c..0f25d564e5580 100644 --- a/examples/embeddable_examples/public/book/book_embeddable.tsx +++ b/examples/embeddable_examples/public/book/book_embeddable.tsx @@ -113,7 +113,7 @@ export class BookEmbeddable } public async reload() { - this.attributes = await this.attributeService.unwrapAttributes(this.input); + this.attributes = (await this.attributeService.unwrapAttributes(this.input)).attributes; this.updateOutput({ attributes: this.attributes, diff --git a/examples/embeddable_examples/public/book/book_embeddable_factory.tsx b/examples/embeddable_examples/public/book/book_embeddable_factory.tsx index 727e0fd18a52d..f44446991fde5 100644 --- a/examples/embeddable_examples/public/book/book_embeddable_factory.tsx +++ b/examples/embeddable_examples/public/book/book_embeddable_factory.tsx @@ -115,11 +115,13 @@ export class BookEmbeddableFactoryDefinition }); } - private async unwrapMethod(savedObjectId: string): Promise { + private async unwrapMethod( + savedObjectId: string + ): Promise<{ attributes: BookSavedObjectAttributes }> { const { savedObjectsClient } = await this.getStartServices(); const savedObject: SimpleSavedObject = await savedObjectsClient.get(this.type, savedObjectId); - return { ...savedObject.attributes }; + return { attributes: { ...savedObject.attributes } }; } private async saveMethod(attributes: BookSavedObjectAttributes, savedObjectId?: string) { diff --git a/jest.config.integration.js b/jest.config.integration.js index e2b2afaa715ee..a2ac498986c08 100644 --- a/jest.config.integration.js +++ b/jest.config.integration.js @@ -6,8 +6,22 @@ * Side Public License, v 1. */ +const Fs = require('fs'); +const Path = require('path'); + module.exports = { preset: '@kbn/test/jest_integration', rootDir: '.', - roots: ['/src', '/packages'], + roots: [ + '/src', + '/packages', + ...Fs.readdirSync(Path.resolve(__dirname, 'x-pack')).flatMap((name) => { + // create roots for all x-pack/* dirs except for test + if (name !== 'test' && Fs.statSync(Path.resolve(__dirname, 'x-pack', name)).isDirectory()) { + return [`/x-pack/${name}`]; + } + + return []; + }), + ], }; diff --git a/package.json b/package.json index 1c9b4a842d169..1e5a135b723ed 100644 --- a/package.json +++ b/package.json @@ -79,18 +79,21 @@ "**/chokidar": "^3.4.3", "**/deepmerge": "^4.2.2", "**/fast-deep-equal": "^3.1.1", + "**/handlebars/uglify-js": "^3.14.3", "**/hoist-non-react-statics": "^3.3.2", + "**/html-minifier/uglify-js": "^3.14.3", "**/isomorphic-fetch/node-fetch": "^2.6.1", "**/istanbul-instrumenter-loader/schema-utils": "1.0.0", + "**/json-schema": "^0.4.0", "**/minimist": "^1.2.5", "**/node-jose/node-forge": "^0.10.0", "**/pdfkit/crypto-js": "4.0.0", "**/react-syntax-highlighter": "^15.3.1", "**/react-syntax-highlighter/**/highlight.js": "^10.4.1", "**/trim": "1.0.1", - "**/typescript": "4.1.3", + "**/typescript": "4.3.5", "**/underscore": "^1.13.1", - "globby/fast-glob": "3.2.5" + "globby/fast-glob": "3.2.7" }, "dependencies": { "@babel/runtime": "^7.16.3", @@ -538,7 +541,7 @@ "@types/hapi__inert": "^5.2.3", "@types/has-ansi": "^3.0.0", "@types/he": "^1.1.1", - "@types/history": "^4.7.3", + "@types/history": "^4.7.9", "@types/hjson": "^2.4.2", "@types/http-proxy": "^1.17.4", "@types/http-proxy-agent": "^2.0.2", @@ -558,6 +561,10 @@ "@types/kbn__ace": "link:bazel-bin/packages/kbn-ace/npm_module_types", "@types/kbn__alerts": "link:bazel-bin/packages/kbn-alerts/npm_module_types", "@types/kbn__analytics": "link:bazel-bin/packages/kbn-analytics/npm_module_types", + "@types/kbn__apm-config-loader": "link:bazel-bin/packages/kbn-apm-config-loader/npm_module_types", + "@types/kbn__apm-utils": "link:bazel-bin/packages/kbn-apm-utils/npm_module_types", + "@types/kbn__cli-dev-mode": "link:bazel-bin/packages/kbn-cli-dev-mode/npm_module_types", + "@types/kbn__config": "link:bazel-bin/packages/kbn-config/npm_module_types", "@types/kbn__i18n": "link:bazel-bin/packages/kbn-i18n/npm_module_types", "@types/kbn__i18n-react": "link:bazel-bin/packages/kbn-i18n-react/npm_module_types", "@types/license-checker": "15.0.0", @@ -820,9 +827,9 @@ "terser-webpack-plugin": "^4.2.3", "tough-cookie": "^4.0.0", "ts-loader": "^7.0.5", - "ts-morph": "^9.1.0", + "ts-morph": "^11.0.0", "tsd": "^0.13.1", - "typescript": "4.1.3", + "typescript": "4.3.5", "unlazy-loader": "^0.1.3", "url-loader": "^2.2.0", "val-loader": "^1.1.1", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index dff91679a2d9c..8208496f7d800 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -80,6 +80,10 @@ filegroup( "//packages/kbn-ace:build_types", "//packages/kbn-alerts:build_types", "//packages/kbn-analytics:build_types", + "//packages/kbn-apm-config-loader:build_types", + "//packages/kbn-apm-utils:build_types", + "//packages/kbn-cli-dev-mode:build_types", + "//packages/kbn-config:build_types", "//packages/kbn-i18n:build_types", "//packages/kbn-i18n-react:build_types", ], diff --git a/packages/elastic-apm-synthtrace/src/lib/apm/base_span.ts b/packages/elastic-apm-synthtrace/src/lib/apm/base_span.ts index ba2af8ce9ee53..4fd5ee2698606 100644 --- a/packages/elastic-apm-synthtrace/src/lib/apm/base_span.ts +++ b/packages/elastic-apm-synthtrace/src/lib/apm/base_span.ts @@ -60,6 +60,11 @@ export class BaseSpan extends Serializable { return this; } + outcome(outcome: 'success' | 'failure' | 'unknown') { + this.fields['event.outcome'] = outcome; + return this; + } + serialize(): ApmFields[] { return [this.fields, ...this._children.flatMap((child) => child.serialize())]; } diff --git a/packages/elastic-apm-synthtrace/src/lib/apm/utils/get_transaction_metrics.ts b/packages/elastic-apm-synthtrace/src/lib/apm/utils/get_transaction_metrics.ts index 1595e58957223..8545ae65d8aa0 100644 --- a/packages/elastic-apm-synthtrace/src/lib/apm/utils/get_transaction_metrics.ts +++ b/packages/elastic-apm-synthtrace/src/lib/apm/utils/get_transaction_metrics.ts @@ -66,6 +66,7 @@ export function getTransactionMetrics(events: ApmFields[]) { return { ...metricset.key, + 'metricset.name': 'transaction', 'transaction.duration.histogram': sortAndCompressHistogram(histogram), _doc_count: metricset.events.length, }; diff --git a/packages/elastic-eslint-config-kibana/BUILD.bazel b/packages/elastic-eslint-config-kibana/BUILD.bazel index 628b3a8bf173c..d8b727bf3b6bc 100644 --- a/packages/elastic-eslint-config-kibana/BUILD.bazel +++ b/packages/elastic-eslint-config-kibana/BUILD.bazel @@ -1,4 +1,5 @@ -load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "pkg_npm") PKG_BASE_NAME = "elastic-eslint-config-kibana" PKG_REQUIRE_NAME = "@elastic/eslint-config-kibana" @@ -24,7 +25,7 @@ NPM_MODULE_EXTRA_FILES = [ "README.md", ] -DEPS = [ +RUNTIME_DEPS = [ "//packages/kbn-babel-preset", "//packages/kbn-dev-utils", "@npm//eslint-config-prettier", @@ -36,7 +37,7 @@ js_library( srcs = NPM_MODULE_EXTRA_FILES + [ ":srcs", ], - deps = DEPS, + deps = RUNTIME_DEPS, package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], ) diff --git a/packages/kbn-alerts/BUILD.bazel b/packages/kbn-alerts/BUILD.bazel index 15dbc163cd288..a6e5f167735c0 100644 --- a/packages/kbn-alerts/BUILD.bazel +++ b/packages/kbn-alerts/BUILD.bazel @@ -34,13 +34,11 @@ RUNTIME_DEPS = [ "@npm//@elastic/eui", "@npm//enzyme", "@npm//react", - "@npm//resize-observer-polyfill", ] TYPES_DEPS = [ "//packages/kbn-i18n:npm_module_types", "@npm//@elastic/eui", - "@npm//resize-observer-polyfill", "@npm//tslib", "@npm//@types/enzyme", "@npm//@types/jest", diff --git a/packages/kbn-alerts/tsconfig.json b/packages/kbn-alerts/tsconfig.json index fa18a40744354..ac523fb77a9e1 100644 --- a/packages/kbn-alerts/tsconfig.json +++ b/packages/kbn-alerts/tsconfig.json @@ -8,7 +8,7 @@ "rootDir": "src", "sourceMap": true, "sourceRoot": "../../../../packages/kbn-alerts/src", - "types": ["jest", "node", "resize-observer-polyfill"] + "types": ["jest", "node"] }, "include": ["src/**/*"], } diff --git a/packages/kbn-apm-config-loader/BUILD.bazel b/packages/kbn-apm-config-loader/BUILD.bazel index 731876d5b550c..15491336ed657 100644 --- a/packages/kbn-apm-config-loader/BUILD.bazel +++ b/packages/kbn-apm-config-loader/BUILD.bazel @@ -1,9 +1,10 @@ -load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project") -load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") -load("//src/dev/bazel:index.bzl", "jsts_transpiler") +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_BASE_NAME = "kbn-apm-config-loader" PKG_REQUIRE_NAME = "@kbn/apm-config-loader" +TYPES_PKG_REQUIRE_NAME = "@types/kbn__apm-config-loader" SOURCE_FILES = glob( [ @@ -76,7 +77,7 @@ ts_project( js_library( name = PKG_BASE_NAME, srcs = NPM_MODULE_EXTRA_FILES, - deps = RUNTIME_DEPS + [":target_node", ":tsc_types"], + deps = RUNTIME_DEPS + [":target_node"], package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], ) @@ -95,3 +96,20 @@ filegroup( ], visibility = ["//visibility:public"], ) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = TYPES_PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [ + ":npm_module_types", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-apm-config-loader/package.json b/packages/kbn-apm-config-loader/package.json index cdd4c62b9b8d4..d973d54f41065 100644 --- a/packages/kbn-apm-config-loader/package.json +++ b/packages/kbn-apm-config-loader/package.json @@ -1,7 +1,6 @@ { "name": "@kbn/apm-config-loader", "main": "./target_node/index.js", - "types": "./target_types/index.d.ts", "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", "private": true diff --git a/packages/kbn-apm-config-loader/src/config.ts b/packages/kbn-apm-config-loader/src/config.ts index 6cc0bcdb3f84a..303ec931eeda0 100644 --- a/packages/kbn-apm-config-loader/src/config.ts +++ b/packages/kbn-apm-config-loader/src/config.ts @@ -228,6 +228,7 @@ export class ApmConfiguration { targetBranch: process.env.GITHUB_PR_TARGET_BRANCH || '', ciBuildNumber: process.env.BUILDKITE_BUILD_NUMBER || '', ciBuildId: process.env.BUILDKITE_BUILD_ID || '', + ciBuildJobId: process.env.BUILDKITE_JOB_ID || '', isPr: process.env.BUILDKITE_PULL_REQUEST ? true : false, prId: process.env.BUILDKITE_PULL_REQUEST || '', }, diff --git a/packages/kbn-apm-utils/BUILD.bazel b/packages/kbn-apm-utils/BUILD.bazel index fdfd593476fe7..c8ad4d1a09625 100644 --- a/packages/kbn-apm-utils/BUILD.bazel +++ b/packages/kbn-apm-utils/BUILD.bazel @@ -1,9 +1,10 @@ -load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project") -load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") -load("//src/dev/bazel:index.bzl", "jsts_transpiler") +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_BASE_NAME = "kbn-apm-utils" PKG_REQUIRE_NAME = "@kbn/apm-utils" +TYPES_PKG_REQUIRE_NAME = "@types/kbn__apm-utils" SOURCE_FILES = glob([ "src/index.ts", @@ -61,7 +62,7 @@ ts_project( js_library( name = PKG_BASE_NAME, srcs = NPM_MODULE_EXTRA_FILES, - deps = RUNTIME_DEPS + [":target_node", ":tsc_types"], + deps = RUNTIME_DEPS + [":target_node"], package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], ) @@ -80,3 +81,20 @@ filegroup( ], visibility = ["//visibility:public"], ) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = TYPES_PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [ + ":npm_module_types", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-apm-utils/package.json b/packages/kbn-apm-utils/package.json index 2460bc7c14cce..c57753bc83e50 100644 --- a/packages/kbn-apm-utils/package.json +++ b/packages/kbn-apm-utils/package.json @@ -1,7 +1,6 @@ { "name": "@kbn/apm-utils", "main": "./target_node/index.js", - "types": "./target_types/index.d.ts", "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", "private": true diff --git a/packages/kbn-babel-code-parser/BUILD.bazel b/packages/kbn-babel-code-parser/BUILD.bazel index dcf76b337ff91..06cb6dfff2281 100644 --- a/packages/kbn-babel-code-parser/BUILD.bazel +++ b/packages/kbn-babel-code-parser/BUILD.bazel @@ -1,5 +1,5 @@ -load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") -load("//src/dev/bazel:index.bzl", "jsts_transpiler") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm") PKG_BASE_NAME = "kbn-babel-code-parser" PKG_REQUIRE_NAME = "@kbn/babel-code-parser" diff --git a/packages/kbn-babel-preset/BUILD.bazel b/packages/kbn-babel-preset/BUILD.bazel index ebead1ae0bfbd..8e600eb6b23be 100644 --- a/packages/kbn-babel-preset/BUILD.bazel +++ b/packages/kbn-babel-preset/BUILD.bazel @@ -1,4 +1,5 @@ -load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//src/dev/bazel:index.bzl", "pkg_npm") PKG_BASE_NAME = "kbn-babel-preset" PKG_REQUIRE_NAME = "@kbn/babel-preset" @@ -24,7 +25,7 @@ NPM_MODULE_EXTRA_FILES = [ "README.md", ] -DEPS = [ +RUNTIME_DEPS = [ "@npm//@babel/plugin-proposal-class-properties", "@npm//@babel/plugin-proposal-export-namespace-from", "@npm//@babel/plugin-proposal-nullish-coalescing-operator", @@ -46,7 +47,7 @@ js_library( srcs = NPM_MODULE_EXTRA_FILES + [ ":srcs", ], - deps = DEPS, + deps = RUNTIME_DEPS, package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], ) diff --git a/packages/kbn-cli-dev-mode/BUILD.bazel b/packages/kbn-cli-dev-mode/BUILD.bazel index e66a621781234..c6611e71e35ab 100644 --- a/packages/kbn-cli-dev-mode/BUILD.bazel +++ b/packages/kbn-cli-dev-mode/BUILD.bazel @@ -1,9 +1,10 @@ -load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project") -load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") -load("//src/dev/bazel:index.bzl", "jsts_transpiler") +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_BASE_NAME = "kbn-cli-dev-mode" PKG_REQUIRE_NAME = "@kbn/cli-dev-mode" +TYPES_PKG_REQUIRE_NAME = "@types/kbn__cli-dev-mode" SOURCE_FILES = glob( [ @@ -47,7 +48,7 @@ RUNTIME_DEPS = [ ] TYPES_DEPS = [ - "//packages/kbn-config", + "//packages/kbn-config:npm_module_types", "//packages/kbn-config-schema", "//packages/kbn-dev-utils", "//packages/kbn-logging", @@ -103,7 +104,7 @@ ts_project( js_library( name = PKG_BASE_NAME, srcs = NPM_MODULE_EXTRA_FILES, - deps = RUNTIME_DEPS + [":target_node", ":tsc_types"], + deps = RUNTIME_DEPS + [":target_node"], package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], ) @@ -122,3 +123,20 @@ filegroup( ], visibility = ["//visibility:public"], ) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = TYPES_PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [ + ":npm_module_types", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-cli-dev-mode/package.json b/packages/kbn-cli-dev-mode/package.json index ac5ec227e92c5..80076a9851087 100644 --- a/packages/kbn-cli-dev-mode/package.json +++ b/packages/kbn-cli-dev-mode/package.json @@ -1,7 +1,6 @@ { "name": "@kbn/cli-dev-mode", "main": "./target_node/index.js", - "types": "./target_types/index.d.ts", "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", "private": true, diff --git a/packages/kbn-config/BUILD.bazel b/packages/kbn-config/BUILD.bazel index 061b8306bcc6f..c0b75ab491ac0 100644 --- a/packages/kbn-config/BUILD.bazel +++ b/packages/kbn-config/BUILD.bazel @@ -1,9 +1,10 @@ -load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project") -load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") -load("//src/dev/bazel:index.bzl", "jsts_transpiler") +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_BASE_NAME = "kbn-config" PKG_REQUIRE_NAME = "@kbn/config" +TYPES_PKG_REQUIRE_NAME = "@types/kbn__config" SOURCE_FILES = glob( [ @@ -91,7 +92,7 @@ ts_project( js_library( name = PKG_BASE_NAME, srcs = NPM_MODULE_EXTRA_FILES, - deps = RUNTIME_DEPS + [":target_node", ":tsc_types"], + deps = RUNTIME_DEPS + [":target_node"], package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], ) @@ -110,3 +111,20 @@ filegroup( ], visibility = ["//visibility:public"], ) + +pkg_npm_types( + name = "npm_module_types", + srcs = SRCS, + deps = [":tsc_types"], + package_name = TYPES_PKG_REQUIRE_NAME, + tsconfig = ":tsconfig", + visibility = ["//visibility:public"], +) + +filegroup( + name = "build_types", + srcs = [ + ":npm_module_types", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-config/package.json b/packages/kbn-config/package.json index e30db61ae0c28..012b39d733a78 100644 --- a/packages/kbn-config/package.json +++ b/packages/kbn-config/package.json @@ -1,7 +1,6 @@ { "name": "@kbn/config", "main": "./target_node/index.js", - "types": "./target_types/index.d.ts", "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", "private": true diff --git a/packages/kbn-docs-utils/BUILD.bazel b/packages/kbn-docs-utils/BUILD.bazel index ab018a0ab73b0..6bb37b3500152 100644 --- a/packages/kbn-docs-utils/BUILD.bazel +++ b/packages/kbn-docs-utils/BUILD.bazel @@ -36,7 +36,7 @@ RUNTIME_DEPS = [ ] TYPES_DEPS = [ - "//packages/kbn-config", + "//packages/kbn-config:npm_module_types", "//packages/kbn-dev-utils", "//packages/kbn-utils", "@npm//ts-morph", diff --git a/packages/kbn-docs-utils/src/api_docs/build_api_declarations/buid_api_declaration.test.ts b/packages/kbn-docs-utils/src/api_docs/build_api_declarations/buid_api_declaration.test.ts index 6697dfe53ee36..75c0bf4985b84 100644 --- a/packages/kbn-docs-utils/src/api_docs/build_api_declarations/buid_api_declaration.test.ts +++ b/packages/kbn-docs-utils/src/api_docs/build_api_declarations/buid_api_declaration.test.ts @@ -114,7 +114,8 @@ it('Function inside interface has a label', () => { expect(fn?.type).toBe(TypeKind.FunctionKind); }); -it('Test ReactElement signature', () => { +// FAILING: https://github.com/elastic/kibana/issues/120125 +it.skip('Test ReactElement signature', () => { const node = nodes.find((n) => getNodeName(n) === 'AReactElementFn'); expect(node).toBeDefined(); const def = buildApiDeclarationTopNode(node!, { diff --git a/packages/kbn-docs-utils/src/api_docs/build_api_declarations/build_basic_api_declaration.ts b/packages/kbn-docs-utils/src/api_docs/build_api_declarations/build_basic_api_declaration.ts index d9538467a0984..cb0928fa3763d 100644 --- a/packages/kbn-docs-utils/src/api_docs/build_api_declarations/build_basic_api_declaration.ts +++ b/packages/kbn-docs-utils/src/api_docs/build_api_declarations/build_basic_api_declaration.ts @@ -48,7 +48,7 @@ export function buildBasicApiDeclaration(node: Node, opts: BuildApiDecOpts): Api signature: getSignature(node, opts.plugins, opts.log), path: getSourceForNode(node), deprecated, - removeBy: removeByTag ? removeByTag.getComment() : undefined, + removeBy: removeByTag ? removeByTag.getCommentText() : undefined, }; return { ...apiDec, diff --git a/packages/kbn-docs-utils/src/api_docs/build_api_declarations/js_doc_utils.ts b/packages/kbn-docs-utils/src/api_docs/build_api_declarations/js_doc_utils.ts index 55639f16d7a97..7b6ac5a6ec5f6 100644 --- a/packages/kbn-docs-utils/src/api_docs/build_api_declarations/js_doc_utils.ts +++ b/packages/kbn-docs-utils/src/api_docs/build_api_declarations/js_doc_utils.ts @@ -43,14 +43,14 @@ export function getJSDocs(node: Node): JSDoc[] | undefined { export function getJSDocReturnTagComment(node: Node | JSDoc[]): TextWithLinks { const tags = getJSDocTags(node); const returnTag = tags.find((tag) => Node.isJSDocReturnTag(tag)); - if (returnTag) return getTextWithLinks(returnTag.getComment()); + if (returnTag) return getTextWithLinks(returnTag.getCommentText()); return []; } export function getJSDocParamComment(node: Node | JSDoc[], name: string): TextWithLinks { const tags = getJSDocTags(node); const paramTag = tags.find((tag) => Node.isJSDocParameterTag(tag) && tag.getName() === name); - if (paramTag) return getTextWithLinks(paramTag.getComment()); + if (paramTag) return getTextWithLinks(paramTag.getCommentText()); return []; } diff --git a/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_mdx_docs.ts b/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_mdx_docs.ts index aae77a7508954..fabe55d93c8ef 100644 --- a/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_mdx_docs.ts +++ b/packages/kbn-docs-utils/src/api_docs/mdx/write_plugin_mdx_docs.ts @@ -98,7 +98,7 @@ ${ **Code health stats** -| Public API count | Any count | Items lacking comments | Missing exports | +| Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| | ${pluginStats.apiCount} | ${pluginStats.isAnyType.length} | ${ pluginStats.missingComments.length diff --git a/packages/kbn-docs-utils/src/api_docs/tests/api_doc_suite.test.ts b/packages/kbn-docs-utils/src/api_docs/tests/api_doc_suite.test.ts index 7708eca0ec67a..cf536ce5158c1 100644 --- a/packages/kbn-docs-utils/src/api_docs/tests/api_doc_suite.test.ts +++ b/packages/kbn-docs-utils/src/api_docs/tests/api_doc_suite.test.ts @@ -330,7 +330,7 @@ describe('Types', () => { "section": "def-public.MyProps", "text": "MyProps", }, - ">", + ", string | React.JSXElementConstructor>", ] `); }); diff --git a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json index 0eb9438ce594f..a3b3cdcbe28d0 100644 --- a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json +++ b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json @@ -76,7 +76,7 @@ "label": "component", "description": [], "signature": [ - "React.ComponentClass<{}, any> | React.FunctionComponent<{}> | undefined" + "React.ComponentType<{}> | undefined" ], "path": "packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/plugin_a/public/classes.ts", "deprecated": false @@ -1241,7 +1241,7 @@ "section": "def-public.MyProps", "text": "MyProps" }, - ">" + ", string | React.JSXElementConstructor>" ], "path": "packages/kbn-docs-utils/src/api_docs/tests/__fixtures__/src/plugin_a/public/types.ts", "deprecated": false, @@ -2356,7 +2356,7 @@ "deprecated": false, "children": [], "returnComment": [ - "The currently selected {@link SearchLanguage}" + "The currently selected {@link SearchLanguage }" ] } ], diff --git a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.mdx b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.mdx index 44223783ada57..f6a7893fe5998 100644 --- a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.mdx +++ b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.mdx @@ -16,7 +16,7 @@ Contact Kibana Core for questions regarding this plugin. **Code health stats** -| Public API count | Any count | Items lacking comments | Missing exports | +| Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| | 131 | 1 | 71 | 2 | diff --git a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a_foo.mdx b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a_foo.mdx index b27d6d2de2f8f..13754ad452b01 100644 --- a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a_foo.mdx +++ b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a_foo.mdx @@ -16,7 +16,7 @@ Contact Kibana Core for questions regarding this plugin. **Code health stats** -| Public API count | Any count | Items lacking comments | Missing exports | +| Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| | 131 | 1 | 71 | 2 | diff --git a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_b.mdx b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_b.mdx index df0dec0054497..afc42a59ee96d 100644 --- a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_b.mdx +++ b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_b.mdx @@ -16,7 +16,7 @@ Contact Kibana Core for questions regarding this plugin. **Code health stats** -| Public API count | Any count | Items lacking comments | Missing exports | +| Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| | 2 | 0 | 2 | 0 | diff --git a/packages/kbn-field-types/BUILD.bazel b/packages/kbn-field-types/BUILD.bazel index 1fb97a5914ee4..0492829dd5320 100644 --- a/packages/kbn-field-types/BUILD.bazel +++ b/packages/kbn-field-types/BUILD.bazel @@ -38,7 +38,6 @@ TYPES_DEPS = [ "@npm//@types/node", "@npm//@types/node-forge", "@npm//@types/testing-library__jest-dom", - "@npm//resize-observer-polyfill", "@npm//@emotion/react", "@npm//jest-styled-components", ] diff --git a/packages/kbn-optimizer/BUILD.bazel b/packages/kbn-optimizer/BUILD.bazel index 485e5f1044aa3..cc03c81070745 100644 --- a/packages/kbn-optimizer/BUILD.bazel +++ b/packages/kbn-optimizer/BUILD.bazel @@ -46,12 +46,12 @@ RUNTIME_DEPS = [ "@npm//execa", "@npm//jest-diff", "@npm//json-stable-stringify", + "@npm//js-yaml", "@npm//lmdb-store", "@npm//loader-utils", "@npm//node-sass", "@npm//normalize-path", "@npm//pirates", - "@npm//resize-observer-polyfill", "@npm//rxjs", "@npm//source-map-support", "@npm//watchpack", @@ -62,7 +62,7 @@ RUNTIME_DEPS = [ ] TYPES_DEPS = [ - "//packages/kbn-config", + "//packages/kbn-config:npm_module_types", "//packages/kbn-config-schema", "//packages/kbn-dev-utils", "//packages/kbn-std", @@ -77,12 +77,12 @@ TYPES_DEPS = [ "@npm//jest-diff", "@npm//lmdb-store", "@npm//pirates", - "@npm//resize-observer-polyfill", "@npm//rxjs", "@npm//zlib", "@npm//@types/compression-webpack-plugin", "@npm//@types/jest", "@npm//@types/json-stable-stringify", + "@npm//@types/js-yaml", "@npm//@types/loader-utils", "@npm//@types/node", "@npm//@types/normalize-path", diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index e08b34f70b2a1..41c4d3bdd1b35 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -96,6 +96,7 @@ pageLoadAssetSize: securitySolution: 273763 customIntegrations: 28810 expressionMetricVis: 23121 + expressionHeatmap: 27505 visTypeMetric: 23332 bfetch: 22837 kibanaUtils: 79713 @@ -115,3 +116,4 @@ pageLoadAssetSize: dataViewFieldEditor: 20000 dataViewManagement: 5000 reporting: 57003 + visTypeHeatmap: 25340 diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index ab8b9766f28d0..c1d0f69e4ea07 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -94,21 +94,21 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _cli__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "run", function() { return _cli__WEBPACK_IMPORTED_MODULE_0__["run"]; }); -/* harmony import */ var _production__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(569); +/* harmony import */ var _production__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(563); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildBazelProductionProjects", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["buildBazelProductionProjects"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildNonBazelProductionProjects", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["buildNonBazelProductionProjects"]; }); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(346); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(340); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getProjects", function() { return _utils_projects__WEBPACK_IMPORTED_MODULE_2__["getProjects"]; }); -/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(348); +/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(342); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Project", function() { return _utils_project__WEBPACK_IMPORTED_MODULE_3__["Project"]; }); -/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(349); +/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(343); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transformDependencies", function() { return _utils_package_json__WEBPACK_IMPORTED_MODULE_4__["transformDependencies"]; }); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(568); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(562); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getProjectPaths", function() { return _config__WEBPACK_IMPORTED_MODULE_5__["getProjectPaths"]; }); /* @@ -141,7 +141,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _kbn_dev_utils_tooling_log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5); /* harmony import */ var _kbn_dev_utils_tooling_log__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_kbn_dev_utils_tooling_log__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(129); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(563); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(557); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(220); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one @@ -8811,12 +8811,12 @@ exports.ToolingLogCollectingWriter = ToolingLogCollectingWriter; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commands", function() { return commands; }); /* harmony import */ var _bootstrap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(130); -/* harmony import */ var _build__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(533); -/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(534); -/* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(558); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(559); -/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(561); -/* harmony import */ var _patch_native_modules__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(562); +/* harmony import */ var _build__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(527); +/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(528); +/* harmony import */ var _reset__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(552); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(553); +/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(555); +/* harmony import */ var _patch_native_modules__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(556); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -8855,11 +8855,11 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220); /* harmony import */ var _utils_child_process__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(221); /* harmony import */ var _utils_link_project_executables__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(230); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(346); -/* harmony import */ var _utils_yarn_lock__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(414); -/* harmony import */ var _utils_sort_package_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(417); -/* harmony import */ var _utils_validate_dependencies__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(425); -/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(427); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(340); +/* harmony import */ var _utils_yarn_lock__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(408); +/* harmony import */ var _utils_sort_package_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(411); +/* harmony import */ var _utils_validate_dependencies__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(419); +/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(421); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -16552,7 +16552,7 @@ __webpack_require__.r(__webpack_exports__); /* 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__(132); /* 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__(345); +/* harmony import */ var ncp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(339); /* 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__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_4__); @@ -17966,12 +17966,12 @@ const {promisify} = __webpack_require__(113); const path = __webpack_require__(4); const globby = __webpack_require__(241); const isGlob = __webpack_require__(266); -const slash = __webpack_require__(336); +const slash = __webpack_require__(330); const gracefulFs = __webpack_require__(233); -const isPathCwd = __webpack_require__(338); -const isPathInside = __webpack_require__(339); -const rimraf = __webpack_require__(340); -const pMap = __webpack_require__(341); +const isPathCwd = __webpack_require__(332); +const isPathInside = __webpack_require__(333); +const rimraf = __webpack_require__(334); +const pMap = __webpack_require__(335); const rimrafP = promisify(rimraf); @@ -18095,9 +18095,9 @@ const arrayUnion = __webpack_require__(242); const merge2 = __webpack_require__(243); const glob = __webpack_require__(244); const fastGlob = __webpack_require__(257); -const dirGlob = __webpack_require__(332); -const gitignore = __webpack_require__(334); -const {FilterStream, UniqueStream} = __webpack_require__(337); +const dirGlob = __webpack_require__(326); +const gitignore = __webpack_require__(328); +const {FilterStream, UniqueStream} = __webpack_require__(331); const DEFAULT_FILTER = () => false; @@ -21708,73 +21708,73 @@ function slice (args) { /***/ (function(module, exports, __webpack_require__) { "use strict"; - -const taskManager = __webpack_require__(258); -const async_1 = __webpack_require__(293); -const stream_1 = __webpack_require__(328); -const sync_1 = __webpack_require__(329); -const settings_1 = __webpack_require__(331); -const utils = __webpack_require__(259); -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; + +const taskManager = __webpack_require__(258); +const async_1 = __webpack_require__(287); +const stream_1 = __webpack_require__(322); +const sync_1 = __webpack_require__(323); +const settings_1 = __webpack_require__(325); +const utils = __webpack_require__(259); +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; /***/ }), @@ -21782,71 +21782,86 @@ module.exports = FastGlob; /***/ (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__(259); -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; -function convertPatternsToTasks(positive, negative, dynamic) { - const positivePatternsGroup = groupPatternsByBaseDirectory(positive); - // When we have a global group – there is no reason to divide the patterns into independent tasks. - // In this case, the global task covers the rest. - if ('.' in positivePatternsGroup) { - const task = convertPatternGroupToTask('.', positive, negative, dynamic); - return [task]; - } - return convertPatternGroupsToTasks(positivePatternsGroup, negative, dynamic); -} -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; + +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__(259); +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; /***/ }), @@ -21854,23 +21869,23 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ (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__(260); -exports.array = array; -const errno = __webpack_require__(261); -exports.errno = errno; -const fs = __webpack_require__(262); -exports.fs = fs; -const path = __webpack_require__(263); -exports.path = path; -const pattern = __webpack_require__(264); -exports.pattern = pattern; -const stream = __webpack_require__(291); -exports.stream = stream; -const string = __webpack_require__(292); -exports.string = string; + +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__(260); +exports.array = array; +const errno = __webpack_require__(261); +exports.errno = errno; +const fs = __webpack_require__(262); +exports.fs = fs; +const path = __webpack_require__(263); +exports.path = path; +const pattern = __webpack_require__(264); +exports.pattern = pattern; +const stream = __webpack_require__(285); +exports.stream = stream; +const string = __webpack_require__(286); +exports.string = string; /***/ }), @@ -21878,28 +21893,28 @@ exports.string = string; /***/ (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; + +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; /***/ }), @@ -21907,13 +21922,13 @@ exports.splitWhen = splitWhen; /***/ (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; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEnoentCodeError = void 0; +function isEnoentCodeError(error) { + return error.code === 'ENOENT'; +} +exports.isEnoentCodeError = isEnoentCodeError; /***/ }), @@ -21921,25 +21936,25 @@ exports.isEnoentCodeError = isEnoentCodeError; /***/ (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; + +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; /***/ }), @@ -21947,39 +21962,39 @@ exports.createDirentFromStats = createDirentFromStats; /***/ (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__(4); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0; +const path = __webpack_require__(4); +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; /***/ }), @@ -21987,138 +22002,163 @@ exports.removeLeadingDotSegment = removeLeadingDotSegment; /***/ (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.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; -const path = __webpack_require__(4); -const globParent = __webpack_require__(265); -const micromatch = __webpack_require__(268); -const picomatch = __webpack_require__(285); -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; -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 } = picomatch.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; + +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__(4); +const globParent = __webpack_require__(265); +const micromatch = __webpack_require__(268); +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; /***/ }), @@ -26436,2237 +26476,149 @@ module.exports = parse; "use strict"; - -module.exports = __webpack_require__(286); - - -/***/ }), -/* 286 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__(4); -const scan = __webpack_require__(287); -const parse = __webpack_require__(290); -const utils = __webpack_require__(288); -const constants = __webpack_require__(289); -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); - -/** - * 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` - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return parsed.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${parsed.output})${append}`; - if (parsed && parsed.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = parsed; - } - - return regex; -}; - -picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - const opts = options || {}; - let parsed = { negated: false, fastpaths: true }; - let prefix = ''; - let output; - - if (input.startsWith('./')) { - input = input.slice(2); - prefix = parsed.prefix = './'; - } - - if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - output = parse.fastpaths(input, options); - } - - if (output === undefined) { - parsed = parse(input, options); - parsed.prefix = prefix + (parsed.prefix || ''); - } else { - parsed.output = output; - } - - 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; - - -/***/ }), -/* 287 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const utils = __webpack_require__(288); -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__(289); - -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), and `negated` (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 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 (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; - - 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 - }; - - 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; - - -/***/ }), -/* 288 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__(4); -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = __webpack_require__(289); - -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; -}; - - -/***/ }), -/* 289 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const path = __webpack_require__(4); -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; - } -}; - - -/***/ }), -/* 290 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -const constants = __webpack_require__(289); -const utils = __webpack_require__(288); - -/** - * 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' && !EXTGLOB_CHARS[tok.value]) { - 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 ? ')' : ''); - - 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.prev.type === 'bos' && eos()) { - 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; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.merge = void 0; +const merge2 = __webpack_require__(243); +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')); +} /***/ }), -/* 291 */ +/* 286 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.merge = void 0; -const merge2 = __webpack_require__(243); -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')); -} - - -/***/ }), -/* 292 */ -/***/ (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; +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; /***/ }), -/* 293 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__(294); -const provider_1 = __webpack_require__(321); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = __webpack_require__(288); +const provider_1 = __webpack_require__(315); +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; /***/ }), -/* 294 */ +/* 288 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__(173); -const fsStat = __webpack_require__(295); -const fsWalk = __webpack_require__(300); -const reader_1 = __webpack_require__(320); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = __webpack_require__(173); +const fsStat = __webpack_require__(289); +const fsWalk = __webpack_require__(294); +const reader_1 = __webpack_require__(314); +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; /***/ }), -/* 295 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async = __webpack_require__(296); -const sync = __webpack_require__(297); -const settings_1 = __webpack_require__(298); +const async = __webpack_require__(290); +const sync = __webpack_require__(291); +const settings_1 = __webpack_require__(292); exports.Settings = settings_1.default; function stat(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { @@ -28689,7 +26641,7 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/* 296 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28727,7 +26679,7 @@ function callSuccessCallback(callback, result) { /***/ }), -/* 297 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28756,13 +26708,13 @@ exports.read = read; /***/ }), -/* 298 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__(299); +const fs = __webpack_require__(293); class Settings { constructor(_options = {}) { this._options = _options; @@ -28779,7 +26731,7 @@ exports.default = Settings; /***/ }), -/* 299 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -28802,16 +26754,16 @@ exports.createFileSystemAdapter = createFileSystemAdapter; /***/ }), -/* 300 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async_1 = __webpack_require__(301); -const stream_1 = __webpack_require__(316); -const sync_1 = __webpack_require__(317); -const settings_1 = __webpack_require__(319); +const async_1 = __webpack_require__(295); +const stream_1 = __webpack_require__(310); +const sync_1 = __webpack_require__(311); +const settings_1 = __webpack_require__(313); exports.Settings = settings_1.default; function walk(directory, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { @@ -28841,13 +26793,13 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/* 301 */ +/* 295 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async_1 = __webpack_require__(302); +const async_1 = __webpack_require__(296); class AsyncProvider { constructor(_root, _settings) { this._root = _root; @@ -28878,17 +26830,17 @@ function callSuccessCallback(callback, entries) { /***/ }), -/* 302 */ +/* 296 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const events_1 = __webpack_require__(164); -const fsScandir = __webpack_require__(303); -const fastq = __webpack_require__(312); -const common = __webpack_require__(314); -const reader_1 = __webpack_require__(315); +const fsScandir = __webpack_require__(297); +const fastq = __webpack_require__(306); +const common = __webpack_require__(308); +const reader_1 = __webpack_require__(309); class AsyncReader extends reader_1.default { constructor(_root, _settings) { super(_root, _settings); @@ -28978,15 +26930,15 @@ exports.default = AsyncReader; /***/ }), -/* 303 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async = __webpack_require__(304); -const sync = __webpack_require__(309); -const settings_1 = __webpack_require__(310); +const async = __webpack_require__(298); +const sync = __webpack_require__(303); +const settings_1 = __webpack_require__(304); exports.Settings = settings_1.default; function scandir(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { @@ -29009,16 +26961,16 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/* 304 */ +/* 298 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__(295); -const rpl = __webpack_require__(305); -const constants_1 = __webpack_require__(306); -const utils = __webpack_require__(307); +const fsStat = __webpack_require__(289); +const rpl = __webpack_require__(299); +const constants_1 = __webpack_require__(300); +const utils = __webpack_require__(301); function read(directory, settings, callback) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(directory, settings, callback); @@ -29106,7 +27058,7 @@ function callSuccessCallback(callback, result) { /***/ }), -/* 305 */ +/* 299 */ /***/ (function(module, exports) { module.exports = runParallel @@ -29160,7 +27112,7 @@ function runParallel (tasks, cb) { /***/ }), -/* 306 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29180,18 +27132,18 @@ exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_B /***/ }), -/* 307 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__(308); +const fs = __webpack_require__(302); exports.fs = fs; /***/ }), -/* 308 */ +/* 302 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29216,15 +27168,15 @@ exports.createDirentFromStats = createDirentFromStats; /***/ }), -/* 309 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__(295); -const constants_1 = __webpack_require__(306); -const utils = __webpack_require__(307); +const fsStat = __webpack_require__(289); +const constants_1 = __webpack_require__(300); +const utils = __webpack_require__(301); function read(directory, settings) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(directory, settings); @@ -29275,15 +27227,15 @@ exports.readdir = readdir; /***/ }), -/* 310 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(4); -const fsStat = __webpack_require__(295); -const fs = __webpack_require__(311); +const fsStat = __webpack_require__(289); +const fs = __webpack_require__(305); class Settings { constructor(_options = {}) { this._options = _options; @@ -29306,7 +27258,7 @@ exports.default = Settings; /***/ }), -/* 311 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29331,13 +27283,13 @@ exports.createFileSystemAdapter = createFileSystemAdapter; /***/ }), -/* 312 */ +/* 306 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var reusify = __webpack_require__(313) +var reusify = __webpack_require__(307) function fastqueue (context, worker, concurrency) { if (typeof context === 'function') { @@ -29511,7 +27463,7 @@ module.exports = fastqueue /***/ }), -/* 313 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29551,7 +27503,7 @@ module.exports = reusify /***/ }), -/* 314 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29582,13 +27534,13 @@ exports.joinPathSegments = joinPathSegments; /***/ }), -/* 315 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const common = __webpack_require__(314); +const common = __webpack_require__(308); class Reader { constructor(_root, _settings) { this._root = _root; @@ -29600,14 +27552,14 @@ exports.default = Reader; /***/ }), -/* 316 */ +/* 310 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const stream_1 = __webpack_require__(173); -const async_1 = __webpack_require__(302); +const async_1 = __webpack_require__(296); class StreamProvider { constructor(_root, _settings) { this._root = _root; @@ -29637,13 +27589,13 @@ exports.default = StreamProvider; /***/ }), -/* 317 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const sync_1 = __webpack_require__(318); +const sync_1 = __webpack_require__(312); class SyncProvider { constructor(_root, _settings) { this._root = _root; @@ -29658,15 +27610,15 @@ exports.default = SyncProvider; /***/ }), -/* 318 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsScandir = __webpack_require__(303); -const common = __webpack_require__(314); -const reader_1 = __webpack_require__(315); +const fsScandir = __webpack_require__(297); +const common = __webpack_require__(308); +const reader_1 = __webpack_require__(309); class SyncReader extends reader_1.default { constructor() { super(...arguments); @@ -29724,14 +27676,14 @@ exports.default = SyncReader; /***/ }), -/* 319 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(4); -const fsScandir = __webpack_require__(303); +const fsScandir = __webpack_require__(297); class Settings { constructor(_options = {}) { this._options = _options; @@ -29757,579 +27709,579 @@ exports.default = Settings; /***/ }), -/* 320 */ +/* 314 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const path = __webpack_require__(4); -const fsStat = __webpack_require__(295); -const utils = __webpack_require__(259); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const path = __webpack_require__(4); +const fsStat = __webpack_require__(289); +const utils = __webpack_require__(259); +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; /***/ }), -/* 321 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const path = __webpack_require__(4); -const deep_1 = __webpack_require__(322); -const entry_1 = __webpack_require__(325); -const error_1 = __webpack_require__(326); -const entry_2 = __webpack_require__(327); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const path = __webpack_require__(4); +const deep_1 = __webpack_require__(316); +const entry_1 = __webpack_require__(319); +const error_1 = __webpack_require__(320); +const entry_2 = __webpack_require__(321); +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; /***/ }), -/* 322 */ +/* 316 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(259); -const partial_1 = __webpack_require__(323); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = __webpack_require__(259); +const partial_1 = __webpack_require__(317); +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; /***/ }), -/* 323 */ +/* 317 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const matcher_1 = __webpack_require__(324); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const matcher_1 = __webpack_require__(318); +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; /***/ }), -/* 324 */ +/* 318 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(259); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = __webpack_require__(259); +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; /***/ }), -/* 325 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(259); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = __webpack_require__(259); +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; /***/ }), -/* 326 */ +/* 320 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(259); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = __webpack_require__(259); +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; /***/ }), -/* 327 */ +/* 321 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(259); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = __webpack_require__(259); +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; /***/ }), -/* 328 */ +/* 322 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__(173); -const stream_2 = __webpack_require__(294); -const provider_1 = __webpack_require__(321); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = __webpack_require__(173); +const stream_2 = __webpack_require__(288); +const provider_1 = __webpack_require__(315); +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; /***/ }), -/* 329 */ +/* 323 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const sync_1 = __webpack_require__(330); -const provider_1 = __webpack_require__(321); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const sync_1 = __webpack_require__(324); +const provider_1 = __webpack_require__(315); +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; /***/ }), -/* 330 */ +/* 324 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__(295); -const fsWalk = __webpack_require__(300); -const reader_1 = __webpack_require__(320); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const fsStat = __webpack_require__(289); +const fsWalk = __webpack_require__(294); +const reader_1 = __webpack_require__(314); +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; /***/ }), -/* 331 */ +/* 325 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; -const fs = __webpack_require__(132); -const os = __webpack_require__(122); -/** - * 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; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; +const fs = __webpack_require__(132); +const os = __webpack_require__(122); +/** + * 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; /***/ }), -/* 332 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const pathType = __webpack_require__(333); +const pathType = __webpack_require__(327); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; @@ -30405,7 +28357,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 333 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30455,7 +28407,7 @@ exports.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink'); /***/ }), -/* 334 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -30464,8 +28416,8 @@ const {promisify} = __webpack_require__(113); const fs = __webpack_require__(132); const path = __webpack_require__(4); const fastGlob = __webpack_require__(257); -const gitIgnore = __webpack_require__(335); -const slash = __webpack_require__(336); +const gitIgnore = __webpack_require__(329); +const slash = __webpack_require__(330); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -30579,7 +28531,7 @@ module.exports.sync = options => { /***/ }), -/* 335 */ +/* 329 */ /***/ (function(module, exports) { // A simple implementation of make-array @@ -31182,7 +29134,7 @@ if ( /***/ }), -/* 336 */ +/* 330 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31200,7 +29152,7 @@ module.exports = path => { /***/ }), -/* 337 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31253,7 +29205,7 @@ module.exports = { /***/ }), -/* 338 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31275,7 +29227,7 @@ module.exports = path_ => { /***/ }), -/* 339 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31303,7 +29255,7 @@ module.exports = (childPath, parentPath) => { /***/ }), -/* 340 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { const assert = __webpack_require__(162) @@ -31669,12 +29621,12 @@ rimraf.sync = rimrafSync /***/ }), -/* 341 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const AggregateError = __webpack_require__(342); +const AggregateError = __webpack_require__(336); module.exports = async ( iterable, @@ -31757,13 +29709,13 @@ module.exports = async ( /***/ }), -/* 342 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const indentString = __webpack_require__(343); -const cleanStack = __webpack_require__(344); +const indentString = __webpack_require__(337); +const cleanStack = __webpack_require__(338); const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); @@ -31811,7 +29763,7 @@ module.exports = AggregateError; /***/ }), -/* 343 */ +/* 337 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31853,7 +29805,7 @@ module.exports = (string, count = 1, options) => { /***/ }), -/* 344 */ +/* 338 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31900,7 +29852,7 @@ module.exports = (stack, options) => { /***/ }), -/* 345 */ +/* 339 */ /***/ (function(module, exports, __webpack_require__) { var fs = __webpack_require__(132), @@ -32167,7 +30119,7 @@ function ncp (source, dest, options, callback) { /***/ }), -/* 346 */ +/* 340 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -32184,8 +30136,8 @@ __webpack_require__.r(__webpack_exports__); /* 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__(113); /* 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__(347); -/* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(348); +/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(341); +/* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(342); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -32360,7 +30312,7 @@ function includeTransitiveProjects(subsetOfProjects, allProjects, { } /***/ }), -/* 347 */ +/* 341 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -32382,7 +30334,7 @@ class CliError extends Error { } /***/ }), -/* 348 */ +/* 342 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -32394,10 +30346,10 @@ __webpack_require__.r(__webpack_exports__); /* 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__(113); /* 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__(347); +/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(341); /* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(220); -/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(349); -/* harmony import */ var _scripts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(413); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(343); +/* harmony import */ var _scripts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(407); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -32590,7 +30542,7 @@ function normalizePath(path) { } /***/ }), -/* 349 */ +/* 343 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -32601,9 +30553,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLinkDependency", function() { return isLinkDependency; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBazelPackageDependency", function() { return isBazelPackageDependency; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformDependencies", function() { return transformDependencies; }); -/* harmony import */ var read_pkg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(350); +/* harmony import */ var read_pkg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(344); /* 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__(402); +/* harmony import */ var write_pkg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(396); /* harmony import */ var write_pkg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(write_pkg__WEBPACK_IMPORTED_MODULE_1__); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } @@ -32671,7 +30623,7 @@ function transformDependencies(dependencies = {}) { } /***/ }), -/* 350 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32679,7 +30631,7 @@ function transformDependencies(dependencies = {}) { const {promisify} = __webpack_require__(113); const fs = __webpack_require__(132); const path = __webpack_require__(4); -const parseJson = __webpack_require__(351); +const parseJson = __webpack_require__(345); const readFileAsync = promisify(fs.readFile); @@ -32694,7 +30646,7 @@ module.exports = async options => { const json = parseJson(await readFileAsync(filePath, 'utf8')); if (options.normalize) { - __webpack_require__(372)(json); + __webpack_require__(366)(json); } return json; @@ -32711,7 +30663,7 @@ module.exports.sync = options => { const json = parseJson(fs.readFileSync(filePath, 'utf8')); if (options.normalize) { - __webpack_require__(372)(json); + __webpack_require__(366)(json); } return json; @@ -32719,15 +30671,15 @@ module.exports.sync = options => { /***/ }), -/* 351 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const errorEx = __webpack_require__(352); -const fallback = __webpack_require__(354); -const {default: LinesAndColumns} = __webpack_require__(355); -const {codeFrameColumns} = __webpack_require__(356); +const errorEx = __webpack_require__(346); +const fallback = __webpack_require__(348); +const {default: LinesAndColumns} = __webpack_require__(349); +const {codeFrameColumns} = __webpack_require__(350); const JSONError = errorEx('JSONError', { fileName: errorEx.append('in %s'), @@ -32776,14 +30728,14 @@ module.exports = (string, reviver, filename) => { /***/ }), -/* 352 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(113); -var isArrayish = __webpack_require__(353); +var isArrayish = __webpack_require__(347); var errorEx = function errorEx(name, properties) { if (!name || name.constructor !== String) { @@ -32916,7 +30868,7 @@ module.exports = errorEx; /***/ }), -/* 353 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32933,7 +30885,7 @@ module.exports = function isArrayish(obj) { /***/ }), -/* 354 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -32978,7 +30930,7 @@ function parseJson (txt, reviver, context) { /***/ }), -/* 355 */ +/* 349 */ /***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; @@ -33042,7 +30994,7 @@ var LinesAndColumns = (function () { /***/ }), -/* 356 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33054,7 +31006,7 @@ Object.defineProperty(exports, "__esModule", { exports.codeFrameColumns = codeFrameColumns; exports.default = _default; -var _highlight = __webpack_require__(357); +var _highlight = __webpack_require__(351); let deprecationWarningShown = false; @@ -33211,7 +31163,7 @@ function _default(rawLines, lineNumber, colNumber, opts = {}) { } /***/ }), -/* 357 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33224,11 +31176,11 @@ exports.default = highlight; exports.getChalk = getChalk; exports.shouldHighlight = shouldHighlight; -var _jsTokens = __webpack_require__(358); +var _jsTokens = __webpack_require__(352); -var _helperValidatorIdentifier = __webpack_require__(359); +var _helperValidatorIdentifier = __webpack_require__(353); -var _chalk = __webpack_require__(362); +var _chalk = __webpack_require__(356); const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); @@ -33333,7 +31285,7 @@ function highlight(code, options = {}) { } /***/ }), -/* 358 */ +/* 352 */ /***/ (function(module, exports) { // Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell @@ -33362,7 +31314,7 @@ exports.matchToToken = function(match) { /***/ }), -/* 359 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33420,12 +31372,12 @@ Object.defineProperty(exports, "isKeyword", { } }); -var _identifier = __webpack_require__(360); +var _identifier = __webpack_require__(354); -var _keyword = __webpack_require__(361); +var _keyword = __webpack_require__(355); /***/ }), -/* 360 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33515,7 +31467,7 @@ function isIdentifierName(name) { } /***/ }), -/* 361 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33559,16 +31511,16 @@ function isKeyword(word) { } /***/ }), -/* 362 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const escapeStringRegexp = __webpack_require__(363); -const ansiStyles = __webpack_require__(364); -const stdoutColor = __webpack_require__(369).stdout; +const escapeStringRegexp = __webpack_require__(357); +const ansiStyles = __webpack_require__(358); +const stdoutColor = __webpack_require__(363).stdout; -const template = __webpack_require__(371); +const template = __webpack_require__(365); const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); @@ -33794,7 +31746,7 @@ module.exports.default = module.exports; // For TypeScript /***/ }), -/* 363 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33812,12 +31764,12 @@ module.exports = function (str) { /***/ }), -/* 364 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(module) { -const colorConvert = __webpack_require__(365); +const colorConvert = __webpack_require__(359); const wrapAnsi16 = (fn, offset) => function () { const code = fn.apply(colorConvert, arguments); @@ -33985,11 +31937,11 @@ Object.defineProperty(module, 'exports', { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(116)(module))) /***/ }), -/* 365 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { -var conversions = __webpack_require__(366); -var route = __webpack_require__(368); +var conversions = __webpack_require__(360); +var route = __webpack_require__(362); var convert = {}; @@ -34069,11 +32021,11 @@ module.exports = convert; /***/ }), -/* 366 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ -var cssKeywords = __webpack_require__(367); +var cssKeywords = __webpack_require__(361); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). @@ -34943,7 +32895,7 @@ convert.rgb.gray = function (rgb) { /***/ }), -/* 367 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35102,10 +33054,10 @@ module.exports = { /***/ }), -/* 368 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { -var conversions = __webpack_require__(366); +var conversions = __webpack_require__(360); /* this function routes a model to all other models. @@ -35205,13 +33157,13 @@ module.exports = function (fromModel) { /***/ }), -/* 369 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const os = __webpack_require__(122); -const hasFlag = __webpack_require__(370); +const hasFlag = __webpack_require__(364); const env = process.env; @@ -35343,7 +33295,7 @@ module.exports = { /***/ }), -/* 370 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35358,7 +33310,7 @@ module.exports = (flag, argv) => { /***/ }), -/* 371 */ +/* 365 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35493,15 +33445,15 @@ module.exports = (chalk, tmp) => { /***/ }), -/* 372 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { module.exports = normalize -var fixer = __webpack_require__(373) +var fixer = __webpack_require__(367) normalize.fixer = fixer -var makeWarning = __webpack_require__(400) +var makeWarning = __webpack_require__(394) var fieldsToFix = ['name','version','description','repository','modules','scripts' ,'files','bin','man','bugs','keywords','readme','homepage','license'] @@ -35538,17 +33490,17 @@ function ucFirst (string) { /***/ }), -/* 373 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { -var semver = __webpack_require__(374) -var validateLicense = __webpack_require__(375); -var hostedGitInfo = __webpack_require__(380) -var isBuiltinModule = __webpack_require__(383).isCore +var semver = __webpack_require__(368) +var validateLicense = __webpack_require__(369); +var hostedGitInfo = __webpack_require__(374) +var isBuiltinModule = __webpack_require__(377).isCore var depTypes = ["dependencies","devDependencies","optionalDependencies"] -var extractDescription = __webpack_require__(398) +var extractDescription = __webpack_require__(392) var url = __webpack_require__(203) -var typos = __webpack_require__(399) +var typos = __webpack_require__(393) var fixer = module.exports = { // default warning function @@ -35962,7 +33914,7 @@ function bugsTypos(bugs, warn) { /***/ }), -/* 374 */ +/* 368 */ /***/ (function(module, exports) { exports = module.exports = SemVer @@ -37451,11 +35403,11 @@ function coerce (version) { /***/ }), -/* 375 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { -var parse = __webpack_require__(376); -var correct = __webpack_require__(378); +var parse = __webpack_require__(370); +var correct = __webpack_require__(372); var genericWarning = ( 'license should be ' + @@ -37541,10 +35493,10 @@ module.exports = function(argument) { /***/ }), -/* 376 */ +/* 370 */ /***/ (function(module, exports, __webpack_require__) { -var parser = __webpack_require__(377).parser +var parser = __webpack_require__(371).parser module.exports = function (argument) { return parser.parse(argument) @@ -37552,7 +35504,7 @@ module.exports = function (argument) { /***/ }), -/* 377 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {/* parser generated by jison 0.4.17 */ @@ -38916,10 +36868,10 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(116)(module))) /***/ }), -/* 378 */ +/* 372 */ /***/ (function(module, exports, __webpack_require__) { -var licenseIDs = __webpack_require__(379); +var licenseIDs = __webpack_require__(373); function valid(string) { return licenseIDs.indexOf(string) > -1; @@ -39159,20 +37111,20 @@ module.exports = function(identifier) { /***/ }), -/* 379 */ +/* 373 */ /***/ (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\"]"); /***/ }), -/* 380 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var url = __webpack_require__(203) -var gitHosts = __webpack_require__(381) -var GitHost = module.exports = __webpack_require__(382) +var gitHosts = __webpack_require__(375) +var GitHost = module.exports = __webpack_require__(376) var protocolToRepresentationMap = { 'git+ssh:': 'sshurl', @@ -39320,7 +37272,7 @@ function parseGitUrl (giturl) { /***/ }), -/* 381 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39406,12 +37358,12 @@ function formatHashFragment (fragment) { /***/ }), -/* 382 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var gitHosts = __webpack_require__(381) +var gitHosts = __webpack_require__(375) /* eslint-disable node/no-deprecated-api */ // copy-pasta util._extend from node's source, to avoid pulling @@ -39569,27 +37521,27 @@ GitHost.prototype.toString = function (opts) { /***/ }), -/* 383 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { -var async = __webpack_require__(384); -async.core = __webpack_require__(394); -async.isCore = __webpack_require__(396); -async.sync = __webpack_require__(397); +var async = __webpack_require__(378); +async.core = __webpack_require__(388); +async.isCore = __webpack_require__(390); +async.sync = __webpack_require__(391); module.exports = async; /***/ }), -/* 384 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { var fs = __webpack_require__(132); var path = __webpack_require__(4); -var caller = __webpack_require__(385); -var nodeModulesPaths = __webpack_require__(386); -var normalizeOptions = __webpack_require__(388); -var isCore = __webpack_require__(389); +var caller = __webpack_require__(379); +var nodeModulesPaths = __webpack_require__(380); +var normalizeOptions = __webpack_require__(382); +var isCore = __webpack_require__(383); var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; @@ -39907,7 +37859,7 @@ module.exports = function resolve(x, options, callback) { /***/ }), -/* 385 */ +/* 379 */ /***/ (function(module, exports) { module.exports = function () { @@ -39921,11 +37873,11 @@ module.exports = function () { /***/ }), -/* 386 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { var path = __webpack_require__(4); -var parse = path.parse || __webpack_require__(387); +var parse = path.parse || __webpack_require__(381); var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { var prefix = '/'; @@ -39969,7 +37921,7 @@ module.exports = function nodeModulesPaths(start, opts, request) { /***/ }), -/* 387 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40051,7 +38003,7 @@ module.exports.win32 = win32.parse; /***/ }), -/* 388 */ +/* 382 */ /***/ (function(module, exports) { module.exports = function (x, opts) { @@ -40067,13 +38019,13 @@ module.exports = function (x, opts) { /***/ }), -/* 389 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var has = __webpack_require__(390); +var has = __webpack_require__(384); function specifierIncluded(current, specifier) { var nodeParts = current.split('.'); @@ -40135,7 +38087,7 @@ function versionIncluded(nodeVersion, specifierValue) { return matchesRange(current, specifierValue); } -var data = __webpack_require__(393); +var data = __webpack_require__(387); module.exports = function isCore(x, nodeVersion) { return has(data, x) && versionIncluded(nodeVersion, data[x]); @@ -40143,31 +38095,31 @@ module.exports = function isCore(x, nodeVersion) { /***/ }), -/* 390 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var bind = __webpack_require__(391); +var bind = __webpack_require__(385); module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); /***/ }), -/* 391 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var implementation = __webpack_require__(392); +var implementation = __webpack_require__(386); module.exports = Function.prototype.bind || implementation; /***/ }), -/* 392 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40226,13 +38178,13 @@ module.exports = function bind(that) { /***/ }), -/* 393 */ +/* 387 */ /***/ (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.9.7\",\"buffer\":true,\"node:buffer\":[\">= 14.18 && < 15\",\">= 16\"],\"child_process\":true,\"node:child_process\":[\">= 14.18 && < 15\",\">= 16\"],\"cluster\":true,\"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\":true,\"node:punycode\":[\">= 14.18 && < 15\",\">= 16\"],\"querystring\":true,\"node:querystring\":[\">= 14.18 && < 15\",\">= 16\"],\"readline\":true,\"node:readline\":[\">= 14.18 && < 15\",\">= 16\"],\"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.6 && < 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\":true,\"node:zlib\":[\">= 14.18 && < 15\",\">= 16\"]}"); /***/ }), -/* 394 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; @@ -40279,7 +38231,7 @@ function versionIncluded(specifierValue) { return matchesRange(specifierValue); } -var data = __webpack_require__(395); +var data = __webpack_require__(389); var core = {}; for (var mod in data) { // eslint-disable-line no-restricted-syntax @@ -40291,16 +38243,16 @@ module.exports = core; /***/ }), -/* 395 */ +/* 389 */ /***/ (function(module) { module.exports = JSON.parse("{\"assert\":true,\"assert/strict\":\">= 15\",\"async_hooks\":\">= 8\",\"buffer_ieee754\":\"< 0.9.7\",\"buffer\":true,\"child_process\":true,\"cluster\":true,\"console\":true,\"constants\":true,\"crypto\":true,\"_debug_agent\":\">= 1 && < 8\",\"_debugger\":\"< 8\",\"dgram\":true,\"diagnostics_channel\":\">= 15.1\",\"dns\":true,\"dns/promises\":\">= 15\",\"domain\":\">= 0.7.12\",\"events\":true,\"freelist\":\"< 6\",\"fs\":true,\"fs/promises\":[\">= 10 && < 10.1\",\">= 14\"],\"_http_agent\":\">= 0.11.1\",\"_http_client\":\">= 0.11.1\",\"_http_common\":\">= 0.11.1\",\"_http_incoming\":\">= 0.11.1\",\"_http_outgoing\":\">= 0.11.1\",\"_http_server\":\">= 0.11.1\",\"http\":true,\"http2\":\">= 8.8\",\"https\":true,\"inspector\":\">= 8.0.0\",\"_linklist\":\"< 8\",\"module\":true,\"net\":true,\"node-inspect/lib/_inspect\":\">= 7.6.0 && < 12\",\"node-inspect/lib/internal/inspect_client\":\">= 7.6.0 && < 12\",\"node-inspect/lib/internal/inspect_repl\":\">= 7.6.0 && < 12\",\"os\":true,\"path\":true,\"path/posix\":\">= 15.3\",\"path/win32\":\">= 15.3\",\"perf_hooks\":\">= 8.5\",\"process\":\">= 1\",\"punycode\":true,\"querystring\":true,\"readline\":true,\"repl\":true,\"smalloc\":\">= 0.11.5 && < 3\",\"_stream_duplex\":\">= 0.9.4\",\"_stream_transform\":\">= 0.9.4\",\"_stream_wrap\":\">= 1.4.1\",\"_stream_passthrough\":\">= 0.9.4\",\"_stream_readable\":\">= 0.9.4\",\"_stream_writable\":\">= 0.9.4\",\"stream\":true,\"stream/promises\":\">= 15\",\"string_decoder\":true,\"sys\":[\">= 0.6 && < 0.7\",\">= 0.8\"],\"timers\":true,\"timers/promises\":\">= 15\",\"_tls_common\":\">= 0.11.13\",\"_tls_legacy\":\">= 0.11.3 && < 10\",\"_tls_wrap\":\">= 0.11.3\",\"tls\":true,\"trace_events\":\">= 10\",\"tty\":true,\"url\":true,\"util\":true,\"util/types\":\">= 15.3\",\"v8/tools/arguments\":\">= 10 && < 12\",\"v8/tools/codemap\":[\">= 4.4.0 && < 5\",\">= 5.2.0 && < 12\"],\"v8/tools/consarray\":[\">= 4.4.0 && < 5\",\">= 5.2.0 && < 12\"],\"v8/tools/csvparser\":[\">= 4.4.0 && < 5\",\">= 5.2.0 && < 12\"],\"v8/tools/logreader\":[\">= 4.4.0 && < 5\",\">= 5.2.0 && < 12\"],\"v8/tools/profile_view\":[\">= 4.4.0 && < 5\",\">= 5.2.0 && < 12\"],\"v8/tools/splaytree\":[\">= 4.4.0 && < 5\",\">= 5.2.0 && < 12\"],\"v8\":\">= 1\",\"vm\":true,\"wasi\":\">= 13.4 && < 13.5\",\"worker_threads\":\">= 11.7\",\"zlib\":true}"); /***/ }), -/* 396 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { -var isCoreModule = __webpack_require__(389); +var isCoreModule = __webpack_require__(383); module.exports = function isCore(x) { return isCoreModule(x); @@ -40308,15 +38260,15 @@ module.exports = function isCore(x) { /***/ }), -/* 397 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { -var isCore = __webpack_require__(389); +var isCore = __webpack_require__(383); var fs = __webpack_require__(132); var path = __webpack_require__(4); -var caller = __webpack_require__(385); -var nodeModulesPaths = __webpack_require__(386); -var normalizeOptions = __webpack_require__(388); +var caller = __webpack_require__(379); +var nodeModulesPaths = __webpack_require__(380); +var normalizeOptions = __webpack_require__(382); var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; @@ -40513,7 +38465,7 @@ module.exports = function resolveSync(x, options) { /***/ }), -/* 398 */ +/* 392 */ /***/ (function(module, exports) { module.exports = extractDescription @@ -40533,17 +38485,17 @@ function extractDescription (d) { /***/ }), -/* 399 */ +/* 393 */ /***/ (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\"}}"); /***/ }), -/* 400 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(113) -var messages = __webpack_require__(401) +var messages = __webpack_require__(395) module.exports = function() { var args = Array.prototype.slice.call(arguments, 0) @@ -40568,20 +38520,20 @@ function makeTypoWarning (providedName, probableName, field) { /***/ }), -/* 401 */ +/* 395 */ /***/ (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.\"}"); /***/ }), -/* 402 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const writeJsonFile = __webpack_require__(403); -const sortKeys = __webpack_require__(407); +const writeJsonFile = __webpack_require__(397); +const sortKeys = __webpack_require__(401); const dependencyKeys = new Set([ 'dependencies', @@ -40646,18 +38598,18 @@ module.exports.sync = (filePath, data, options) => { /***/ }), -/* 403 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); const fs = __webpack_require__(233); -const writeFileAtomic = __webpack_require__(404); -const sortKeys = __webpack_require__(407); -const makeDir = __webpack_require__(409); -const pify = __webpack_require__(410); -const detectIndent = __webpack_require__(412); +const writeFileAtomic = __webpack_require__(398); +const sortKeys = __webpack_require__(401); +const makeDir = __webpack_require__(403); +const pify = __webpack_require__(404); +const detectIndent = __webpack_require__(406); const init = (fn, filePath, data, options) => { if (!filePath) { @@ -40729,7 +38681,7 @@ module.exports.sync = (filePath, data, options) => { /***/ }), -/* 404 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40740,7 +38692,7 @@ module.exports._getTmpname = getTmpname // for testing module.exports._cleanupOnExit = cleanupOnExit var fs = __webpack_require__(233) -var MurmurHash3 = __webpack_require__(405) +var MurmurHash3 = __webpack_require__(399) var onExit = __webpack_require__(161) var path = __webpack_require__(4) var activeFiles = {} @@ -40749,7 +38701,7 @@ var activeFiles = {} /* istanbul ignore next */ var threadId = (function getId () { try { - var workerThreads = __webpack_require__(406) + var workerThreads = __webpack_require__(400) /// if we are in main thread, this is set to `0` return workerThreads.threadId @@ -40974,7 +38926,7 @@ function writeFileSync (filename, data, options) { /***/ }), -/* 405 */ +/* 399 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41116,18 +39068,18 @@ function writeFileSync (filename, data, options) { /***/ }), -/* 406 */ +/* 400 */ /***/ (function(module, exports) { module.exports = require(undefined); /***/ }), -/* 407 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const isPlainObj = __webpack_require__(408); +const isPlainObj = __webpack_require__(402); module.exports = (obj, opts) => { if (!isPlainObj(obj)) { @@ -41184,7 +39136,7 @@ module.exports = (obj, opts) => { /***/ }), -/* 408 */ +/* 402 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -41198,15 +39150,15 @@ module.exports = function (x) { /***/ }), -/* 409 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(132); const path = __webpack_require__(4); -const pify = __webpack_require__(410); -const semver = __webpack_require__(411); +const pify = __webpack_require__(404); +const semver = __webpack_require__(405); const defaults = { mode: 0o777 & (~process.umask()), @@ -41344,7 +39296,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 410 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -41419,7 +39371,7 @@ module.exports = (input, options) => { /***/ }), -/* 411 */ +/* 405 */ /***/ (function(module, exports) { exports = module.exports = SemVer @@ -42908,7 +40860,7 @@ function coerce (version) { /***/ }), -/* 412 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43037,7 +40989,7 @@ module.exports = str => { /***/ }), -/* 413 */ +/* 407 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -43097,14 +41049,14 @@ function runScriptInPackageStreaming({ } /***/ }), -/* 414 */ +/* 408 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readYarnLock", function() { return readYarnLock; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveDepsForProject", function() { return resolveDepsForProject; }); -/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(415); +/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(409); /* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(231); /* @@ -43206,7 +41158,7 @@ function resolveDepsForProject({ } /***/ }), -/* 415 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { module.exports = @@ -47089,7 +45041,7 @@ function onceStrict (fn) { /* 63 */ /***/ (function(module, exports) { -module.exports = __webpack_require__(416); +module.exports = __webpack_require__(410); /***/ }), /* 64 */, @@ -53484,21 +51436,21 @@ module.exports = process && support(supportLevel); /******/ ]); /***/ }), -/* 416 */ +/* 410 */ /***/ (function(module, exports) { module.exports = require("buffer"); /***/ }), -/* 417 */ +/* 411 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortPackageJson", function() { return sortPackageJson; }); -/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(418); +/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(412); /* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs_promises__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var sort_package_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(419); +/* harmony import */ var sort_package_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(413); /* harmony import */ var sort_package_json__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(sort_package_json__WEBPACK_IMPORTED_MODULE_1__); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one @@ -53519,20 +51471,20 @@ async function sortPackageJson(kbn) { } /***/ }), -/* 418 */ +/* 412 */ /***/ (function(module, exports) { module.exports = require("fs/promises"); /***/ }), -/* 419 */ +/* 413 */ /***/ (function(module, exports, __webpack_require__) { -const sortObjectKeys = __webpack_require__(420) -const detectIndent = __webpack_require__(421) -const detectNewline = __webpack_require__(422).graceful -const gitHooks = __webpack_require__(423) -const isPlainObject = __webpack_require__(424) +const sortObjectKeys = __webpack_require__(414) +const detectIndent = __webpack_require__(415) +const detectNewline = __webpack_require__(416).graceful +const gitHooks = __webpack_require__(417) +const isPlainObject = __webpack_require__(418) const hasOwnProperty = (object, property) => Object.prototype.hasOwnProperty.call(object, property) @@ -53891,7 +51843,7 @@ module.exports.default = sortPackageJson /***/ }), -/* 420 */ +/* 414 */ /***/ (function(module, exports) { module.exports = function sortObjectByKeyNameList(object, sortWith) { @@ -53915,7 +51867,7 @@ module.exports = function sortObjectByKeyNameList(object, sortWith) { /***/ }), -/* 421 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54082,7 +52034,7 @@ module.exports = string => { /***/ }), -/* 422 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54110,13 +52062,13 @@ module.exports.graceful = string => (typeof string === 'string' && detectNewline /***/ }), -/* 423 */ +/* 417 */ /***/ (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\"]"); /***/ }), -/* 424 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54133,13 +52085,13 @@ module.exports = value => { /***/ }), -/* 425 */ +/* 419 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "validateDependencies", function() { return validateDependencies; }); -/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(415); +/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(409); /* 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__(2); /* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dedent__WEBPACK_IMPORTED_MODULE_1__); @@ -54149,8 +52101,8 @@ __webpack_require__.r(__webpack_exports__); /* 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__(231); /* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(220); -/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(349); -/* harmony import */ var _projects_tree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(426); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(343); +/* harmony import */ var _projects_tree__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(420); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -54331,7 +52283,7 @@ function getDevOnlyProductionDepsTree(kbn, projectName) { } /***/ }), -/* 426 */ +/* 420 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54473,27 +52425,27 @@ function addProjectToTree(tree, pathParts, project) { } /***/ }), -/* 427 */ +/* 421 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _yarn_integrity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(428); +/* harmony import */ var _yarn_integrity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(422); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "yarnIntegrityFileExists", function() { return _yarn_integrity__WEBPACK_IMPORTED_MODULE_0__["yarnIntegrityFileExists"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ensureYarnIntegrityFileExists", function() { return _yarn_integrity__WEBPACK_IMPORTED_MODULE_0__["ensureYarnIntegrityFileExists"]; }); -/* harmony import */ var _get_cache_folders__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(429); +/* harmony import */ var _get_cache_folders__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(423); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getBazelDiskCacheFolder", function() { return _get_cache_folders__WEBPACK_IMPORTED_MODULE_1__["getBazelDiskCacheFolder"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getBazelRepositoryCacheFolder", function() { return _get_cache_folders__WEBPACK_IMPORTED_MODULE_1__["getBazelRepositoryCacheFolder"]; }); -/* harmony import */ var _install_tools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(430); +/* harmony import */ var _install_tools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(424); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBazelBinAvailable", function() { return _install_tools__WEBPACK_IMPORTED_MODULE_2__["isBazelBinAvailable"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "installBazelTools", function() { return _install_tools__WEBPACK_IMPORTED_MODULE_2__["installBazelTools"]; }); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(431); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(425); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "runBazel", function() { return _run__WEBPACK_IMPORTED_MODULE_3__["runBazel"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "runIBazel", function() { return _run__WEBPACK_IMPORTED_MODULE_3__["runIBazel"]; }); @@ -54511,7 +52463,7 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 428 */ +/* 422 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54558,7 +52510,7 @@ async function ensureYarnIntegrityFileExists(nodeModulesPath) { } /***/ }), -/* 429 */ +/* 423 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54595,7 +52547,7 @@ async function getBazelRepositoryCacheFolder() { } /***/ }), -/* 430 */ +/* 424 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54714,7 +52666,7 @@ async function installBazelTools(repoRootPath) { } /***/ }), -/* 431 */ +/* 425 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54724,12 +52676,12 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(114); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); -/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(432); -/* harmony import */ var _kbn_dev_utils_stdio__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(530); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(426); +/* harmony import */ var _kbn_dev_utils_stdio__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(524); /* harmony import */ var _kbn_dev_utils_stdio__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_kbn_dev_utils_stdio__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _child_process__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(221); /* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(220); -/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(347); +/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(341); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -54791,141 +52743,141 @@ async function runIBazel(bazelArgs, offline = false, runOpts = {}) { } /***/ }), -/* 432 */ +/* 426 */ /***/ (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__(433); +/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(427); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; }); -/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(434); +/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(428); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; }); -/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(435); +/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(429); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; }); -/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(436); +/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(430); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; }); -/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(437); +/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(431); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; }); -/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(438); +/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(432); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; }); -/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(439); +/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(433); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; }); -/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(440); +/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(434); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; }); -/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(441); +/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(435); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; }); -/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(442); +/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(436); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; }); -/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(443); +/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(437); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; }); /* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(81); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; }); -/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(444); +/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(438); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; }); -/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(445); +/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(439); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; }); -/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(446); +/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(440); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; }); -/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(447); +/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(441); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; }); -/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(448); +/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(442); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; }); -/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(449); +/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(443); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; }); -/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(450); +/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(444); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; }); -/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(452); +/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(446); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; }); -/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(453); +/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(447); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; }); -/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(454); +/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(448); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; }); -/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(455); +/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(449); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; }); -/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(456); +/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(450); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; }); -/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(457); +/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(451); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; }); -/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(460); +/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(454); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; }); -/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(461); +/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(455); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; }); -/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(462); +/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(456); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; }); -/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(463); +/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(457); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; }); -/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(464); +/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(458); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; }); /* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(106); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; }); -/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(465); +/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(459); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; }); -/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(466); +/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(460); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; }); -/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(467); +/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(461); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; }); -/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(468); +/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(462); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; }); /* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(32); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; }); -/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(469); +/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(463); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; }); -/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(470); +/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(464); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; }); -/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(471); +/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(465); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; }); /* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(67); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; }); -/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(473); +/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(467); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; }); -/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(474); +/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(468); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; }); -/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(475); +/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(469); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; }); -/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(478); +/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(472); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; }); /* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(82); @@ -54936,175 +52888,175 @@ __webpack_require__.r(__webpack_exports__); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["flatMap"]; }); -/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(479); +/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(473); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; }); -/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(480); +/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(474); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; }); -/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(481); +/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(475); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; }); -/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(482); +/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(476); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; }); /* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(42); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; }); -/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(483); +/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(477); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; }); -/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(484); +/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(478); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; }); -/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(485); +/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(479); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; }); -/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(486); +/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(480); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; }); -/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(487); +/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(481); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; }); -/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(488); +/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(482); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; }); -/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(489); +/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(483); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; }); -/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(490); +/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(484); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; }); -/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(491); +/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(485); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; }); -/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(476); +/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(470); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; }); -/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(492); +/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(486); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; }); -/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(493); +/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(487); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; }); -/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(494); +/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(488); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; }); -/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(495); +/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(489); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; }); /* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(31); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; }); -/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(496); +/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(490); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; }); -/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(497); +/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(491); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; }); -/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(477); +/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(471); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; }); -/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(498); +/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(492); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; }); -/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(499); +/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(493); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; }); -/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(500); +/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(494); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; }); -/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(501); +/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(495); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; }); -/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(502); +/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(496); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; }); -/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(503); +/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(497); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; }); -/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(504); +/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(498); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; }); -/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(505); +/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(499); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; }); -/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(506); +/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(500); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; }); -/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(507); +/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(501); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; }); -/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(509); +/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(503); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; }); -/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(510); +/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(504); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; }); -/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(511); +/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(505); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; }); -/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(459); +/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(453); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; }); -/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(472); +/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(466); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; }); -/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(512); +/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(506); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; }); -/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(513); +/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(507); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; }); -/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(514); +/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(508); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; }); -/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(515); +/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(509); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; }); -/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(516); +/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(510); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; }); -/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(458); +/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(452); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; }); -/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(517); +/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(511); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; }); -/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(518); +/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(512); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; }); -/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(519); +/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(513); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; }); -/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(520); +/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(514); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; }); -/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(521); +/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(515); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; }); -/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(522); +/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(516); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; }); -/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(523); +/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(517); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; }); -/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(524); +/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(518); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; }); -/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(525); +/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(519); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; }); -/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(526); +/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(520); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; }); -/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(527); +/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(521); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; }); -/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(528); +/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(522); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; }); -/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(529); +/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(523); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; }); /** PURE_IMPORTS_START PURE_IMPORTS_END */ @@ -55215,7 +53167,7 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 433 */ +/* 427 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55294,14 +53246,14 @@ var AuditSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 434 */ +/* 428 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56); -/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(433); +/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(427); /* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(109); /** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */ @@ -55317,7 +53269,7 @@ function auditTime(duration, scheduler) { /***/ }), -/* 435 */ +/* 429 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55364,7 +53316,7 @@ var BufferSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 436 */ +/* 430 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55465,7 +53417,7 @@ var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 437 */ +/* 431 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55626,7 +53578,7 @@ function dispatchBufferClose(arg) { /***/ }), -/* 438 */ +/* 432 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55745,7 +53697,7 @@ var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 439 */ +/* 433 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55838,7 +53790,7 @@ var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 440 */ +/* 434 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55898,7 +53850,7 @@ var CatchSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 441 */ +/* 435 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55914,7 +53866,7 @@ function combineAll(project) { /***/ }), -/* 442 */ +/* 436 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55946,7 +53898,7 @@ function combineLatest() { /***/ }), -/* 443 */ +/* 437 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55966,7 +53918,7 @@ function concat() { /***/ }), -/* 444 */ +/* 438 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -55982,13 +53934,13 @@ function concatMap(project, resultSelector) { /***/ }), -/* 445 */ +/* 439 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; }); -/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(444); +/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(438); /** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */ function concatMapTo(innerObservable, resultSelector) { @@ -55998,7 +53950,7 @@ function concatMapTo(innerObservable, resultSelector) { /***/ }), -/* 446 */ +/* 440 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56063,7 +54015,7 @@ var CountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 447 */ +/* 441 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56148,7 +54100,7 @@ var DebounceSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 448 */ +/* 442 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56224,7 +54176,7 @@ function dispatchNext(subscriber) { /***/ }), -/* 449 */ +/* 443 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56274,7 +54226,7 @@ var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 450 */ +/* 444 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56282,7 +54234,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56); -/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(451); +/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(445); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12); /* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43); /** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */ @@ -56381,7 +54333,7 @@ var DelayMessage = /*@__PURE__*/ (function () { /***/ }), -/* 451 */ +/* 445 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56395,7 +54347,7 @@ function isDate(value) { /***/ }), -/* 452 */ +/* 446 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56541,7 +54493,7 @@ var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 453 */ +/* 447 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56579,7 +54531,7 @@ var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 454 */ +/* 448 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56655,7 +54607,7 @@ var DistinctSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 455 */ +/* 449 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56726,13 +54678,13 @@ var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 456 */ +/* 450 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; }); -/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(455); +/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(449); /** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */ function distinctUntilKeyChanged(key, compare) { @@ -56742,7 +54694,7 @@ function distinctUntilKeyChanged(key, compare) { /***/ }), -/* 457 */ +/* 451 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56750,9 +54702,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; }); /* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(106); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(458); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(449); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(459); +/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(452); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(443); +/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(453); /** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */ @@ -56774,7 +54726,7 @@ function elementAt(index, defaultValue) { /***/ }), -/* 458 */ +/* 452 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56840,7 +54792,7 @@ function defaultErrorFactory() { /***/ }), -/* 459 */ +/* 453 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56902,7 +54854,7 @@ var TakeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 460 */ +/* 454 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56924,7 +54876,7 @@ function endWith() { /***/ }), -/* 461 */ +/* 455 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56986,7 +54938,7 @@ var EverySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 462 */ +/* 456 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57040,7 +54992,7 @@ var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 463 */ +/* 457 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57134,7 +55086,7 @@ var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 464 */ +/* 458 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57246,7 +55198,7 @@ var ExpandSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 465 */ +/* 459 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57284,7 +55236,7 @@ var FinallySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 466 */ +/* 460 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57356,13 +55308,13 @@ var FindValueSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 467 */ +/* 461 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; }); -/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(466); +/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(460); /** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */ function findIndex(predicate, thisArg) { @@ -57372,7 +55324,7 @@ function findIndex(predicate, thisArg) { /***/ }), -/* 468 */ +/* 462 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57380,9 +55332,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(106); -/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(459); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(449); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(458); +/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(453); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(443); +/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(452); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26); /** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */ @@ -57399,7 +55351,7 @@ function first(predicate, defaultValue) { /***/ }), -/* 469 */ +/* 463 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57436,7 +55388,7 @@ var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 470 */ +/* 464 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57480,7 +55432,7 @@ var IsEmptySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 471 */ +/* 465 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57488,9 +55440,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; }); /* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64); /* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(106); -/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(472); -/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(458); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(449); +/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(466); +/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(452); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(443); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26); /** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */ @@ -57507,7 +55459,7 @@ function last(predicate, defaultValue) { /***/ }), -/* 472 */ +/* 466 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57584,7 +55536,7 @@ var TakeLastSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 473 */ +/* 467 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57623,7 +55575,7 @@ var MapToSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 474 */ +/* 468 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57673,13 +55625,13 @@ var MaterializeSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 475 */ +/* 469 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(476); +/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(470); /** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */ function max(comparer) { @@ -57692,15 +55644,15 @@ function max(comparer) { /***/ }), -/* 476 */ +/* 470 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; }); -/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(477); -/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(472); -/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(449); +/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(471); +/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(466); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(443); /* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25); /** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */ @@ -57721,7 +55673,7 @@ function reduce(accumulator, seed) { /***/ }), -/* 477 */ +/* 471 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57803,7 +55755,7 @@ var ScanSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 478 */ +/* 472 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57823,7 +55775,7 @@ function merge() { /***/ }), -/* 479 */ +/* 473 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57848,7 +55800,7 @@ function mergeMapTo(innerObservable, resultSelector, concurrent) { /***/ }), -/* 480 */ +/* 474 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -57957,13 +55909,13 @@ var MergeScanSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 481 */ +/* 475 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(476); +/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(470); /** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */ function min(comparer) { @@ -57976,7 +55928,7 @@ function min(comparer) { /***/ }), -/* 482 */ +/* 476 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58025,7 +55977,7 @@ var MulticastOperator = /*@__PURE__*/ (function () { /***/ }), -/* 483 */ +/* 477 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58115,7 +56067,7 @@ var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 484 */ +/* 478 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58163,7 +56115,7 @@ var PairwiseSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 485 */ +/* 479 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58186,7 +56138,7 @@ function partition(predicate, thisArg) { /***/ }), -/* 486 */ +/* 480 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58226,14 +56178,14 @@ function plucker(props, length) { /***/ }), -/* 487 */ +/* 481 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; }); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(482); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(476); /** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */ @@ -58246,14 +56198,14 @@ function publish(selector) { /***/ }), -/* 488 */ +/* 482 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; }); /* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(482); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(476); /** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */ @@ -58264,14 +56216,14 @@ function publishBehavior(value) { /***/ }), -/* 489 */ +/* 483 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; }); /* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(482); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(476); /** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */ @@ -58282,14 +56234,14 @@ function publishLast() { /***/ }), -/* 490 */ +/* 484 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; }); /* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(482); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(476); /** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */ @@ -58305,7 +56257,7 @@ function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) { /***/ }), -/* 491 */ +/* 485 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58332,7 +56284,7 @@ function race() { /***/ }), -/* 492 */ +/* 486 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58397,7 +56349,7 @@ var RepeatSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 493 */ +/* 487 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58491,7 +56443,7 @@ var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 494 */ +/* 488 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58544,7 +56496,7 @@ var RetrySubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 495 */ +/* 489 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58630,7 +56582,7 @@ var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 496 */ +/* 490 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58685,7 +56637,7 @@ var SampleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 497 */ +/* 491 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58745,7 +56697,7 @@ function dispatchNotification(state) { /***/ }), -/* 498 */ +/* 492 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58868,13 +56820,13 @@ var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 499 */ +/* 493 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; }); -/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(482); +/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(476); /* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31); /* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28); /** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */ @@ -58891,7 +56843,7 @@ function share() { /***/ }), -/* 500 */ +/* 494 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -58960,7 +56912,7 @@ function shareReplayOperator(_a) { /***/ }), -/* 501 */ +/* 495 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59040,7 +56992,7 @@ var SingleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 502 */ +/* 496 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59082,7 +57034,7 @@ var SkipSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 503 */ +/* 497 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59144,7 +57096,7 @@ var SkipLastSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 504 */ +/* 498 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59201,7 +57153,7 @@ var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 505 */ +/* 499 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59257,7 +57209,7 @@ var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 506 */ +/* 500 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59286,13 +57238,13 @@ function startWith() { /***/ }), -/* 507 */ +/* 501 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; }); -/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(508); +/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(502); /** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */ function subscribeOn(scheduler, delay) { @@ -59317,7 +57269,7 @@ var SubscribeOnOperator = /*@__PURE__*/ (function () { /***/ }), -/* 508 */ +/* 502 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59381,13 +57333,13 @@ var SubscribeOnObservable = /*@__PURE__*/ (function (_super) { /***/ }), -/* 509 */ +/* 503 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(510); +/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(504); /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(26); /** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */ @@ -59399,7 +57351,7 @@ function switchAll() { /***/ }), -/* 510 */ +/* 504 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59487,13 +57439,13 @@ var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 511 */ +/* 505 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; }); -/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(510); +/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(504); /** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */ function switchMapTo(innerObservable, resultSelector) { @@ -59503,7 +57455,7 @@ function switchMapTo(innerObservable, resultSelector) { /***/ }), -/* 512 */ +/* 506 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59551,7 +57503,7 @@ var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 513 */ +/* 507 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59619,7 +57571,7 @@ var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 514 */ +/* 508 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59707,7 +57659,7 @@ var TapSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 515 */ +/* 509 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59809,7 +57761,7 @@ var ThrottleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 516 */ +/* 510 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59818,7 +57770,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); /* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); -/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(515); +/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(509); /** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */ @@ -59907,7 +57859,7 @@ function dispatchNext(arg) { /***/ }), -/* 517 */ +/* 511 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59915,7 +57867,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56); -/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(477); +/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(471); /* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92); /* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67); /** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */ @@ -59951,7 +57903,7 @@ var TimeInterval = /*@__PURE__*/ (function () { /***/ }), -/* 518 */ +/* 512 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59959,7 +57911,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; }); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56); /* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65); -/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(519); +/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(513); /* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50); /** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */ @@ -59976,7 +57928,7 @@ function timeout(due, scheduler) { /***/ }), -/* 519 */ +/* 513 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -59984,7 +57936,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); /* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56); -/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(451); +/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(445); /* harmony import */ var _innerSubscribe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91); /** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_innerSubscribe PURE_IMPORTS_END */ @@ -60055,7 +58007,7 @@ var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 520 */ +/* 514 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -60085,13 +58037,13 @@ var Timestamp = /*@__PURE__*/ (function () { /***/ }), -/* 521 */ +/* 515 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; }); -/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(476); +/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(470); /** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */ function toArrayReducer(arr, item, index) { @@ -60108,7 +58060,7 @@ function toArray() { /***/ }), -/* 522 */ +/* 516 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -60186,7 +58138,7 @@ var WindowSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 523 */ +/* 517 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -60276,7 +58228,7 @@ var WindowCountSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 524 */ +/* 518 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -60446,7 +58398,7 @@ function dispatchWindowClose(state) { /***/ }), -/* 525 */ +/* 519 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -60589,7 +58541,7 @@ var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 526 */ +/* 520 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -60686,7 +58638,7 @@ var WindowSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 527 */ +/* 521 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -60781,7 +58733,7 @@ var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) { /***/ }), -/* 528 */ +/* 522 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -60803,7 +58755,7 @@ function zip() { /***/ }), -/* 529 */ +/* 523 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -60819,7 +58771,7 @@ function zipAll(project) { /***/ }), -/* 530 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60829,7 +58781,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _observe_lines = __webpack_require__(531); +var _observe_lines = __webpack_require__(525); Object.keys(_observe_lines).forEach(function (key) { if (key === "default" || key === "__esModule") return; @@ -60842,7 +58794,7 @@ Object.keys(_observe_lines).forEach(function (key) { }); }); -var _observe_readable = __webpack_require__(532); +var _observe_readable = __webpack_require__(526); Object.keys(_observe_readable).forEach(function (key) { if (key === "default" || key === "__esModule") return; @@ -60856,7 +58808,7 @@ Object.keys(_observe_readable).forEach(function (key) { }); /***/ }), -/* 531 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60869,9 +58821,9 @@ exports.observeLines = observeLines; var Rx = _interopRequireWildcard(__webpack_require__(9)); -var _operators = __webpack_require__(432); +var _operators = __webpack_require__(426); -var _observe_readable = __webpack_require__(532); +var _observe_readable = __webpack_require__(526); 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); } @@ -60934,7 +58886,7 @@ function observeLines(readable) { } /***/ }), -/* 532 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60947,7 +58899,7 @@ exports.observeReadable = observeReadable; var Rx = _interopRequireWildcard(__webpack_require__(9)); -var _operators = __webpack_require__(432); +var _operators = __webpack_require__(426); 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); } @@ -60971,13 +58923,13 @@ function observeReadable(readable) { } /***/ }), -/* 533 */ +/* 527 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BuildCommand", function() { return BuildCommand; }); -/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(427); +/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(421); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -61005,7 +58957,7 @@ const BuildCommand = { }; /***/ }), -/* 534 */ +/* 528 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -61015,11 +58967,11 @@ __webpack_require__.r(__webpack_exports__); /* 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__(240); /* 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__(535); +/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(529); /* 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__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(427); +/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(421); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(231); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(220); /* @@ -61122,20 +59074,20 @@ const CleanCommand = { }; /***/ }), -/* 535 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const readline = __webpack_require__(536); -const chalk = __webpack_require__(537); -const cliCursor = __webpack_require__(540); -const cliSpinners = __webpack_require__(542); -const logSymbols = __webpack_require__(544); -const stripAnsi = __webpack_require__(550); -const wcwidth = __webpack_require__(552); -const isInteractive = __webpack_require__(556); -const MuteStream = __webpack_require__(557); +const readline = __webpack_require__(530); +const chalk = __webpack_require__(531); +const cliCursor = __webpack_require__(534); +const cliSpinners = __webpack_require__(536); +const logSymbols = __webpack_require__(538); +const stripAnsi = __webpack_require__(544); +const wcwidth = __webpack_require__(546); +const isInteractive = __webpack_require__(550); +const MuteStream = __webpack_require__(551); const TEXT = Symbol('text'); const PREFIX_TEXT = Symbol('prefixText'); @@ -61488,13 +59440,13 @@ module.exports.promise = (action, options) => { /***/ }), -/* 536 */ +/* 530 */ /***/ (function(module, exports) { module.exports = require("readline"); /***/ }), -/* 537 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61504,7 +59456,7 @@ const {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(121); const { stringReplaceAll, stringEncaseCRLFWithFirstIndex -} = __webpack_require__(538); +} = __webpack_require__(532); // `supportsColor.level` → `ansiStyles.color[name]` mapping const levelMapping = [ @@ -61705,7 +59657,7 @@ const chalkTag = (chalk, ...strings) => { } if (template === undefined) { - template = __webpack_require__(539); + template = __webpack_require__(533); } return template(chalk, parts.join('')); @@ -61734,7 +59686,7 @@ module.exports = chalk; /***/ }), -/* 538 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61780,7 +59732,7 @@ module.exports = { /***/ }), -/* 539 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61921,12 +59873,12 @@ module.exports = (chalk, temporary) => { /***/ }), -/* 540 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const restoreCursor = __webpack_require__(541); +const restoreCursor = __webpack_require__(535); let isHidden = false; @@ -61963,7 +59915,7 @@ exports.toggle = (force, writableStream) => { /***/ }), -/* 541 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61979,13 +59931,13 @@ module.exports = onetime(() => { /***/ }), -/* 542 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const spinners = Object.assign({}, __webpack_require__(543)); +const spinners = Object.assign({}, __webpack_require__(537)); const spinnersList = Object.keys(spinners); @@ -62003,18 +59955,18 @@ module.exports.default = spinners; /***/ }), -/* 543 */ +/* 537 */ /***/ (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\":[\"▰▱▱▱▱▱▱\",\"▰▰▱▱▱▱▱\",\"▰▰▰▱▱▱▱\",\"▰▰▰▰▱▱▱\",\"▰▰▰▰▰▱▱\",\"▰▰▰▰▰▰▱\",\"▰▰▰▰▰▰▰\",\"▰▱▱▱▱▱▱\"]}}"); /***/ }), -/* 544 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const chalk = __webpack_require__(545); +const chalk = __webpack_require__(539); const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color'; @@ -62036,16 +59988,16 @@ module.exports = isSupported ? main : fallbacks; /***/ }), -/* 545 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const escapeStringRegexp = __webpack_require__(363); -const ansiStyles = __webpack_require__(546); -const stdoutColor = __webpack_require__(547).stdout; +const escapeStringRegexp = __webpack_require__(357); +const ansiStyles = __webpack_require__(540); +const stdoutColor = __webpack_require__(541).stdout; -const template = __webpack_require__(549); +const template = __webpack_require__(543); const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); @@ -62271,12 +60223,12 @@ module.exports.default = module.exports; // For TypeScript /***/ }), -/* 546 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(module) { -const colorConvert = __webpack_require__(365); +const colorConvert = __webpack_require__(359); const wrapAnsi16 = (fn, offset) => function () { const code = fn.apply(colorConvert, arguments); @@ -62444,13 +60396,13 @@ Object.defineProperty(module, 'exports', { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(116)(module))) /***/ }), -/* 547 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const os = __webpack_require__(122); -const hasFlag = __webpack_require__(548); +const hasFlag = __webpack_require__(542); const env = process.env; @@ -62582,7 +60534,7 @@ module.exports = { /***/ }), -/* 548 */ +/* 542 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62597,7 +60549,7 @@ module.exports = (flag, argv) => { /***/ }), -/* 549 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62732,18 +60684,18 @@ module.exports = (chalk, tmp) => { /***/ }), -/* 550 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const ansiRegex = __webpack_require__(551); +const ansiRegex = __webpack_require__(545); module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; /***/ }), -/* 551 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62760,14 +60712,14 @@ module.exports = ({onlyFirst = false} = {}) => { /***/ }), -/* 552 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var defaults = __webpack_require__(553) -var combining = __webpack_require__(555) +var defaults = __webpack_require__(547) +var combining = __webpack_require__(549) var DEFAULTS = { nul: 0, @@ -62866,10 +60818,10 @@ function bisearch(ucs) { /***/ }), -/* 553 */ +/* 547 */ /***/ (function(module, exports, __webpack_require__) { -var clone = __webpack_require__(554); +var clone = __webpack_require__(548); module.exports = function(options, defaults) { options = options || {}; @@ -62884,7 +60836,7 @@ module.exports = function(options, defaults) { }; /***/ }), -/* 554 */ +/* 548 */ /***/ (function(module, exports, __webpack_require__) { var clone = (function() { @@ -63056,7 +61008,7 @@ if ( true && module.exports) { /***/ }), -/* 555 */ +/* 549 */ /***/ (function(module, exports) { module.exports = [ @@ -63112,7 +61064,7 @@ module.exports = [ /***/ }), -/* 556 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63128,7 +61080,7 @@ module.exports = ({stream = process.stdout} = {}) => { /***/ }), -/* 557 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(173) @@ -63279,7 +61231,7 @@ MuteStream.prototype.close = proxy('close') /***/ }), -/* 558 */ +/* 552 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -63289,11 +61241,11 @@ __webpack_require__.r(__webpack_exports__); /* 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__(240); /* 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__(535); +/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(529); /* 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__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(427); +/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(421); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(231); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(220); /* @@ -63402,7 +61354,7 @@ const ResetCommand = { }; /***/ }), -/* 559 */ +/* 553 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -63410,10 +61362,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RunCommand", function() { return RunCommand; }); /* harmony import */ var dedent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* 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__(347); +/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(341); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220); -/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(560); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(346); +/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(554); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(340); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -63471,7 +61423,7 @@ const RunCommand = { }; /***/ }), -/* 560 */ +/* 554 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -63526,13 +61478,13 @@ async function parallelize(items, fn, concurrency = 4) { } /***/ }), -/* 561 */ +/* 555 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WatchCommand", function() { return WatchCommand; }); -/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(427); +/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(421); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -63563,7 +61515,7 @@ const WatchCommand = { }; /***/ }), -/* 562 */ +/* 556 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -63643,7 +61595,7 @@ const PatchNativeModulesCommand = { }; /***/ }), -/* 563 */ +/* 557 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -63651,11 +61603,11 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runCommand", function() { return runCommand; }); /* harmony import */ var _kbn_dev_utils_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(131); /* harmony import */ var _kbn_dev_utils_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_kbn_dev_utils_ci_stats_reporter__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(347); +/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(341); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(346); -/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(426); -/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(564); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(340); +/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(420); +/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(558); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -63774,7 +61726,7 @@ function toArray(value) { } /***/ }), -/* 564 */ +/* 558 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -63784,13 +61736,13 @@ __webpack_require__.r(__webpack_exports__); /* 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__(132); /* 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__(565); +/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(559); /* 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__(339); +/* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(333); /* 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__(414); -/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(346); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(568); +/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(408); +/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(340); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(562); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } @@ -63954,15 +61906,15 @@ class Kibana { } /***/ }), -/* 565 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const minimatch = __webpack_require__(247); const arrayUnion = __webpack_require__(242); -const arrayDiffer = __webpack_require__(566); -const arrify = __webpack_require__(567); +const arrayDiffer = __webpack_require__(560); +const arrify = __webpack_require__(561); module.exports = (list, patterns, options = {}) => { list = arrify(list); @@ -63986,7 +61938,7 @@ module.exports = (list, patterns, options = {}) => { /***/ }), -/* 566 */ +/* 560 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64001,7 +61953,7 @@ module.exports = arrayDiffer; /***/ }), -/* 567 */ +/* 561 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64031,7 +61983,7 @@ module.exports = arrify; /***/ }), -/* 568 */ +/* 562 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -64091,15 +62043,15 @@ function getProjectPaths({ } /***/ }), -/* 569 */ +/* 563 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _build_bazel_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(570); +/* harmony import */ var _build_bazel_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(564); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildBazelProductionProjects", function() { return _build_bazel_production_projects__WEBPACK_IMPORTED_MODULE_0__["buildBazelProductionProjects"]; }); -/* harmony import */ var _build_non_bazel_production_projects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(817); +/* harmony import */ var _build_non_bazel_production_projects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(811); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildNonBazelProductionProjects", function() { return _build_non_bazel_production_projects__WEBPACK_IMPORTED_MODULE_1__["buildNonBazelProductionProjects"]; }); /* @@ -64113,24 +62065,24 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 570 */ +/* 564 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildBazelProductionProjects", function() { return buildBazelProductionProjects; }); -/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(571); +/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(565); /* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cpy__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var globby__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(783); +/* harmony import */ var globby__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(777); /* harmony import */ var globby__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(globby__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _build_non_bazel_production_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(817); -/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(427); +/* harmony import */ var _build_non_bazel_production_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(811); +/* harmony import */ var _utils_bazel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(421); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(231); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(220); -/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(349); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(346); +/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(343); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(340); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -64220,7 +62172,7 @@ async function applyCorrectPermissions(project, kibanaRoot, buildRoot) { } /***/ }), -/* 571 */ +/* 565 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64228,14 +62180,14 @@ async function applyCorrectPermissions(project, kibanaRoot, buildRoot) { const EventEmitter = __webpack_require__(164); const path = __webpack_require__(4); const os = __webpack_require__(122); -const pMap = __webpack_require__(572); -const arrify = __webpack_require__(567); -const globby = __webpack_require__(575); -const hasGlob = __webpack_require__(767); -const cpFile = __webpack_require__(769); -const junk = __webpack_require__(779); -const pFilter = __webpack_require__(780); -const CpyError = __webpack_require__(782); +const pMap = __webpack_require__(566); +const arrify = __webpack_require__(561); +const globby = __webpack_require__(569); +const hasGlob = __webpack_require__(761); +const cpFile = __webpack_require__(763); +const junk = __webpack_require__(773); +const pFilter = __webpack_require__(774); +const CpyError = __webpack_require__(776); const defaultOptions = { ignoreJunk: true @@ -64386,12 +62338,12 @@ module.exports = (source, destination, { /***/ }), -/* 572 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const AggregateError = __webpack_require__(573); +const AggregateError = __webpack_require__(567); module.exports = async ( iterable, @@ -64474,13 +62426,13 @@ module.exports = async ( /***/ }), -/* 573 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const indentString = __webpack_require__(574); -const cleanStack = __webpack_require__(344); +const indentString = __webpack_require__(568); +const cleanStack = __webpack_require__(338); const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); @@ -64528,7 +62480,7 @@ module.exports = AggregateError; /***/ }), -/* 574 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64570,17 +62522,17 @@ module.exports = (string, count = 1, options) => { /***/ }), -/* 575 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(132); -const arrayUnion = __webpack_require__(576); +const arrayUnion = __webpack_require__(570); const glob = __webpack_require__(244); -const fastGlob = __webpack_require__(578); -const dirGlob = __webpack_require__(761); -const gitignore = __webpack_require__(764); +const fastGlob = __webpack_require__(572); +const dirGlob = __webpack_require__(755); +const gitignore = __webpack_require__(758); const DEFAULT_FILTER = () => false; @@ -64725,12 +62677,12 @@ module.exports.gitignore = gitignore; /***/ }), -/* 576 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var arrayUniq = __webpack_require__(577); +var arrayUniq = __webpack_require__(571); module.exports = function () { return arrayUniq([].concat.apply([], arguments)); @@ -64738,7 +62690,7 @@ module.exports = function () { /***/ }), -/* 577 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64807,10 +62759,10 @@ if ('Set' in global) { /***/ }), -/* 578 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { -const pkg = __webpack_require__(579); +const pkg = __webpack_require__(573); module.exports = pkg.async; module.exports.default = pkg.async; @@ -64823,19 +62775,19 @@ module.exports.generateTasks = pkg.generateTasks; /***/ }), -/* 579 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var optionsManager = __webpack_require__(580); -var taskManager = __webpack_require__(581); -var reader_async_1 = __webpack_require__(732); -var reader_stream_1 = __webpack_require__(756); -var reader_sync_1 = __webpack_require__(757); -var arrayUtils = __webpack_require__(759); -var streamUtils = __webpack_require__(760); +var optionsManager = __webpack_require__(574); +var taskManager = __webpack_require__(575); +var reader_async_1 = __webpack_require__(726); +var reader_stream_1 = __webpack_require__(750); +var reader_sync_1 = __webpack_require__(751); +var arrayUtils = __webpack_require__(753); +var streamUtils = __webpack_require__(754); /** * Synchronous API. */ @@ -64901,7 +62853,7 @@ function isString(source) { /***/ }), -/* 580 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64939,13 +62891,13 @@ exports.prepare = prepare; /***/ }), -/* 581 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var patternUtils = __webpack_require__(582); +var patternUtils = __webpack_require__(576); /** * Generate tasks based on parent directory of each pattern. */ @@ -65036,16 +62988,16 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ }), -/* 582 */ +/* 576 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(4); -var globParent = __webpack_require__(583); +var globParent = __webpack_require__(577); var isGlob = __webpack_require__(266); -var micromatch = __webpack_require__(586); +var micromatch = __webpack_require__(580); var GLOBSTAR = '**'; /** * Return true for static pattern. @@ -65191,15 +63143,15 @@ exports.matchAny = matchAny; /***/ }), -/* 583 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var path = __webpack_require__(4); -var isglob = __webpack_require__(584); -var pathDirname = __webpack_require__(585); +var isglob = __webpack_require__(578); +var pathDirname = __webpack_require__(579); var isWin32 = __webpack_require__(122).platform() === 'win32'; module.exports = function globParent(str) { @@ -65222,7 +63174,7 @@ module.exports = function globParent(str) { /***/ }), -/* 584 */ +/* 578 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -65253,7 +63205,7 @@ module.exports = function isGlob(str) { /***/ }), -/* 585 */ +/* 579 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65403,7 +63355,7 @@ module.exports.win32 = win32; /***/ }), -/* 586 */ +/* 580 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65414,18 +63366,18 @@ module.exports.win32 = win32; */ var util = __webpack_require__(113); -var braces = __webpack_require__(587); -var toRegex = __webpack_require__(588); -var extend = __webpack_require__(700); +var braces = __webpack_require__(581); +var toRegex = __webpack_require__(582); +var extend = __webpack_require__(694); /** * Local dependencies */ -var compilers = __webpack_require__(702); -var parsers = __webpack_require__(728); -var cache = __webpack_require__(729); -var utils = __webpack_require__(730); +var compilers = __webpack_require__(696); +var parsers = __webpack_require__(722); +var cache = __webpack_require__(723); +var utils = __webpack_require__(724); var MAX_LENGTH = 1024 * 64; /** @@ -66287,7 +64239,7 @@ module.exports = micromatch; /***/ }), -/* 587 */ +/* 581 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -66297,18 +64249,18 @@ module.exports = micromatch; * Module dependencies */ -var toRegex = __webpack_require__(588); -var unique = __webpack_require__(608); -var extend = __webpack_require__(609); +var toRegex = __webpack_require__(582); +var unique = __webpack_require__(602); +var extend = __webpack_require__(603); /** * Local dependencies */ -var compilers = __webpack_require__(611); -var parsers = __webpack_require__(626); -var Braces = __webpack_require__(631); -var utils = __webpack_require__(612); +var compilers = __webpack_require__(605); +var parsers = __webpack_require__(620); +var Braces = __webpack_require__(625); +var utils = __webpack_require__(606); var MAX_LENGTH = 1024 * 64; var cache = {}; @@ -66612,16 +64564,16 @@ module.exports = braces; /***/ }), -/* 588 */ +/* 582 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var safe = __webpack_require__(589); -var define = __webpack_require__(595); -var extend = __webpack_require__(601); -var not = __webpack_require__(605); +var safe = __webpack_require__(583); +var define = __webpack_require__(589); +var extend = __webpack_require__(595); +var not = __webpack_require__(599); var MAX_LENGTH = 1024 * 64; /** @@ -66774,10 +64726,10 @@ module.exports.makeRe = makeRe; /***/ }), -/* 589 */ +/* 583 */ /***/ (function(module, exports, __webpack_require__) { -var parse = __webpack_require__(590); +var parse = __webpack_require__(584); var types = parse.types; module.exports = function (re, opts) { @@ -66823,13 +64775,13 @@ function isRegExp (x) { /***/ }), -/* 590 */ +/* 584 */ /***/ (function(module, exports, __webpack_require__) { -var util = __webpack_require__(591); -var types = __webpack_require__(592); -var sets = __webpack_require__(593); -var positions = __webpack_require__(594); +var util = __webpack_require__(585); +var types = __webpack_require__(586); +var sets = __webpack_require__(587); +var positions = __webpack_require__(588); module.exports = function(regexpStr) { @@ -67111,11 +65063,11 @@ module.exports.types = types; /***/ }), -/* 591 */ +/* 585 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(592); -var sets = __webpack_require__(593); +var types = __webpack_require__(586); +var sets = __webpack_require__(587); // All of these are private and only used by randexp. @@ -67228,7 +65180,7 @@ exports.error = function(regexp, msg) { /***/ }), -/* 592 */ +/* 586 */ /***/ (function(module, exports) { module.exports = { @@ -67244,10 +65196,10 @@ module.exports = { /***/ }), -/* 593 */ +/* 587 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(592); +var types = __webpack_require__(586); var INTS = function() { return [{ type: types.RANGE , from: 48, to: 57 }]; @@ -67332,10 +65284,10 @@ exports.anyChar = function() { /***/ }), -/* 594 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(592); +var types = __webpack_require__(586); exports.wordBoundary = function() { return { type: types.POSITION, value: 'b' }; @@ -67355,7 +65307,7 @@ exports.end = function() { /***/ }), -/* 595 */ +/* 589 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67368,8 +65320,8 @@ exports.end = function() { -var isobject = __webpack_require__(596); -var isDescriptor = __webpack_require__(597); +var isobject = __webpack_require__(590); +var isDescriptor = __webpack_require__(591); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -67400,7 +65352,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 596 */ +/* 590 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67419,7 +65371,7 @@ module.exports = function isObject(val) { /***/ }), -/* 597 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67432,9 +65384,9 @@ module.exports = function isObject(val) { -var typeOf = __webpack_require__(598); -var isAccessor = __webpack_require__(599); -var isData = __webpack_require__(600); +var typeOf = __webpack_require__(592); +var isAccessor = __webpack_require__(593); +var isData = __webpack_require__(594); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -67448,7 +65400,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 598 */ +/* 592 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -67583,7 +65535,7 @@ function isBuffer(val) { /***/ }), -/* 599 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67596,7 +65548,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(598); +var typeOf = __webpack_require__(592); // accessor descriptor properties var accessor = { @@ -67659,7 +65611,7 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 600 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67672,7 +65624,7 @@ module.exports = isAccessorDescriptor; -var typeOf = __webpack_require__(598); +var typeOf = __webpack_require__(592); module.exports = function isDataDescriptor(obj, prop) { // data descriptor properties @@ -67715,14 +65667,14 @@ module.exports = function isDataDescriptor(obj, prop) { /***/ }), -/* 601 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(602); -var assignSymbols = __webpack_require__(604); +var isExtendable = __webpack_require__(596); +var assignSymbols = __webpack_require__(598); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -67782,7 +65734,7 @@ function isEnum(obj, key) { /***/ }), -/* 602 */ +/* 596 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67795,7 +65747,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(603); +var isPlainObject = __webpack_require__(597); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -67803,7 +65755,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 603 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67816,7 +65768,7 @@ module.exports = function isExtendable(val) { -var isObject = __webpack_require__(596); +var isObject = __webpack_require__(590); function isObjectObject(o) { return isObject(o) === true @@ -67847,7 +65799,7 @@ module.exports = function isPlainObject(o) { /***/ }), -/* 604 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67894,14 +65846,14 @@ module.exports = function(receiver, objects) { /***/ }), -/* 605 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(606); -var safe = __webpack_require__(589); +var extend = __webpack_require__(600); +var safe = __webpack_require__(583); /** * The main export is a function that takes a `pattern` string and an `options` object. @@ -67973,14 +65925,14 @@ module.exports = toRegex; /***/ }), -/* 606 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(607); -var assignSymbols = __webpack_require__(604); +var isExtendable = __webpack_require__(601); +var assignSymbols = __webpack_require__(598); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -68040,7 +65992,7 @@ function isEnum(obj, key) { /***/ }), -/* 607 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68053,7 +66005,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(603); +var isPlainObject = __webpack_require__(597); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -68061,7 +66013,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 608 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68111,13 +66063,13 @@ module.exports.immutable = function uniqueImmutable(arr) { /***/ }), -/* 609 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(610); +var isObject = __webpack_require__(604); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -68151,7 +66103,7 @@ function hasOwn(obj, key) { /***/ }), -/* 610 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68171,13 +66123,13 @@ module.exports = function isExtendable(val) { /***/ }), -/* 611 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(612); +var utils = __webpack_require__(606); module.exports = function(braces, options) { braces.compiler @@ -68460,25 +66412,25 @@ function hasQueue(node) { /***/ }), -/* 612 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var splitString = __webpack_require__(613); +var splitString = __webpack_require__(607); var utils = module.exports; /** * Module dependencies */ -utils.extend = __webpack_require__(609); -utils.flatten = __webpack_require__(616); -utils.isObject = __webpack_require__(596); -utils.fillRange = __webpack_require__(617); -utils.repeat = __webpack_require__(625); -utils.unique = __webpack_require__(608); +utils.extend = __webpack_require__(603); +utils.flatten = __webpack_require__(610); +utils.isObject = __webpack_require__(590); +utils.fillRange = __webpack_require__(611); +utils.repeat = __webpack_require__(619); +utils.unique = __webpack_require__(602); utils.define = function(obj, key, val) { Object.defineProperty(obj, key, { @@ -68810,7 +66762,7 @@ utils.escapeRegex = function(str) { /***/ }), -/* 613 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -68823,7 +66775,7 @@ utils.escapeRegex = function(str) { -var extend = __webpack_require__(614); +var extend = __webpack_require__(608); module.exports = function(str, options, fn) { if (typeof str !== 'string') { @@ -68988,14 +66940,14 @@ function keepEscaping(opts, str, idx) { /***/ }), -/* 614 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(615); -var assignSymbols = __webpack_require__(604); +var isExtendable = __webpack_require__(609); +var assignSymbols = __webpack_require__(598); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -69055,7 +67007,7 @@ function isEnum(obj, key) { /***/ }), -/* 615 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69068,7 +67020,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(603); +var isPlainObject = __webpack_require__(597); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -69076,7 +67028,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 616 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69105,7 +67057,7 @@ function flat(arr, res) { /***/ }), -/* 617 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69119,10 +67071,10 @@ function flat(arr, res) { var util = __webpack_require__(113); -var isNumber = __webpack_require__(618); -var extend = __webpack_require__(621); -var repeat = __webpack_require__(623); -var toRegex = __webpack_require__(624); +var isNumber = __webpack_require__(612); +var extend = __webpack_require__(615); +var repeat = __webpack_require__(617); +var toRegex = __webpack_require__(618); /** * Return a range of numbers or letters. @@ -69320,7 +67272,7 @@ module.exports = fillRange; /***/ }), -/* 618 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69333,7 +67285,7 @@ module.exports = fillRange; -var typeOf = __webpack_require__(619); +var typeOf = __webpack_require__(613); module.exports = function isNumber(num) { var type = typeOf(num); @@ -69349,10 +67301,10 @@ module.exports = function isNumber(num) { /***/ }), -/* 619 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(620); +var isBuffer = __webpack_require__(614); var toString = Object.prototype.toString; /** @@ -69471,7 +67423,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 620 */ +/* 614 */ /***/ (function(module, exports) { /*! @@ -69498,13 +67450,13 @@ function isSlowBuffer (obj) { /***/ }), -/* 621 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(622); +var isObject = __webpack_require__(616); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -69538,7 +67490,7 @@ function hasOwn(obj, key) { /***/ }), -/* 622 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69558,7 +67510,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 623 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69635,7 +67587,7 @@ function repeat(str, num) { /***/ }), -/* 624 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69648,8 +67600,8 @@ function repeat(str, num) { -var repeat = __webpack_require__(623); -var isNumber = __webpack_require__(618); +var repeat = __webpack_require__(617); +var isNumber = __webpack_require__(612); var cache = {}; function toRegexRange(min, max, options) { @@ -69936,7 +67888,7 @@ module.exports = toRegexRange; /***/ }), -/* 625 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69961,14 +67913,14 @@ module.exports = function repeat(ele, num) { /***/ }), -/* 626 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Node = __webpack_require__(627); -var utils = __webpack_require__(612); +var Node = __webpack_require__(621); +var utils = __webpack_require__(606); /** * Braces parsers @@ -70328,15 +68280,15 @@ function concatNodes(pos, node, parent, options) { /***/ }), -/* 627 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(596); -var define = __webpack_require__(628); -var utils = __webpack_require__(629); +var isObject = __webpack_require__(590); +var define = __webpack_require__(622); +var utils = __webpack_require__(623); var ownNames; /** @@ -70827,7 +68779,7 @@ exports = module.exports = Node; /***/ }), -/* 628 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70840,7 +68792,7 @@ exports = module.exports = Node; -var isDescriptor = __webpack_require__(597); +var isDescriptor = __webpack_require__(591); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -70865,13 +68817,13 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 629 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var typeOf = __webpack_require__(630); +var typeOf = __webpack_require__(624); var utils = module.exports; /** @@ -71891,10 +69843,10 @@ function assert(val, message) { /***/ }), -/* 630 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(620); +var isBuffer = __webpack_require__(614); var toString = Object.prototype.toString; /** @@ -72013,17 +69965,17 @@ module.exports = function kindOf(val) { /***/ }), -/* 631 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(609); -var Snapdragon = __webpack_require__(632); -var compilers = __webpack_require__(611); -var parsers = __webpack_require__(626); -var utils = __webpack_require__(612); +var extend = __webpack_require__(603); +var Snapdragon = __webpack_require__(626); +var compilers = __webpack_require__(605); +var parsers = __webpack_require__(620); +var utils = __webpack_require__(606); /** * Customize Snapdragon parser and renderer @@ -72124,17 +70076,17 @@ module.exports = Braces; /***/ }), -/* 632 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Base = __webpack_require__(633); -var define = __webpack_require__(663); -var Compiler = __webpack_require__(674); -var Parser = __webpack_require__(697); -var utils = __webpack_require__(677); +var Base = __webpack_require__(627); +var define = __webpack_require__(657); +var Compiler = __webpack_require__(668); +var Parser = __webpack_require__(691); +var utils = __webpack_require__(671); var regexCache = {}; var cache = {}; @@ -72305,20 +70257,20 @@ module.exports.Parser = Parser; /***/ }), -/* 633 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(113); -var define = __webpack_require__(634); -var CacheBase = __webpack_require__(635); -var Emitter = __webpack_require__(636); -var isObject = __webpack_require__(596); -var merge = __webpack_require__(657); -var pascal = __webpack_require__(660); -var cu = __webpack_require__(661); +var define = __webpack_require__(628); +var CacheBase = __webpack_require__(629); +var Emitter = __webpack_require__(630); +var isObject = __webpack_require__(590); +var merge = __webpack_require__(651); +var pascal = __webpack_require__(654); +var cu = __webpack_require__(655); /** * Optionally define a custom `cache` namespace to use. @@ -72747,7 +70699,7 @@ module.exports.namespace = namespace; /***/ }), -/* 634 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72760,7 +70712,7 @@ module.exports.namespace = namespace; -var isDescriptor = __webpack_require__(597); +var isDescriptor = __webpack_require__(591); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -72785,21 +70737,21 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 635 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(596); -var Emitter = __webpack_require__(636); -var visit = __webpack_require__(637); -var toPath = __webpack_require__(640); -var union = __webpack_require__(642); -var del = __webpack_require__(648); -var get = __webpack_require__(645); -var has = __webpack_require__(653); -var set = __webpack_require__(656); +var isObject = __webpack_require__(590); +var Emitter = __webpack_require__(630); +var visit = __webpack_require__(631); +var toPath = __webpack_require__(634); +var union = __webpack_require__(636); +var del = __webpack_require__(642); +var get = __webpack_require__(639); +var has = __webpack_require__(647); +var set = __webpack_require__(650); /** * Create a `Cache` constructor that when instantiated will @@ -73053,7 +71005,7 @@ module.exports.namespace = namespace; /***/ }), -/* 636 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { @@ -73222,7 +71174,7 @@ Emitter.prototype.hasListeners = function(event){ /***/ }), -/* 637 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73235,8 +71187,8 @@ Emitter.prototype.hasListeners = function(event){ -var visit = __webpack_require__(638); -var mapVisit = __webpack_require__(639); +var visit = __webpack_require__(632); +var mapVisit = __webpack_require__(633); module.exports = function(collection, method, val) { var result; @@ -73259,7 +71211,7 @@ module.exports = function(collection, method, val) { /***/ }), -/* 638 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73272,7 +71224,7 @@ module.exports = function(collection, method, val) { -var isObject = __webpack_require__(596); +var isObject = __webpack_require__(590); module.exports = function visit(thisArg, method, target, val) { if (!isObject(thisArg) && typeof thisArg !== 'function') { @@ -73299,14 +71251,14 @@ module.exports = function visit(thisArg, method, target, val) { /***/ }), -/* 639 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(113); -var visit = __webpack_require__(638); +var visit = __webpack_require__(632); /** * Map `visit` over an array of objects. @@ -73343,7 +71295,7 @@ function isObject(val) { /***/ }), -/* 640 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73356,7 +71308,7 @@ function isObject(val) { -var typeOf = __webpack_require__(641); +var typeOf = __webpack_require__(635); module.exports = function toPath(args) { if (typeOf(args) !== 'arguments') { @@ -73383,10 +71335,10 @@ function filter(arr) { /***/ }), -/* 641 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(620); +var isBuffer = __webpack_require__(614); var toString = Object.prototype.toString; /** @@ -73505,16 +71457,16 @@ module.exports = function kindOf(val) { /***/ }), -/* 642 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(643); -var union = __webpack_require__(644); -var get = __webpack_require__(645); -var set = __webpack_require__(646); +var isObject = __webpack_require__(637); +var union = __webpack_require__(638); +var get = __webpack_require__(639); +var set = __webpack_require__(640); module.exports = function unionValue(obj, prop, value) { if (!isObject(obj)) { @@ -73542,7 +71494,7 @@ function arrayify(val) { /***/ }), -/* 643 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73562,7 +71514,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 644 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73598,7 +71550,7 @@ module.exports = function union(init) { /***/ }), -/* 645 */ +/* 639 */ /***/ (function(module, exports) { /*! @@ -73654,7 +71606,7 @@ function toString(val) { /***/ }), -/* 646 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73667,10 +71619,10 @@ function toString(val) { -var split = __webpack_require__(613); -var extend = __webpack_require__(647); -var isPlainObject = __webpack_require__(603); -var isObject = __webpack_require__(643); +var split = __webpack_require__(607); +var extend = __webpack_require__(641); +var isPlainObject = __webpack_require__(597); +var isObject = __webpack_require__(637); module.exports = function(obj, prop, val) { if (!isObject(obj)) { @@ -73716,13 +71668,13 @@ function isValidKey(key) { /***/ }), -/* 647 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(643); +var isObject = __webpack_require__(637); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -73756,7 +71708,7 @@ function hasOwn(obj, key) { /***/ }), -/* 648 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73769,8 +71721,8 @@ function hasOwn(obj, key) { -var isObject = __webpack_require__(596); -var has = __webpack_require__(649); +var isObject = __webpack_require__(590); +var has = __webpack_require__(643); module.exports = function unset(obj, prop) { if (!isObject(obj)) { @@ -73795,7 +71747,7 @@ module.exports = function unset(obj, prop) { /***/ }), -/* 649 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73808,9 +71760,9 @@ module.exports = function unset(obj, prop) { -var isObject = __webpack_require__(650); -var hasValues = __webpack_require__(652); -var get = __webpack_require__(645); +var isObject = __webpack_require__(644); +var hasValues = __webpack_require__(646); +var get = __webpack_require__(639); module.exports = function(obj, prop, noZero) { if (isObject(obj)) { @@ -73821,7 +71773,7 @@ module.exports = function(obj, prop, noZero) { /***/ }), -/* 650 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73834,7 +71786,7 @@ module.exports = function(obj, prop, noZero) { -var isArray = __webpack_require__(651); +var isArray = __webpack_require__(645); module.exports = function isObject(val) { return val != null && typeof val === 'object' && isArray(val) === false; @@ -73842,7 +71794,7 @@ module.exports = function isObject(val) { /***/ }), -/* 651 */ +/* 645 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -73853,7 +71805,7 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 652 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73896,7 +71848,7 @@ module.exports = function hasValue(o, noZero) { /***/ }), -/* 653 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73909,9 +71861,9 @@ module.exports = function hasValue(o, noZero) { -var isObject = __webpack_require__(596); -var hasValues = __webpack_require__(654); -var get = __webpack_require__(645); +var isObject = __webpack_require__(590); +var hasValues = __webpack_require__(648); +var get = __webpack_require__(639); module.exports = function(val, prop) { return hasValues(isObject(val) && prop ? get(val, prop) : val); @@ -73919,7 +71871,7 @@ module.exports = function(val, prop) { /***/ }), -/* 654 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73932,8 +71884,8 @@ module.exports = function(val, prop) { -var typeOf = __webpack_require__(655); -var isNumber = __webpack_require__(618); +var typeOf = __webpack_require__(649); +var isNumber = __webpack_require__(612); module.exports = function hasValue(val) { // is-number checks for NaN and other edge cases @@ -73986,10 +71938,10 @@ module.exports = function hasValue(val) { /***/ }), -/* 655 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(620); +var isBuffer = __webpack_require__(614); var toString = Object.prototype.toString; /** @@ -74111,7 +72063,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 656 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74124,10 +72076,10 @@ module.exports = function kindOf(val) { -var split = __webpack_require__(613); -var extend = __webpack_require__(647); -var isPlainObject = __webpack_require__(603); -var isObject = __webpack_require__(643); +var split = __webpack_require__(607); +var extend = __webpack_require__(641); +var isPlainObject = __webpack_require__(597); +var isObject = __webpack_require__(637); module.exports = function(obj, prop, val) { if (!isObject(obj)) { @@ -74173,14 +72125,14 @@ function isValidKey(key) { /***/ }), -/* 657 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(658); -var forIn = __webpack_require__(659); +var isExtendable = __webpack_require__(652); +var forIn = __webpack_require__(653); function mixinDeep(target, objects) { var len = arguments.length, i = 0; @@ -74244,7 +72196,7 @@ module.exports = mixinDeep; /***/ }), -/* 658 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74257,7 +72209,7 @@ module.exports = mixinDeep; -var isPlainObject = __webpack_require__(603); +var isPlainObject = __webpack_require__(597); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -74265,7 +72217,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 659 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74288,7 +72240,7 @@ module.exports = function forIn(obj, fn, thisArg) { /***/ }), -/* 660 */ +/* 654 */ /***/ (function(module, exports) { /*! @@ -74315,14 +72267,14 @@ module.exports = pascalcase; /***/ }), -/* 661 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(113); -var utils = __webpack_require__(662); +var utils = __webpack_require__(656); /** * Expose class utils @@ -74687,7 +72639,7 @@ cu.bubble = function(Parent, events) { /***/ }), -/* 662 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74701,10 +72653,10 @@ var utils = {}; * Lazily required module dependencies */ -utils.union = __webpack_require__(644); -utils.define = __webpack_require__(663); -utils.isObj = __webpack_require__(596); -utils.staticExtend = __webpack_require__(670); +utils.union = __webpack_require__(638); +utils.define = __webpack_require__(657); +utils.isObj = __webpack_require__(590); +utils.staticExtend = __webpack_require__(664); /** @@ -74715,7 +72667,7 @@ module.exports = utils; /***/ }), -/* 663 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74728,7 +72680,7 @@ module.exports = utils; -var isDescriptor = __webpack_require__(664); +var isDescriptor = __webpack_require__(658); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -74753,7 +72705,7 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 664 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74766,9 +72718,9 @@ module.exports = function defineProperty(obj, prop, val) { -var typeOf = __webpack_require__(665); -var isAccessor = __webpack_require__(666); -var isData = __webpack_require__(668); +var typeOf = __webpack_require__(659); +var isAccessor = __webpack_require__(660); +var isData = __webpack_require__(662); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -74782,7 +72734,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 665 */ +/* 659 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -74935,7 +72887,7 @@ function isBuffer(val) { /***/ }), -/* 666 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74948,7 +72900,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(667); +var typeOf = __webpack_require__(661); // accessor descriptor properties var accessor = { @@ -75011,10 +72963,10 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 667 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(620); +var isBuffer = __webpack_require__(614); var toString = Object.prototype.toString; /** @@ -75133,7 +73085,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 668 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75146,7 +73098,7 @@ module.exports = function kindOf(val) { -var typeOf = __webpack_require__(669); +var typeOf = __webpack_require__(663); // data descriptor properties var data = { @@ -75195,10 +73147,10 @@ module.exports = isDataDescriptor; /***/ }), -/* 669 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(620); +var isBuffer = __webpack_require__(614); var toString = Object.prototype.toString; /** @@ -75317,7 +73269,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 670 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75330,8 +73282,8 @@ module.exports = function kindOf(val) { -var copy = __webpack_require__(671); -var define = __webpack_require__(663); +var copy = __webpack_require__(665); +var define = __webpack_require__(657); var util = __webpack_require__(113); /** @@ -75414,15 +73366,15 @@ module.exports = extend; /***/ }), -/* 671 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var typeOf = __webpack_require__(672); -var copyDescriptor = __webpack_require__(673); -var define = __webpack_require__(663); +var typeOf = __webpack_require__(666); +var copyDescriptor = __webpack_require__(667); +var define = __webpack_require__(657); /** * Copy static properties, prototype properties, and descriptors from one object to another. @@ -75595,10 +73547,10 @@ module.exports.has = has; /***/ }), -/* 672 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(620); +var isBuffer = __webpack_require__(614); var toString = Object.prototype.toString; /** @@ -75717,7 +73669,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 673 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75805,16 +73757,16 @@ function isObject(val) { /***/ }), -/* 674 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(675); -var define = __webpack_require__(663); +var use = __webpack_require__(669); +var define = __webpack_require__(657); var debug = __webpack_require__(205)('snapdragon:compiler'); -var utils = __webpack_require__(677); +var utils = __webpack_require__(671); /** * Create a new `Compiler` with the given `options`. @@ -75968,7 +73920,7 @@ Compiler.prototype = { // source map support if (opts.sourcemap) { - var sourcemaps = __webpack_require__(696); + var sourcemaps = __webpack_require__(690); sourcemaps(this); this.mapVisit(this.ast.nodes); this.applySourceMaps(); @@ -75989,7 +73941,7 @@ module.exports = Compiler; /***/ }), -/* 675 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76002,7 +73954,7 @@ module.exports = Compiler; -var utils = __webpack_require__(676); +var utils = __webpack_require__(670); module.exports = function base(app, opts) { if (!utils.isObject(app) && typeof app !== 'function') { @@ -76117,7 +74069,7 @@ module.exports = function base(app, opts) { /***/ }), -/* 676 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76131,8 +74083,8 @@ var utils = {}; * Lazily required module dependencies */ -utils.define = __webpack_require__(663); -utils.isObject = __webpack_require__(596); +utils.define = __webpack_require__(657); +utils.isObject = __webpack_require__(590); utils.isString = function(val) { @@ -76147,7 +74099,7 @@ module.exports = utils; /***/ }), -/* 677 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76157,9 +74109,9 @@ module.exports = utils; * Module dependencies */ -exports.extend = __webpack_require__(647); -exports.SourceMap = __webpack_require__(678); -exports.sourceMapResolve = __webpack_require__(689); +exports.extend = __webpack_require__(641); +exports.SourceMap = __webpack_require__(672); +exports.sourceMapResolve = __webpack_require__(683); /** * Convert backslash in the given string to forward slashes @@ -76202,7 +74154,7 @@ exports.last = function(arr, n) { /***/ }), -/* 678 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { /* @@ -76210,13 +74162,13 @@ exports.last = function(arr, n) { * Licensed under the New BSD license. See LICENSE.txt or: * http://opensource.org/licenses/BSD-3-Clause */ -exports.SourceMapGenerator = __webpack_require__(679).SourceMapGenerator; -exports.SourceMapConsumer = __webpack_require__(685).SourceMapConsumer; -exports.SourceNode = __webpack_require__(688).SourceNode; +exports.SourceMapGenerator = __webpack_require__(673).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(679).SourceMapConsumer; +exports.SourceNode = __webpack_require__(682).SourceNode; /***/ }), -/* 679 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -76226,10 +74178,10 @@ exports.SourceNode = __webpack_require__(688).SourceNode; * http://opensource.org/licenses/BSD-3-Clause */ -var base64VLQ = __webpack_require__(680); -var util = __webpack_require__(682); -var ArraySet = __webpack_require__(683).ArraySet; -var MappingList = __webpack_require__(684).MappingList; +var base64VLQ = __webpack_require__(674); +var util = __webpack_require__(676); +var ArraySet = __webpack_require__(677).ArraySet; +var MappingList = __webpack_require__(678).MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -76638,7 +74590,7 @@ exports.SourceMapGenerator = SourceMapGenerator; /***/ }), -/* 680 */ +/* 674 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -76678,7 +74630,7 @@ exports.SourceMapGenerator = SourceMapGenerator; * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -var base64 = __webpack_require__(681); +var base64 = __webpack_require__(675); // A single base 64 digit can contain 6 bits of data. For the base 64 variable // length quantities we use in the source map spec, the first bit is the sign, @@ -76784,7 +74736,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { /***/ }), -/* 681 */ +/* 675 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -76857,7 +74809,7 @@ exports.decode = function (charCode) { /***/ }), -/* 682 */ +/* 676 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -77280,7 +75232,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate /***/ }), -/* 683 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -77290,7 +75242,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(682); +var util = __webpack_require__(676); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; @@ -77407,7 +75359,7 @@ exports.ArraySet = ArraySet; /***/ }), -/* 684 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -77417,7 +75369,7 @@ exports.ArraySet = ArraySet; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(682); +var util = __webpack_require__(676); /** * Determine whether mappingB is after mappingA with respect to generated @@ -77492,7 +75444,7 @@ exports.MappingList = MappingList; /***/ }), -/* 685 */ +/* 679 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -77502,11 +75454,11 @@ exports.MappingList = MappingList; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(682); -var binarySearch = __webpack_require__(686); -var ArraySet = __webpack_require__(683).ArraySet; -var base64VLQ = __webpack_require__(680); -var quickSort = __webpack_require__(687).quickSort; +var util = __webpack_require__(676); +var binarySearch = __webpack_require__(680); +var ArraySet = __webpack_require__(677).ArraySet; +var base64VLQ = __webpack_require__(674); +var quickSort = __webpack_require__(681).quickSort; function SourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; @@ -78580,7 +76532,7 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; /***/ }), -/* 686 */ +/* 680 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -78697,7 +76649,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { /***/ }), -/* 687 */ +/* 681 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -78817,7 +76769,7 @@ exports.quickSort = function (ary, comparator) { /***/ }), -/* 688 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -78827,8 +76779,8 @@ exports.quickSort = function (ary, comparator) { * http://opensource.org/licenses/BSD-3-Clause */ -var SourceMapGenerator = __webpack_require__(679).SourceMapGenerator; -var util = __webpack_require__(682); +var SourceMapGenerator = __webpack_require__(673).SourceMapGenerator; +var util = __webpack_require__(676); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). @@ -79236,17 +77188,17 @@ exports.SourceNode = SourceNode; /***/ }), -/* 689 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014, 2015, 2016, 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var sourceMappingURL = __webpack_require__(690) -var resolveUrl = __webpack_require__(691) -var decodeUriComponent = __webpack_require__(692) -var urix = __webpack_require__(694) -var atob = __webpack_require__(695) +var sourceMappingURL = __webpack_require__(684) +var resolveUrl = __webpack_require__(685) +var decodeUriComponent = __webpack_require__(686) +var urix = __webpack_require__(688) +var atob = __webpack_require__(689) @@ -79544,7 +77496,7 @@ module.exports = { /***/ }), -/* 690 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;// Copyright 2014 Simon Lydell @@ -79607,7 +77559,7 @@ void (function(root, factory) { /***/ }), -/* 691 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -79625,13 +77577,13 @@ module.exports = resolveUrl /***/ }), -/* 692 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var decodeUriComponent = __webpack_require__(693) +var decodeUriComponent = __webpack_require__(687) function customDecodeUriComponent(string) { // `decodeUriComponent` turns `+` into ` `, but that's not wanted. @@ -79642,7 +77594,7 @@ module.exports = customDecodeUriComponent /***/ }), -/* 693 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79743,7 +77695,7 @@ module.exports = function (encodedURI) { /***/ }), -/* 694 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -79766,7 +77718,7 @@ module.exports = urix /***/ }), -/* 695 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79780,7 +77732,7 @@ module.exports = atob.atob = atob; /***/ }), -/* 696 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79788,8 +77740,8 @@ module.exports = atob.atob = atob; var fs = __webpack_require__(132); var path = __webpack_require__(4); -var define = __webpack_require__(663); -var utils = __webpack_require__(677); +var define = __webpack_require__(657); +var utils = __webpack_require__(671); /** * Expose `mixin()`. @@ -79932,19 +77884,19 @@ exports.comment = function(node) { /***/ }), -/* 697 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(675); +var use = __webpack_require__(669); var util = __webpack_require__(113); -var Cache = __webpack_require__(698); -var define = __webpack_require__(663); +var Cache = __webpack_require__(692); +var define = __webpack_require__(657); var debug = __webpack_require__(205)('snapdragon:parser'); -var Position = __webpack_require__(699); -var utils = __webpack_require__(677); +var Position = __webpack_require__(693); +var utils = __webpack_require__(671); /** * Create a new `Parser` with the given `input` and `options`. @@ -80472,7 +78424,7 @@ module.exports = Parser; /***/ }), -/* 698 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80579,13 +78531,13 @@ MapCache.prototype.del = function mapDelete(key) { /***/ }), -/* 699 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var define = __webpack_require__(663); +var define = __webpack_require__(657); /** * Store position for a node @@ -80600,14 +78552,14 @@ module.exports = function Position(start, parser) { /***/ }), -/* 700 */ +/* 694 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(701); -var assignSymbols = __webpack_require__(604); +var isExtendable = __webpack_require__(695); +var assignSymbols = __webpack_require__(598); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -80667,7 +78619,7 @@ function isEnum(obj, key) { /***/ }), -/* 701 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80680,7 +78632,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(603); +var isPlainObject = __webpack_require__(597); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -80688,14 +78640,14 @@ module.exports = function isExtendable(val) { /***/ }), -/* 702 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var nanomatch = __webpack_require__(703); -var extglob = __webpack_require__(717); +var nanomatch = __webpack_require__(697); +var extglob = __webpack_require__(711); module.exports = function(snapdragon) { var compilers = snapdragon.compiler.compilers; @@ -80772,7 +78724,7 @@ function escapeExtglobs(compiler) { /***/ }), -/* 703 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -80783,17 +78735,17 @@ function escapeExtglobs(compiler) { */ var util = __webpack_require__(113); -var toRegex = __webpack_require__(588); -var extend = __webpack_require__(704); +var toRegex = __webpack_require__(582); +var extend = __webpack_require__(698); /** * Local dependencies */ -var compilers = __webpack_require__(706); -var parsers = __webpack_require__(707); -var cache = __webpack_require__(710); -var utils = __webpack_require__(712); +var compilers = __webpack_require__(700); +var parsers = __webpack_require__(701); +var cache = __webpack_require__(704); +var utils = __webpack_require__(706); var MAX_LENGTH = 1024 * 64; /** @@ -81617,14 +79569,14 @@ module.exports = nanomatch; /***/ }), -/* 704 */ +/* 698 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(705); -var assignSymbols = __webpack_require__(604); +var isExtendable = __webpack_require__(699); +var assignSymbols = __webpack_require__(598); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -81684,7 +79636,7 @@ function isEnum(obj, key) { /***/ }), -/* 705 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81697,7 +79649,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(603); +var isPlainObject = __webpack_require__(597); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -81705,7 +79657,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 706 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82051,15 +80003,15 @@ module.exports = function(nanomatch, options) { /***/ }), -/* 707 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var regexNot = __webpack_require__(605); -var toRegex = __webpack_require__(588); -var isOdd = __webpack_require__(708); +var regexNot = __webpack_require__(599); +var toRegex = __webpack_require__(582); +var isOdd = __webpack_require__(702); /** * Characters to use in negation regex (we want to "not" match @@ -82445,7 +80397,7 @@ module.exports.not = NOT_REGEX; /***/ }), -/* 708 */ +/* 702 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82458,7 +80410,7 @@ module.exports.not = NOT_REGEX; -var isNumber = __webpack_require__(709); +var isNumber = __webpack_require__(703); module.exports = function isOdd(i) { if (!isNumber(i)) { @@ -82472,7 +80424,7 @@ module.exports = function isOdd(i) { /***/ }), -/* 709 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82500,14 +80452,14 @@ module.exports = function isNumber(num) { /***/ }), -/* 710 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(711))(); +module.exports = new (__webpack_require__(705))(); /***/ }), -/* 711 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82520,7 +80472,7 @@ module.exports = new (__webpack_require__(711))(); -var MapCache = __webpack_require__(698); +var MapCache = __webpack_require__(692); /** * Create a new `FragmentCache` with an optional object to use for `caches`. @@ -82642,7 +80594,7 @@ exports = module.exports = FragmentCache; /***/ }), -/* 712 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82655,14 +80607,14 @@ var path = __webpack_require__(4); * Module dependencies */ -var isWindows = __webpack_require__(713)(); -var Snapdragon = __webpack_require__(632); -utils.define = __webpack_require__(714); -utils.diff = __webpack_require__(715); -utils.extend = __webpack_require__(704); -utils.pick = __webpack_require__(716); -utils.typeOf = __webpack_require__(598); -utils.unique = __webpack_require__(608); +var isWindows = __webpack_require__(707)(); +var Snapdragon = __webpack_require__(626); +utils.define = __webpack_require__(708); +utils.diff = __webpack_require__(709); +utils.extend = __webpack_require__(698); +utils.pick = __webpack_require__(710); +utils.typeOf = __webpack_require__(592); +utils.unique = __webpack_require__(602); /** * Returns true if the given value is effectively an empty string @@ -83028,7 +80980,7 @@ utils.unixify = function(options) { /***/ }), -/* 713 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -83056,7 +81008,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 714 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83069,8 +81021,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ -var isobject = __webpack_require__(596); -var isDescriptor = __webpack_require__(597); +var isobject = __webpack_require__(590); +var isDescriptor = __webpack_require__(591); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -83101,7 +81053,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 715 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83155,7 +81107,7 @@ function diffArray(one, two) { /***/ }), -/* 716 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83168,7 +81120,7 @@ function diffArray(one, two) { -var isObject = __webpack_require__(596); +var isObject = __webpack_require__(590); module.exports = function pick(obj, keys) { if (!isObject(obj) && typeof obj !== 'function') { @@ -83197,7 +81149,7 @@ module.exports = function pick(obj, keys) { /***/ }), -/* 717 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83207,18 +81159,18 @@ module.exports = function pick(obj, keys) { * Module dependencies */ -var extend = __webpack_require__(647); -var unique = __webpack_require__(608); -var toRegex = __webpack_require__(588); +var extend = __webpack_require__(641); +var unique = __webpack_require__(602); +var toRegex = __webpack_require__(582); /** * Local dependencies */ -var compilers = __webpack_require__(718); -var parsers = __webpack_require__(724); -var Extglob = __webpack_require__(727); -var utils = __webpack_require__(726); +var compilers = __webpack_require__(712); +var parsers = __webpack_require__(718); +var Extglob = __webpack_require__(721); +var utils = __webpack_require__(720); var MAX_LENGTH = 1024 * 64; /** @@ -83535,13 +81487,13 @@ module.exports = extglob; /***/ }), -/* 718 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(719); +var brackets = __webpack_require__(713); /** * Extglob compilers @@ -83711,7 +81663,7 @@ module.exports = function(extglob) { /***/ }), -/* 719 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83721,17 +81673,17 @@ module.exports = function(extglob) { * Local dependencies */ -var compilers = __webpack_require__(720); -var parsers = __webpack_require__(722); +var compilers = __webpack_require__(714); +var parsers = __webpack_require__(716); /** * Module dependencies */ var debug = __webpack_require__(205)('expand-brackets'); -var extend = __webpack_require__(647); -var Snapdragon = __webpack_require__(632); -var toRegex = __webpack_require__(588); +var extend = __webpack_require__(641); +var Snapdragon = __webpack_require__(626); +var toRegex = __webpack_require__(582); /** * Parses the given POSIX character class `pattern` and returns a @@ -83929,13 +81881,13 @@ module.exports = brackets; /***/ }), -/* 720 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var posix = __webpack_require__(721); +var posix = __webpack_require__(715); module.exports = function(brackets) { brackets.compiler @@ -84023,7 +81975,7 @@ module.exports = function(brackets) { /***/ }), -/* 721 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84052,14 +82004,14 @@ module.exports = { /***/ }), -/* 722 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(723); -var define = __webpack_require__(663); +var utils = __webpack_require__(717); +var define = __webpack_require__(657); /** * Text regex @@ -84278,14 +82230,14 @@ module.exports.TEXT_REGEX = TEXT_REGEX; /***/ }), -/* 723 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var toRegex = __webpack_require__(588); -var regexNot = __webpack_require__(605); +var toRegex = __webpack_require__(582); +var regexNot = __webpack_require__(599); var cached; /** @@ -84319,15 +82271,15 @@ exports.createRegex = function(pattern, include) { /***/ }), -/* 724 */ +/* 718 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(719); -var define = __webpack_require__(725); -var utils = __webpack_require__(726); +var brackets = __webpack_require__(713); +var define = __webpack_require__(719); +var utils = __webpack_require__(720); /** * Characters to use in text regex (we want to "not" match @@ -84482,7 +82434,7 @@ module.exports = parsers; /***/ }), -/* 725 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84495,7 +82447,7 @@ module.exports = parsers; -var isDescriptor = __webpack_require__(597); +var isDescriptor = __webpack_require__(591); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -84520,14 +82472,14 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 726 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var regex = __webpack_require__(605); -var Cache = __webpack_require__(711); +var regex = __webpack_require__(599); +var Cache = __webpack_require__(705); /** * Utils @@ -84596,7 +82548,7 @@ utils.createRegex = function(str) { /***/ }), -/* 727 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84606,16 +82558,16 @@ utils.createRegex = function(str) { * Module dependencies */ -var Snapdragon = __webpack_require__(632); -var define = __webpack_require__(725); -var extend = __webpack_require__(647); +var Snapdragon = __webpack_require__(626); +var define = __webpack_require__(719); +var extend = __webpack_require__(641); /** * Local dependencies */ -var compilers = __webpack_require__(718); -var parsers = __webpack_require__(724); +var compilers = __webpack_require__(712); +var parsers = __webpack_require__(718); /** * Customize Snapdragon parser and renderer @@ -84681,16 +82633,16 @@ module.exports = Extglob; /***/ }), -/* 728 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extglob = __webpack_require__(717); -var nanomatch = __webpack_require__(703); -var regexNot = __webpack_require__(605); -var toRegex = __webpack_require__(588); +var extglob = __webpack_require__(711); +var nanomatch = __webpack_require__(697); +var regexNot = __webpack_require__(599); +var toRegex = __webpack_require__(582); var not; /** @@ -84771,14 +82723,14 @@ function textRegex(pattern) { /***/ }), -/* 729 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(711))(); +module.exports = new (__webpack_require__(705))(); /***/ }), -/* 730 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84791,13 +82743,13 @@ var path = __webpack_require__(4); * Module dependencies */ -var Snapdragon = __webpack_require__(632); -utils.define = __webpack_require__(731); -utils.diff = __webpack_require__(715); -utils.extend = __webpack_require__(700); -utils.pick = __webpack_require__(716); -utils.typeOf = __webpack_require__(598); -utils.unique = __webpack_require__(608); +var Snapdragon = __webpack_require__(626); +utils.define = __webpack_require__(725); +utils.diff = __webpack_require__(709); +utils.extend = __webpack_require__(694); +utils.pick = __webpack_require__(710); +utils.typeOf = __webpack_require__(592); +utils.unique = __webpack_require__(602); /** * Returns true if the platform is windows, or `path.sep` is `\\`. @@ -85094,7 +83046,7 @@ utils.unixify = function(options) { /***/ }), -/* 731 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85107,8 +83059,8 @@ utils.unixify = function(options) { -var isobject = __webpack_require__(596); -var isDescriptor = __webpack_require__(597); +var isobject = __webpack_require__(590); +var isDescriptor = __webpack_require__(591); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -85139,7 +83091,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 732 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85158,9 +83110,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(733); -var reader_1 = __webpack_require__(746); -var fs_stream_1 = __webpack_require__(750); +var readdir = __webpack_require__(727); +var reader_1 = __webpack_require__(740); +var fs_stream_1 = __webpack_require__(744); var ReaderAsync = /** @class */ (function (_super) { __extends(ReaderAsync, _super); function ReaderAsync() { @@ -85221,15 +83173,15 @@ exports.default = ReaderAsync; /***/ }), -/* 733 */ +/* 727 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const readdirSync = __webpack_require__(734); -const readdirAsync = __webpack_require__(742); -const readdirStream = __webpack_require__(745); +const readdirSync = __webpack_require__(728); +const readdirAsync = __webpack_require__(736); +const readdirStream = __webpack_require__(739); module.exports = exports = readdirAsyncPath; exports.readdir = exports.readdirAsync = exports.async = readdirAsyncPath; @@ -85313,7 +83265,7 @@ function readdirStreamStat (dir, options) { /***/ }), -/* 734 */ +/* 728 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85321,11 +83273,11 @@ function readdirStreamStat (dir, options) { module.exports = readdirSync; -const DirectoryReader = __webpack_require__(735); +const DirectoryReader = __webpack_require__(729); let syncFacade = { - fs: __webpack_require__(740), - forEach: __webpack_require__(741), + fs: __webpack_require__(734), + forEach: __webpack_require__(735), sync: true }; @@ -85354,7 +83306,7 @@ function readdirSync (dir, options, internalOptions) { /***/ }), -/* 735 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85363,9 +83315,9 @@ function readdirSync (dir, options, internalOptions) { const Readable = __webpack_require__(173).Readable; const EventEmitter = __webpack_require__(164).EventEmitter; const path = __webpack_require__(4); -const normalizeOptions = __webpack_require__(736); -const stat = __webpack_require__(738); -const call = __webpack_require__(739); +const normalizeOptions = __webpack_require__(730); +const stat = __webpack_require__(732); +const call = __webpack_require__(733); /** * Asynchronously reads the contents of a directory and streams the results @@ -85741,14 +83693,14 @@ module.exports = DirectoryReader; /***/ }), -/* 736 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const globToRegExp = __webpack_require__(737); +const globToRegExp = __webpack_require__(731); module.exports = normalizeOptions; @@ -85925,7 +83877,7 @@ function normalizeOptions (options, internalOptions) { /***/ }), -/* 737 */ +/* 731 */ /***/ (function(module, exports) { module.exports = function (glob, opts) { @@ -86062,13 +84014,13 @@ module.exports = function (glob, opts) { /***/ }), -/* 738 */ +/* 732 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const call = __webpack_require__(739); +const call = __webpack_require__(733); module.exports = stat; @@ -86143,7 +84095,7 @@ function symlinkStat (fs, path, lstats, callback) { /***/ }), -/* 739 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86204,14 +84156,14 @@ function callOnce (fn) { /***/ }), -/* 740 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(132); -const call = __webpack_require__(739); +const call = __webpack_require__(733); /** * A facade around {@link fs.readdirSync} that allows it to be called @@ -86275,7 +84227,7 @@ exports.lstat = function (path, callback) { /***/ }), -/* 741 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86304,7 +84256,7 @@ function syncForEach (array, iterator, done) { /***/ }), -/* 742 */ +/* 736 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86312,12 +84264,12 @@ function syncForEach (array, iterator, done) { module.exports = readdirAsync; -const maybe = __webpack_require__(743); -const DirectoryReader = __webpack_require__(735); +const maybe = __webpack_require__(737); +const DirectoryReader = __webpack_require__(729); let asyncFacade = { fs: __webpack_require__(132), - forEach: __webpack_require__(744), + forEach: __webpack_require__(738), async: true }; @@ -86359,7 +84311,7 @@ function readdirAsync (dir, options, callback, internalOptions) { /***/ }), -/* 743 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86386,7 +84338,7 @@ module.exports = function maybe (cb, promise) { /***/ }), -/* 744 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86422,7 +84374,7 @@ function asyncForEach (array, iterator, done) { /***/ }), -/* 745 */ +/* 739 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86430,11 +84382,11 @@ function asyncForEach (array, iterator, done) { module.exports = readdirStream; -const DirectoryReader = __webpack_require__(735); +const DirectoryReader = __webpack_require__(729); let streamFacade = { fs: __webpack_require__(132), - forEach: __webpack_require__(744), + forEach: __webpack_require__(738), async: true }; @@ -86454,16 +84406,16 @@ function readdirStream (dir, options, internalOptions) { /***/ }), -/* 746 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(4); -var deep_1 = __webpack_require__(747); -var entry_1 = __webpack_require__(749); -var pathUtil = __webpack_require__(748); +var deep_1 = __webpack_require__(741); +var entry_1 = __webpack_require__(743); +var pathUtil = __webpack_require__(742); var Reader = /** @class */ (function () { function Reader(options) { this.options = options; @@ -86529,14 +84481,14 @@ exports.default = Reader; /***/ }), -/* 747 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(748); -var patternUtils = __webpack_require__(582); +var pathUtils = __webpack_require__(742); +var patternUtils = __webpack_require__(576); var DeepFilter = /** @class */ (function () { function DeepFilter(options, micromatchOptions) { this.options = options; @@ -86619,7 +84571,7 @@ exports.default = DeepFilter; /***/ }), -/* 748 */ +/* 742 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86650,14 +84602,14 @@ exports.makeAbsolute = makeAbsolute; /***/ }), -/* 749 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(748); -var patternUtils = __webpack_require__(582); +var pathUtils = __webpack_require__(742); +var patternUtils = __webpack_require__(576); var EntryFilter = /** @class */ (function () { function EntryFilter(options, micromatchOptions) { this.options = options; @@ -86742,7 +84694,7 @@ exports.default = EntryFilter; /***/ }), -/* 750 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86762,8 +84714,8 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(173); -var fsStat = __webpack_require__(751); -var fs_1 = __webpack_require__(755); +var fsStat = __webpack_require__(745); +var fs_1 = __webpack_require__(749); var FileSystemStream = /** @class */ (function (_super) { __extends(FileSystemStream, _super); function FileSystemStream() { @@ -86813,14 +84765,14 @@ exports.default = FileSystemStream; /***/ }), -/* 751 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const optionsManager = __webpack_require__(752); -const statProvider = __webpack_require__(754); +const optionsManager = __webpack_require__(746); +const statProvider = __webpack_require__(748); /** * Asynchronous API. */ @@ -86851,13 +84803,13 @@ exports.statSync = statSync; /***/ }), -/* 752 */ +/* 746 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsAdapter = __webpack_require__(753); +const fsAdapter = __webpack_require__(747); function prepare(opts) { const options = Object.assign({ fs: fsAdapter.getFileSystemAdapter(opts ? opts.fs : undefined), @@ -86870,7 +84822,7 @@ exports.prepare = prepare; /***/ }), -/* 753 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86893,7 +84845,7 @@ exports.getFileSystemAdapter = getFileSystemAdapter; /***/ }), -/* 754 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86945,7 +84897,7 @@ exports.isFollowedSymlink = isFollowedSymlink; /***/ }), -/* 755 */ +/* 749 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86976,7 +84928,7 @@ exports.default = FileSystem; /***/ }), -/* 756 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86996,9 +84948,9 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(173); -var readdir = __webpack_require__(733); -var reader_1 = __webpack_require__(746); -var fs_stream_1 = __webpack_require__(750); +var readdir = __webpack_require__(727); +var reader_1 = __webpack_require__(740); +var fs_stream_1 = __webpack_require__(744); var TransformStream = /** @class */ (function (_super) { __extends(TransformStream, _super); function TransformStream(reader) { @@ -87066,7 +85018,7 @@ exports.default = ReaderStream; /***/ }), -/* 757 */ +/* 751 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87085,9 +85037,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(733); -var reader_1 = __webpack_require__(746); -var fs_sync_1 = __webpack_require__(758); +var readdir = __webpack_require__(727); +var reader_1 = __webpack_require__(740); +var fs_sync_1 = __webpack_require__(752); var ReaderSync = /** @class */ (function (_super) { __extends(ReaderSync, _super); function ReaderSync() { @@ -87147,7 +85099,7 @@ exports.default = ReaderSync; /***/ }), -/* 758 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87166,8 +85118,8 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var fsStat = __webpack_require__(751); -var fs_1 = __webpack_require__(755); +var fsStat = __webpack_require__(745); +var fs_1 = __webpack_require__(749); var FileSystemSync = /** @class */ (function (_super) { __extends(FileSystemSync, _super); function FileSystemSync() { @@ -87213,7 +85165,7 @@ exports.default = FileSystemSync; /***/ }), -/* 759 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87229,7 +85181,7 @@ exports.flatten = flatten; /***/ }), -/* 760 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87250,13 +85202,13 @@ exports.merge = merge; /***/ }), -/* 761 */ +/* 755 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const pathType = __webpack_require__(762); +const pathType = __webpack_require__(756); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; @@ -87322,13 +85274,13 @@ module.exports.sync = (input, opts) => { /***/ }), -/* 762 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(132); -const pify = __webpack_require__(763); +const pify = __webpack_require__(757); function type(fn, fn2, fp) { if (typeof fp !== 'string') { @@ -87371,7 +85323,7 @@ exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); /***/ }), -/* 763 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87462,17 +85414,17 @@ module.exports = (obj, opts) => { /***/ }), -/* 764 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(132); const path = __webpack_require__(4); -const fastGlob = __webpack_require__(578); -const gitIgnore = __webpack_require__(765); -const pify = __webpack_require__(410); -const slash = __webpack_require__(766); +const fastGlob = __webpack_require__(572); +const gitIgnore = __webpack_require__(759); +const pify = __webpack_require__(404); +const slash = __webpack_require__(760); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -87570,7 +85522,7 @@ module.exports.sync = options => { /***/ }), -/* 765 */ +/* 759 */ /***/ (function(module, exports) { // A simple implementation of make-array @@ -88039,7 +85991,7 @@ module.exports = options => new IgnoreBase(options) /***/ }), -/* 766 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88057,7 +86009,7 @@ module.exports = input => { /***/ }), -/* 767 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88070,7 +86022,7 @@ module.exports = input => { -var isGlob = __webpack_require__(768); +var isGlob = __webpack_require__(762); module.exports = function hasGlob(val) { if (val == null) return false; @@ -88090,7 +86042,7 @@ module.exports = function hasGlob(val) { /***/ }), -/* 768 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -88121,17 +86073,17 @@ module.exports = function isGlob(str) { /***/ }), -/* 769 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); const {constants: fsConstants} = __webpack_require__(132); -const pEvent = __webpack_require__(770); -const CpFileError = __webpack_require__(773); -const fs = __webpack_require__(775); -const ProgressEmitter = __webpack_require__(778); +const pEvent = __webpack_require__(764); +const CpFileError = __webpack_require__(767); +const fs = __webpack_require__(769); +const ProgressEmitter = __webpack_require__(772); const cpFileAsync = async (source, destination, options, progressEmitter) => { let readError; @@ -88245,12 +86197,12 @@ module.exports.sync = (source, destination, options) => { /***/ }), -/* 770 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pTimeout = __webpack_require__(771); +const pTimeout = __webpack_require__(765); const symbolAsyncIterator = Symbol.asyncIterator || '@@asyncIterator'; @@ -88541,12 +86493,12 @@ module.exports.iterator = (emitter, event, options) => { /***/ }), -/* 771 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pFinally = __webpack_require__(772); +const pFinally = __webpack_require__(766); class TimeoutError extends Error { constructor(message) { @@ -88592,7 +86544,7 @@ module.exports.TimeoutError = TimeoutError; /***/ }), -/* 772 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88614,12 +86566,12 @@ module.exports = (promise, onFinally) => { /***/ }), -/* 773 */ +/* 767 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(774); +const NestedError = __webpack_require__(768); class CpFileError extends NestedError { constructor(message, nested) { @@ -88633,7 +86585,7 @@ module.exports = CpFileError; /***/ }), -/* 774 */ +/* 768 */ /***/ (function(module, exports, __webpack_require__) { var inherits = __webpack_require__(113).inherits; @@ -88689,16 +86641,16 @@ module.exports = NestedError; /***/ }), -/* 775 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const {promisify} = __webpack_require__(113); const fs = __webpack_require__(233); -const makeDir = __webpack_require__(776); -const pEvent = __webpack_require__(770); -const CpFileError = __webpack_require__(773); +const makeDir = __webpack_require__(770); +const pEvent = __webpack_require__(764); +const CpFileError = __webpack_require__(767); const stat = promisify(fs.stat); const lstat = promisify(fs.lstat); @@ -88795,7 +86747,7 @@ exports.copyFileSync = (source, destination, flags) => { /***/ }), -/* 776 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88803,7 +86755,7 @@ exports.copyFileSync = (source, destination, flags) => { const fs = __webpack_require__(132); const path = __webpack_require__(4); const {promisify} = __webpack_require__(113); -const semver = __webpack_require__(777); +const semver = __webpack_require__(771); const useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0'); @@ -88958,7 +86910,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 777 */ +/* 771 */ /***/ (function(module, exports) { exports = module.exports = SemVer @@ -90560,7 +88512,7 @@ function coerce (version, options) { /***/ }), -/* 778 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90601,7 +88553,7 @@ module.exports = ProgressEmitter; /***/ }), -/* 779 */ +/* 773 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90647,12 +88599,12 @@ exports.default = module.exports; /***/ }), -/* 780 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pMap = __webpack_require__(781); +const pMap = __webpack_require__(775); const pFilter = async (iterable, filterer, options) => { const values = await pMap( @@ -90669,7 +88621,7 @@ module.exports.default = pFilter; /***/ }), -/* 781 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90748,12 +88700,12 @@ module.exports.default = pMap; /***/ }), -/* 782 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(774); +const NestedError = __webpack_require__(768); class CpyError extends NestedError { constructor(message, nested) { @@ -90767,7 +88719,7 @@ module.exports = CpyError; /***/ }), -/* 783 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90775,10 +88727,10 @@ module.exports = CpyError; const fs = __webpack_require__(132); const arrayUnion = __webpack_require__(242); const merge2 = __webpack_require__(243); -const fastGlob = __webpack_require__(784); -const dirGlob = __webpack_require__(332); -const gitignore = __webpack_require__(815); -const {FilterStream, UniqueStream} = __webpack_require__(816); +const fastGlob = __webpack_require__(778); +const dirGlob = __webpack_require__(326); +const gitignore = __webpack_require__(809); +const {FilterStream, UniqueStream} = __webpack_require__(810); const DEFAULT_FILTER = () => false; @@ -90955,425 +88907,465 @@ module.exports.gitignore = gitignore; /***/ }), -/* 784 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -const taskManager = __webpack_require__(785); -const async_1 = __webpack_require__(801); -const stream_1 = __webpack_require__(811); -const sync_1 = __webpack_require__(812); -const settings_1 = __webpack_require__(814); -const utils = __webpack_require__(786); -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; + +const taskManager = __webpack_require__(779); +const async_1 = __webpack_require__(795); +const stream_1 = __webpack_require__(805); +const sync_1 = __webpack_require__(806); +const settings_1 = __webpack_require__(808); +const utils = __webpack_require__(780); +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; /***/ }), -/* 785 */ +/* 779 */ /***/ (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__(786); -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; -function convertPatternsToTasks(positive, negative, dynamic) { - const positivePatternsGroup = groupPatternsByBaseDirectory(positive); - // When we have a global group – there is no reason to divide the patterns into independent tasks. - // In this case, the global task covers the rest. - if ('.' in positivePatternsGroup) { - const task = convertPatternGroupToTask('.', positive, negative, dynamic); - return [task]; - } - return convertPatternGroupsToTasks(positivePatternsGroup, negative, dynamic); -} -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; + +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__(780); +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; /***/ }), -/* 786 */ +/* 780 */ /***/ (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__(787); -exports.array = array; -const errno = __webpack_require__(788); -exports.errno = errno; -const fs = __webpack_require__(789); -exports.fs = fs; -const path = __webpack_require__(790); -exports.path = path; -const pattern = __webpack_require__(791); -exports.pattern = pattern; -const stream = __webpack_require__(799); -exports.stream = stream; -const string = __webpack_require__(800); -exports.string = string; + +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__(781); +exports.array = array; +const errno = __webpack_require__(782); +exports.errno = errno; +const fs = __webpack_require__(783); +exports.fs = fs; +const path = __webpack_require__(784); +exports.path = path; +const pattern = __webpack_require__(785); +exports.pattern = pattern; +const stream = __webpack_require__(793); +exports.stream = stream; +const string = __webpack_require__(794); +exports.string = string; /***/ }), -/* 787 */ +/* 781 */ /***/ (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; + +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; /***/ }), -/* 788 */ +/* 782 */ /***/ (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; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isEnoentCodeError = void 0; +function isEnoentCodeError(error) { + return error.code === 'ENOENT'; +} +exports.isEnoentCodeError = isEnoentCodeError; /***/ }), -/* 789 */ +/* 783 */ /***/ (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; + +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; /***/ }), -/* 790 */ +/* 784 */ /***/ (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__(4); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0; +const path = __webpack_require__(4); +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; /***/ }), -/* 791 */ +/* 785 */ /***/ (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.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; -const path = __webpack_require__(4); -const globParent = __webpack_require__(265); -const micromatch = __webpack_require__(792); -const picomatch = __webpack_require__(285); -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; -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 } = picomatch.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; + +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__(4); +const globParent = __webpack_require__(265); +const micromatch = __webpack_require__(786); +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; /***/ }), -/* 792 */ +/* 786 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91381,8 +89373,8 @@ exports.matchAny = matchAny; const util = __webpack_require__(113); const braces = __webpack_require__(269); -const picomatch = __webpack_require__(793); -const utils = __webpack_require__(796); +const picomatch = __webpack_require__(787); +const utils = __webpack_require__(790); const isEmptyString = val => val === '' || val === './'; /** @@ -91847,27 +89839,27 @@ module.exports = micromatch; /***/ }), -/* 793 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = __webpack_require__(794); +module.exports = __webpack_require__(788); /***/ }), -/* 794 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(4); -const scan = __webpack_require__(795); -const parse = __webpack_require__(798); -const utils = __webpack_require__(796); -const constants = __webpack_require__(797); +const scan = __webpack_require__(789); +const parse = __webpack_require__(792); +const utils = __webpack_require__(790); +const constants = __webpack_require__(791); const isObject = val => val && typeof val === 'object' && !Array.isArray(val); /** @@ -92206,13 +90198,13 @@ module.exports = picomatch; /***/ }), -/* 795 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const utils = __webpack_require__(796); +const utils = __webpack_require__(790); const { CHAR_ASTERISK, /* * */ CHAR_AT, /* @ */ @@ -92229,7 +90221,7 @@ const { CHAR_RIGHT_CURLY_BRACE, /* } */ CHAR_RIGHT_PARENTHESES, /* ) */ CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = __webpack_require__(797); +} = __webpack_require__(791); const isPathSeparator = code => { return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; @@ -92604,7 +90596,7 @@ module.exports = scan; /***/ }), -/* 796 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -92617,7 +90609,7 @@ const { REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL -} = __webpack_require__(797); +} = __webpack_require__(791); exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); @@ -92675,7 +90667,7 @@ exports.wrapOutput = (input, state = {}, options = {}) => { /***/ }), -/* 797 */ +/* 791 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -92861,14 +90853,14 @@ module.exports = { /***/ }), -/* 798 */ +/* 792 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const constants = __webpack_require__(797); -const utils = __webpack_require__(796); +const constants = __webpack_require__(791); +const utils = __webpack_require__(790); /** * Constants @@ -93952,712 +91944,712 @@ module.exports = parse; /***/ }), -/* 799 */ +/* 793 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.merge = void 0; -const merge2 = __webpack_require__(243); -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')); -} + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.merge = void 0; +const merge2 = __webpack_require__(243); +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')); +} /***/ }), -/* 800 */ +/* 794 */ /***/ (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; + +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; /***/ }), -/* 801 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__(802); -const provider_1 = __webpack_require__(804); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = __webpack_require__(796); +const provider_1 = __webpack_require__(798); +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; /***/ }), -/* 802 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__(173); -const fsStat = __webpack_require__(295); -const fsWalk = __webpack_require__(300); -const reader_1 = __webpack_require__(803); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = __webpack_require__(173); +const fsStat = __webpack_require__(289); +const fsWalk = __webpack_require__(294); +const reader_1 = __webpack_require__(797); +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; /***/ }), -/* 803 */ +/* 797 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const path = __webpack_require__(4); -const fsStat = __webpack_require__(295); -const utils = __webpack_require__(786); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const path = __webpack_require__(4); +const fsStat = __webpack_require__(289); +const utils = __webpack_require__(780); +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; /***/ }), -/* 804 */ +/* 798 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const path = __webpack_require__(4); -const deep_1 = __webpack_require__(805); -const entry_1 = __webpack_require__(808); -const error_1 = __webpack_require__(809); -const entry_2 = __webpack_require__(810); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const path = __webpack_require__(4); +const deep_1 = __webpack_require__(799); +const entry_1 = __webpack_require__(802); +const error_1 = __webpack_require__(803); +const entry_2 = __webpack_require__(804); +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; /***/ }), -/* 805 */ +/* 799 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(786); -const partial_1 = __webpack_require__(806); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = __webpack_require__(780); +const partial_1 = __webpack_require__(800); +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; /***/ }), -/* 806 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const matcher_1 = __webpack_require__(807); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const matcher_1 = __webpack_require__(801); +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; /***/ }), -/* 807 */ +/* 801 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(786); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = __webpack_require__(780); +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; /***/ }), -/* 808 */ +/* 802 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(786); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = __webpack_require__(780); +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; /***/ }), -/* 809 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(786); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = __webpack_require__(780); +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; /***/ }), -/* 810 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(786); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const utils = __webpack_require__(780); +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; /***/ }), -/* 811 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__(173); -const stream_2 = __webpack_require__(802); -const provider_1 = __webpack_require__(804); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = __webpack_require__(173); +const stream_2 = __webpack_require__(796); +const provider_1 = __webpack_require__(798); +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; /***/ }), -/* 812 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const sync_1 = __webpack_require__(813); -const provider_1 = __webpack_require__(804); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const sync_1 = __webpack_require__(807); +const provider_1 = __webpack_require__(798); +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; /***/ }), -/* 813 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__(295); -const fsWalk = __webpack_require__(300); -const reader_1 = __webpack_require__(803); -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; + +Object.defineProperty(exports, "__esModule", { value: true }); +const fsStat = __webpack_require__(289); +const fsWalk = __webpack_require__(294); +const reader_1 = __webpack_require__(797); +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; /***/ }), -/* 814 */ +/* 808 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; -const fs = __webpack_require__(132); -const os = __webpack_require__(122); -/** - * 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; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; +const fs = __webpack_require__(132); +const os = __webpack_require__(122); +/** + * 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; /***/ }), -/* 815 */ +/* 809 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -94665,9 +92657,9 @@ exports.default = Settings; const {promisify} = __webpack_require__(113); const fs = __webpack_require__(132); const path = __webpack_require__(4); -const fastGlob = __webpack_require__(784); -const gitIgnore = __webpack_require__(335); -const slash = __webpack_require__(336); +const fastGlob = __webpack_require__(778); +const gitIgnore = __webpack_require__(329); +const slash = __webpack_require__(330); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -94784,7 +92776,7 @@ module.exports.sync = options => { /***/ }), -/* 816 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -94837,7 +92829,7 @@ module.exports = { /***/ }), -/* 817 */ +/* 811 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -94845,17 +92837,17 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildNonBazelProductionProjects", function() { return buildNonBazelProductionProjects; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getProductionProjects", function() { return getProductionProjects; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildProject", function() { return buildProject; }); -/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(571); +/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(565); /* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cpy__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(240); /* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(568); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(562); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(231); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(220); -/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(349); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(346); +/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(343); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(340); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License diff --git a/packages/kbn-react-field/BUILD.bazel b/packages/kbn-react-field/BUILD.bazel index 9cb2df76bd6c9..5165ca2fc90fc 100644 --- a/packages/kbn-react-field/BUILD.bazel +++ b/packages/kbn-react-field/BUILD.bazel @@ -42,7 +42,6 @@ RUNTIME_DEPS = [ ] TYPES_DEPS = [ - "//packages/kbn-babel-preset", "//packages/kbn-i18n", "@npm//tslib", "@npm//@types/jest", @@ -50,7 +49,6 @@ TYPES_DEPS = [ "@npm//@types/classnames", "@npm//@types/react", "@npm//@elastic/eui", - "@npm//resize-observer-polyfill", ] jsts_transpiler( diff --git a/packages/kbn-react-field/tsconfig.json b/packages/kbn-react-field/tsconfig.json index 90c8a63c746f1..4d37e1825c85a 100644 --- a/packages/kbn-react-field/tsconfig.json +++ b/packages/kbn-react-field/tsconfig.json @@ -10,7 +10,6 @@ "types": [ "jest", "node", - "resize-observer-polyfill" ] }, "include": [ diff --git a/packages/kbn-rule-data-utils/src/technical_field_names.ts b/packages/kbn-rule-data-utils/src/technical_field_names.ts index 49e1397d10f97..349719c019c22 100644 --- a/packages/kbn-rule-data-utils/src/technical_field_names.ts +++ b/packages/kbn-rule-data-utils/src/technical_field_names.ts @@ -13,7 +13,6 @@ const KIBANA_NAMESPACE = 'kibana' as const; const ALERT_NAMESPACE = `${KIBANA_NAMESPACE}.alert` as const; const ALERT_RULE_NAMESPACE = `${ALERT_NAMESPACE}.rule` as const; -const CONSUMERS = `${KIBANA_NAMESPACE}.consumers` as const; const ECS_VERSION = 'ecs.version' as const; const EVENT_ACTION = 'event.action' as const; const EVENT_KIND = 'event.kind' as const; @@ -85,7 +84,6 @@ const namespaces = { }; const fields = { - CONSUMERS, ECS_VERSION, EVENT_KIND, EVENT_ACTION, @@ -187,7 +185,6 @@ export { ALERT_START, ALERT_SYSTEM_STATUS, ALERT_UUID, - CONSUMERS, ECS_VERSION, EVENT_ACTION, EVENT_KIND, diff --git a/packages/kbn-securitysolution-autocomplete/BUILD.bazel b/packages/kbn-securitysolution-autocomplete/BUILD.bazel index ac90a0479ce2a..57ac8c62273e0 100644 --- a/packages/kbn-securitysolution-autocomplete/BUILD.bazel +++ b/packages/kbn-securitysolution-autocomplete/BUILD.bazel @@ -42,7 +42,6 @@ RUNTIME_DEPS = [ "@npm//enzyme", "@npm//moment", "@npm//react", - "@npm//resize-observer-polyfill", ] TYPES_DEPS = [ @@ -55,7 +54,6 @@ TYPES_DEPS = [ "@npm//@testing-library/react", "@npm//@testing-library/react-hooks", "@npm//moment", - "@npm//resize-observer-polyfill", "@npm//@types/enzyme", "@npm//@types/jest", "@npm//@types/node", diff --git a/packages/kbn-securitysolution-autocomplete/tsconfig.json b/packages/kbn-securitysolution-autocomplete/tsconfig.json index fa7eff8234011..b2e24676cdbd4 100644 --- a/packages/kbn-securitysolution-autocomplete/tsconfig.json +++ b/packages/kbn-securitysolution-autocomplete/tsconfig.json @@ -8,7 +8,7 @@ "sourceMap": true, "sourceRoot": "../../../../packages/kbn-securitysolution-autocomplete/src", "rootDir": "src", - "types": ["jest", "node", "resize-observer-polyfill"] + "types": ["jest", "node"] }, "include": ["src/**/*"], } diff --git a/packages/kbn-storybook/src/lib/theme_switcher.tsx b/packages/kbn-storybook/src/lib/theme_switcher.tsx index c06e57035819f..3d6f7999545a0 100644 --- a/packages/kbn-storybook/src/lib/theme_switcher.tsx +++ b/packages/kbn-storybook/src/lib/theme_switcher.tsx @@ -20,7 +20,7 @@ export function ThemeSwitcher() { const [globals, updateGlobals] = useGlobals(); const selectedTheme = globals.euiTheme; - if (!selectedTheme || selectedTheme === defaultTheme) { + if (!selectedTheme) { updateGlobals({ euiTheme: defaultTheme }); } diff --git a/packages/kbn-storybook/src/webpack.config.ts b/packages/kbn-storybook/src/webpack.config.ts index 53f9c82b86815..94b1a34728779 100644 --- a/packages/kbn-storybook/src/webpack.config.ts +++ b/packages/kbn-storybook/src/webpack.config.ts @@ -32,9 +32,11 @@ function isHtmlPlugin(plugin: any): plugin is { options: { template: string } } return !!(typeof plugin.options?.template === 'string'); } -function isBabelLoaderRule(rule: webpack.RuleSetRule): rule is webpack.RuleSetRule & { +interface BabelLoaderRule extends webpack.RuleSetRule { use: webpack.RuleSetLoader[]; -} { +} + +function isBabelLoaderRule(rule: webpack.RuleSetRule): rule is BabelLoaderRule { return !!( rule.use && Array.isArray(rule.use) && diff --git a/packages/kbn-test/src/jest/run.ts b/packages/kbn-test/src/jest/run.ts index 697402adf3dd1..26fa12497357c 100644 --- a/packages/kbn-test/src/jest/run.ts +++ b/packages/kbn-test/src/jest/run.ts @@ -36,8 +36,7 @@ declare global { interface Global {} interface InspectOptions {} - interface ConsoleConstructor - extends console.ConsoleConstructor {} + interface ConsoleConstructor extends console.ConsoleConstructor {} } } /* eslint-enable */ @@ -59,7 +58,7 @@ export function runJest(configName = 'jest.config.js') { const cwd: string = process.env.INIT_CWD || process.cwd(); if (!argv.config) { - testFiles = argv._.splice(2).map((p) => resolve(cwd, p)); + testFiles = argv._.splice(2).map((p) => resolve(cwd, p.toString())); const commonTestFiles = commonBasePath(testFiles); const testFilesProvided = testFiles.length > 0; diff --git a/packages/kbn-typed-react-router-config/BUILD.bazel b/packages/kbn-typed-react-router-config/BUILD.bazel index 7fccc53bd7449..b347915ae3310 100644 --- a/packages/kbn-typed-react-router-config/BUILD.bazel +++ b/packages/kbn-typed-react-router-config/BUILD.bazel @@ -41,6 +41,7 @@ TYPES_DEPS = [ "@npm//query-string", "@npm//utility-types", "@npm//@types/jest", + "@npm//@types/history", "@npm//@types/node", "@npm//@types/react-router-config", "@npm//@types/react-router-dom", diff --git a/packages/kbn-typed-react-router-config/src/create_router.test.tsx b/packages/kbn-typed-react-router-config/src/create_router.test.tsx index ac337f8bb5b87..e82fcf791804e 100644 --- a/packages/kbn-typed-react-router-config/src/create_router.test.tsx +++ b/packages/kbn-typed-react-router-config/src/create_router.test.tsx @@ -267,6 +267,7 @@ describe('createRouter', () => { const matches = router.matchRoutes('/', history.location); + // @ts-expect-error 4.3.5 upgrade - router doesn't seem able to merge properly when two routes match expect(matches[1]?.match.params).toEqual({ query: { rangeFrom: 'now-30m', @@ -285,6 +286,7 @@ describe('createRouter', () => { expect(matchedRoutes.length).toEqual(4); + // @ts-expect-error 4.3.5 upgrade - router doesn't seem able to merge properly when two routes match expect(matchedRoutes[matchedRoutes.length - 1].match).toEqual({ isExact: true, params: { diff --git a/packages/kbn-typed-react-router-config/src/create_router.ts b/packages/kbn-typed-react-router-config/src/create_router.ts index 89ff4fc6b0c6c..186f949d9c8e8 100644 --- a/packages/kbn-typed-react-router-config/src/create_router.ts +++ b/packages/kbn-typed-react-router-config/src/create_router.ts @@ -23,7 +23,7 @@ function toReactRouterPath(path: string) { return path.replace(/(?:{([^\/]+)})/g, ':$1'); } -export function createRouter(routes: TRoutes): Router { +export function createRouter(routes: TRoute[]): Router { const routesByReactRouterConfig = new Map(); const reactRouterConfigsByRoute = new Map(); @@ -181,10 +181,8 @@ export function createRouter(routes: TRoutes): Router { - return link(path, ...args); - }, + const router = { + link, getParams: (...args: any[]) => { const matches = matchRoutes(...args); return matches.length @@ -197,11 +195,13 @@ export function createRouter(routes: TRoutes): Router { return matchRoutes(...args) as any; }, - getRoutePath: (route) => { + getRoutePath: (route: Route) => { return reactRouterConfigsByRoute.get(route)!.path as string; }, getRoutesToMatch: (path: string) => { - return getRoutesToMatch(path) as unknown as FlattenRoutesOf; + return getRoutesToMatch(path) as unknown as FlattenRoutesOf; }, }; + + return router; } diff --git a/packages/kbn-typed-react-router-config/src/types/index.ts b/packages/kbn-typed-react-router-config/src/types/index.ts index c1ae5afd816ee..3c09b60054a0c 100644 --- a/packages/kbn-typed-react-router-config/src/types/index.ts +++ b/packages/kbn-typed-react-router-config/src/types/index.ts @@ -115,7 +115,7 @@ export interface RouteMatch { params: t.Type; } ? t.TypeOf - : {}; + : AnyObj; }; } @@ -160,10 +160,11 @@ interface ReadonlyPlainRoute { } export type Route = PlainRoute | ReadonlyPlainRoute; +type AnyObj = Record; interface DefaultOutput { - path: {}; - query: {}; + path: AnyObj; + query: AnyObj; } type OutputOfRouteMatch = TRouteMatch extends { @@ -190,20 +191,21 @@ type TypeOfRouteMatch = TRouteMatch extends { route: { params: t.Type }; } ? t.TypeOf - : {}; + : AnyObj; type TypeOfMatches = TRouteMatches extends [RouteMatch] ? TypeOfRouteMatch : TRouteMatches extends [RouteMatch, ...infer TNextRouteMatches] ? TypeOfRouteMatch & - (TNextRouteMatches extends RouteMatch[] ? TypeOfMatches : {}) - : {}; + (TNextRouteMatches extends RouteMatch[] ? TypeOfMatches : AnyObj) + : AnyObj; export type TypeOf< TRoutes extends Route[], TPath extends PathsOf, TWithDefaultOutput extends boolean = true -> = TypeOfMatches> & (TWithDefaultOutput extends true ? DefaultOutput : {}); +> = TypeOfMatches> & + (TWithDefaultOutput extends true ? DefaultOutput : AnyObj); export type TypeAsArgs = keyof TObject extends never ? [] @@ -276,7 +278,7 @@ type MapRoute = MaybeUnion< >; } > - : {} + : AnyObj >; type MapRoutes = TRoutes extends [Route] @@ -341,7 +343,7 @@ type MapRoutes = TRoutes extends [Route] MapRoute & MapRoute & MapRoute - : {}; + : AnyObj; // const element = null as any; diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index b75315120e90d..2beedafd699fd 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -53,7 +53,6 @@ RUNTIME_DEPS = [ "@npm//react-router", "@npm//react", "@npm//regenerator-runtime", - "@npm//resize-observer-polyfill", "@npm//rison-node", "@npm//rxjs", "@npm//styled-components", @@ -90,7 +89,6 @@ TYPES_DEPS = [ "@npm//react-router", "@npm//react-router-dom", "@npm//regenerator-runtime", - "@npm//resize-observer-polyfill", "@npm//rison-node", "@npm//rxjs", "@npm//styled-components", diff --git a/packages/kbn-ui-shared-deps-npm/tsconfig.json b/packages/kbn-ui-shared-deps-npm/tsconfig.json index be9a9462f76d8..107d82aa59ee8 100644 --- a/packages/kbn-ui-shared-deps-npm/tsconfig.json +++ b/packages/kbn-ui-shared-deps-npm/tsconfig.json @@ -11,7 +11,6 @@ "sourceRoot": "../../../../packages/kbn-ui-shared-deps-npm/src", "types": [ "node", - "resize-observer-polyfill" ] }, "include": [ diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index 3da5e0ed9a6ff..454121392ac68 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -45,7 +45,6 @@ TYPES_DEPS = [ "//packages/elastic-datemath:npm_module_types", "//packages/elastic-safer-lodash-set", "//packages/kbn-analytics:npm_module_types", - "//packages/kbn-babel-preset", "//packages/kbn-i18n:npm_module_types", "//packages/kbn-i18n-react:npm_module_types", "//packages/kbn-monaco", diff --git a/packages/kbn-ui-shared-deps-src/tsconfig.json b/packages/kbn-ui-shared-deps-src/tsconfig.json index bfee34694748d..521fb122e4659 100644 --- a/packages/kbn-ui-shared-deps-src/tsconfig.json +++ b/packages/kbn-ui-shared-deps-src/tsconfig.json @@ -11,7 +11,6 @@ "sourceRoot": "../../../../packages/kbn-ui-shared-deps-src/src", "types": [ "node", - "resize-observer-polyfill" ] }, "include": [ diff --git a/src/core/public/apm_system.ts b/src/core/public/apm_system.ts index 5201b7005c66e..f15a317f9f934 100644 --- a/src/core/public/apm_system.ts +++ b/src/core/public/apm_system.ts @@ -71,7 +71,7 @@ export class ApmSystem { start.application.currentAppId$.subscribe((appId) => { if (appId && this.apm) { this.closePageLoadTransaction(); - this.apm.startTransaction(`/app/${appId}`, 'route-change', { + this.apm.startTransaction(appId, 'app-change', { managed: true, canReuse: true, }); diff --git a/src/core/public/application/scoped_history.ts b/src/core/public/application/scoped_history.ts index 2ab60e66b860f..284465c8f305b 100644 --- a/src/core/public/application/scoped_history.ts +++ b/src/core/public/application/scoped_history.ts @@ -57,7 +57,10 @@ export class ScopedHistory */ private blockUnregisterCallbacks: Set = new Set(); - constructor(private readonly parentHistory: History, private readonly basePath: string) { + constructor( + private readonly parentHistory: History, + private readonly basePath: string + ) { const parentPath = this.parentHistory.location.pathname; if (!parentPath.startsWith(basePath)) { throw new Error( @@ -75,10 +78,8 @@ export class ScopedHistory * * @param basePath the URL path scope for the sub history */ - public createSubHistory = ( - basePath: string - ): ScopedHistory => { - return new ScopedHistory(this, basePath); + public createSubHistory = (basePath: string) => { + return new ScopedHistory(this, basePath); }; /** diff --git a/src/core/public/chrome/chrome_service.tsx b/src/core/public/chrome/chrome_service.tsx index ceb65827cd9a4..1a2f9d4296f8a 100644 --- a/src/core/public/chrome/chrome_service.tsx +++ b/src/core/public/chrome/chrome_service.tsx @@ -43,7 +43,7 @@ interface ConstructorParams { kibanaVersion: string; } -interface StartDeps { +export interface StartDeps { application: InternalApplicationStart; docLinks: DocLinksStart; http: HttpStart; diff --git a/src/core/public/core_app/core_app.ts b/src/core/public/core_app/core_app.ts index 00532b9150aef..648677e67e1cf 100644 --- a/src/core/public/core_app/core_app.ts +++ b/src/core/public/core_app/core_app.ts @@ -26,14 +26,14 @@ import { import { renderApp as renderStatusApp } from './status'; import { DocLinksStart } from '../doc_links'; -interface SetupDeps { +export interface SetupDeps { application: InternalApplicationSetup; http: HttpSetup; injectedMetadata: InjectedMetadataSetup; notifications: NotificationsSetup; } -interface StartDeps { +export interface StartDeps { application: InternalApplicationStart; docLinks: DocLinksStart; http: HttpStart; diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index 5bc7691d6a40f..24c085ef64de3 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -9,7 +9,7 @@ import { deepFreeze } from '@kbn/std'; import { InjectedMetadataSetup } from '../injected_metadata'; -interface StartDeps { +export interface StartDeps { injectedMetadata: InjectedMetadataSetup; } @@ -97,13 +97,11 @@ export class DocLinksService { indexingDocumentsSchema: `${APP_SEARCH_DOCS}indexing-documents-guide.html#indexing-documents-guide-schema`, logSettings: `${APP_SEARCH_DOCS}logs.html`, metaEngines: `${APP_SEARCH_DOCS}meta-engines-guide.html`, - nativeAuth: `${APP_SEARCH_DOCS}security-and-users.html#app-search-self-managed-security-and-user-management-elasticsearch-native-realm`, precisionTuning: `${APP_SEARCH_DOCS}precision-tuning.html`, relevanceTuning: `${APP_SEARCH_DOCS}relevance-tuning-guide.html`, resultSettings: `${APP_SEARCH_DOCS}result-settings-guide.html`, searchUI: `${APP_SEARCH_DOCS}reference-ui-guide.html`, security: `${APP_SEARCH_DOCS}security-and-users.html`, - standardAuth: `${APP_SEARCH_DOCS}security-and-users.html#app-search-self-managed-security-and-user-management-standard`, synonyms: `${APP_SEARCH_DOCS}synonyms-guide.html`, webCrawler: `${APP_SEARCH_DOCS}web-crawler.html`, webCrawlerEventLogs: `${APP_SEARCH_DOCS}view-web-crawler-events-logs.html`, @@ -130,7 +128,6 @@ export class DocLinksService { indexingSchedule: `${WORKPLACE_SEARCH_DOCS}workplace-search-customizing-indexing-rules.html#_indexing_schedule`, jiraCloud: `${WORKPLACE_SEARCH_DOCS}workplace-search-jira-cloud-connector.html`, jiraServer: `${WORKPLACE_SEARCH_DOCS}workplace-search-jira-server-connector.html`, - nativeAuth: `${WORKPLACE_SEARCH_DOCS}workplace-search-security.html#elasticsearch-native-realm`, oneDrive: `${WORKPLACE_SEARCH_DOCS}workplace-search-onedrive-connector.html`, permissions: `${WORKPLACE_SEARCH_DOCS}workplace-search-permissions.html#organizational-sources-private-sources`, salesforce: `${WORKPLACE_SEARCH_DOCS}workplace-search-salesforce-connector.html`, @@ -138,7 +135,6 @@ export class DocLinksService { serviceNow: `${WORKPLACE_SEARCH_DOCS}workplace-search-servicenow-connector.html`, sharePoint: `${WORKPLACE_SEARCH_DOCS}workplace-search-sharepoint-online-connector.html`, slack: `${WORKPLACE_SEARCH_DOCS}workplace-search-slack-connector.html`, - standardAuth: `${WORKPLACE_SEARCH_DOCS}workplace-search-security.html#standard`, synch: `${WORKPLACE_SEARCH_DOCS}workplace-search-customizing-indexing-rules.html`, zendesk: `${WORKPLACE_SEARCH_DOCS}workplace-search-zendesk-connector.html`, }, @@ -246,6 +242,7 @@ export class DocLinksService { ilmWaitForSnapshot: `${ELASTICSEARCH_DOCS}ilm-wait-for-snapshot.html`, indexModules: `${ELASTICSEARCH_DOCS}index-modules.html`, indexSettings: `${ELASTICSEARCH_DOCS}index-modules.html#index-modules-settings`, + dynamicIndexSettings: `${ELASTICSEARCH_DOCS}index-modules.html#dynamic-index-settings`, indexTemplates: `${ELASTICSEARCH_DOCS}index-templates.html`, mapping: `${ELASTICSEARCH_DOCS}mapping.html`, mappingAnalyzer: `${ELASTICSEARCH_DOCS}analyzer.html`, @@ -658,13 +655,11 @@ export interface DocLinksStart { readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; - readonly nativeAuth: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; - readonly standardAuth: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; @@ -691,7 +686,6 @@ export interface DocLinksStart { readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; - readonly nativeAuth: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; @@ -699,7 +693,6 @@ export interface DocLinksStart { readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; - readonly standardAuth: string; readonly synch: string; readonly zendesk: string; }; diff --git a/src/core/public/fatal_errors/fatal_errors_service.tsx b/src/core/public/fatal_errors/fatal_errors_service.tsx index 975c0160d83b2..262ee9e702f40 100644 --- a/src/core/public/fatal_errors/fatal_errors_service.tsx +++ b/src/core/public/fatal_errors/fatal_errors_service.tsx @@ -16,7 +16,7 @@ import { InjectedMetadataSetup } from '../injected_metadata'; import { FatalErrorsScreen } from './fatal_errors_screen'; import { FatalErrorInfo, getErrorInfo } from './get_error_info'; -interface Deps { +export interface Deps { i18n: I18nStart; injectedMetadata: InjectedMetadataSetup; } diff --git a/src/core/public/integrations/integrations_service.ts b/src/core/public/integrations/integrations_service.ts index d6f2b8c5fb2f7..7c52205022440 100644 --- a/src/core/public/integrations/integrations_service.ts +++ b/src/core/public/integrations/integrations_service.ts @@ -12,7 +12,7 @@ import { CoreService } from '../../types'; import { MomentService } from './moment'; import { StylesService } from './styles'; -interface Deps { +export interface Deps { uiSettings: IUiSettingsClient; } diff --git a/src/core/public/notifications/notifications_service.ts b/src/core/public/notifications/notifications_service.ts index 383fa2d1914cc..d31909a19ff75 100644 --- a/src/core/public/notifications/notifications_service.ts +++ b/src/core/public/notifications/notifications_service.ts @@ -15,11 +15,11 @@ import { ToastsService, ToastsSetup, ToastsStart } from './toasts'; import { IUiSettingsClient } from '../ui_settings'; import { OverlayStart } from '../overlays'; -interface SetupDeps { +export interface SetupDeps { uiSettings: IUiSettingsClient; } -interface StartDeps { +export interface StartDeps { i18n: I18nStart; overlays: OverlayStart; theme: ThemeServiceStart; diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index cec80af843c4c..30225acb3dd8d 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -42,6 +42,7 @@ import { Request as Request_2 } from '@hapi/hapi'; import * as Rx from 'rxjs'; import { SchemaTypeError } from '@kbn/config-schema'; import type { ThemeVersion } from '@kbn/ui-shared-deps-npm'; +import { TransitionPromptHook } from 'history'; import type { TransportRequestOptions } from '@elastic/elasticsearch'; import type { TransportRequestParams } from '@elastic/elasticsearch'; import type { TransportResult } from '@elastic/elasticsearch'; @@ -554,13 +555,11 @@ export interface DocLinksStart { readonly indexingDocumentsSchema: string; readonly logSettings: string; readonly metaEngines: string; - readonly nativeAuth: string; readonly precisionTuning: string; readonly relevanceTuning: string; readonly resultSettings: string; readonly searchUI: string; readonly security: string; - readonly standardAuth: string; readonly synonyms: string; readonly webCrawler: string; readonly webCrawlerEventLogs: string; @@ -587,7 +586,6 @@ export interface DocLinksStart { readonly indexingSchedule: string; readonly jiraCloud: string; readonly jiraServer: string; - readonly nativeAuth: string; readonly oneDrive: string; readonly permissions: string; readonly salesforce: string; @@ -595,7 +593,6 @@ export interface DocLinksStart { readonly serviceNow: string; readonly sharePoint: string; readonly slack: string; - readonly standardAuth: string; readonly synch: string; readonly zendesk: string; }; @@ -1684,13 +1681,13 @@ export interface SavedObjectsUpdateOptions { // @public export class ScopedHistory implements History_2 { - constructor(parentHistory: History_2, basePath: string); + constructor(parentHistory: History_2, basePath: string); get action(): Action; - block: (prompt?: string | boolean | History_2.TransitionPromptHook | undefined) => UnregisterCallback; + block: (prompt?: string | boolean | TransitionPromptHook | undefined) => UnregisterCallback; createHref: (location: LocationDescriptorObject, { prependBasePath }?: { prependBasePath?: boolean | undefined; }) => Href; - createSubHistory: (basePath: string) => ScopedHistory; + createSubHistory: (basePath: string) => ScopedHistory; go: (n: number) => void; goBack: () => void; goForward: () => void; diff --git a/src/core/public/rendering/rendering_service.tsx b/src/core/public/rendering/rendering_service.tsx index 7c84146d1aa86..92c0f2a9b7fca 100644 --- a/src/core/public/rendering/rendering_service.tsx +++ b/src/core/public/rendering/rendering_service.tsx @@ -18,7 +18,7 @@ import type { I18nStart } from '../i18n'; import { CoreContextProvider } from '../utils'; import { AppWrapper } from './app_containers'; -interface StartDeps { +export interface StartDeps { application: InternalApplicationStart; chrome: InternalChromeStart; overlays: OverlayStart; diff --git a/src/core/public/theme/theme_service.ts b/src/core/public/theme/theme_service.ts index fc67ac4a595eb..bdb00ee4fdce9 100644 --- a/src/core/public/theme/theme_service.ts +++ b/src/core/public/theme/theme_service.ts @@ -11,7 +11,7 @@ import { shareReplay, takeUntil } from 'rxjs/operators'; import { InjectedMetadataSetup } from '../injected_metadata'; import type { CoreTheme, ThemeServiceSetup, ThemeServiceStart } from './types'; -interface SetupDeps { +export interface SetupDeps { injectedMetadata: InjectedMetadataSetup; } diff --git a/src/core/public/ui_settings/ui_settings_service.ts b/src/core/public/ui_settings/ui_settings_service.ts index 6bbbed9a1ca60..1a3f275aa31ed 100644 --- a/src/core/public/ui_settings/ui_settings_service.ts +++ b/src/core/public/ui_settings/ui_settings_service.ts @@ -15,7 +15,7 @@ import { UiSettingsApi } from './ui_settings_api'; import { UiSettingsClient } from './ui_settings_client'; import { IUiSettingsClient } from './types'; -interface UiSettingsServiceDeps { +export interface UiSettingsServiceDeps { http: HttpSetup; injectedMetadata: InjectedMetadataSetup; } diff --git a/src/core/server/context/container/context.mock.ts b/src/core/server/context/container/context.mock.ts index 9996d609fc074..c8fcea83eae45 100644 --- a/src/core/server/context/container/context.mock.ts +++ b/src/core/server/context/container/context.mock.ts @@ -12,7 +12,6 @@ export type ContextContainerMock = jest.Mocked; const createContextMock = (mockContext: any = {}) => { const contextMock: ContextContainerMock = { - // @ts-expect-error since ContextContainerMock cannot infer ContextName and fallsback to never registerContext: jest.fn(), createHandler: jest.fn(), }; diff --git a/src/core/server/context/context_service.ts b/src/core/server/context/context_service.ts index 9e77786c1562c..b2948a4d59129 100644 --- a/src/core/server/context/context_service.ts +++ b/src/core/server/context/context_service.ts @@ -12,7 +12,7 @@ import { CoreContext } from '../core_context'; type PrebootDeps = SetupDeps; -interface SetupDeps { +export interface SetupDeps { pluginDependencies: ReadonlyMap; } diff --git a/src/core/server/execution_context/execution_context_config.ts b/src/core/server/execution_context/execution_context_config.ts index 0f63952d5cfa9..af6e7253433f7 100644 --- a/src/core/server/execution_context/execution_context_config.ts +++ b/src/core/server/execution_context/execution_context_config.ts @@ -10,7 +10,7 @@ import { TypeOf, schema } from '@kbn/config-schema'; import { ServiceConfigDescriptor } from '../internal_types'; const configSchema = schema.object({ - enabled: schema.boolean({ defaultValue: false }), + enabled: schema.boolean({ defaultValue: true }), }); /** diff --git a/src/core/server/http/auth_headers_storage.ts b/src/core/server/http/auth_headers_storage.ts index cddf84bfa8caf..d991f4298ba11 100644 --- a/src/core/server/http/auth_headers_storage.ts +++ b/src/core/server/http/auth_headers_storage.ts @@ -5,8 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -import { KibanaRequest, ensureRawRequest, LegacyRequest } from './router'; +import { Request } from '@hapi/hapi'; +import { KibanaRequest, ensureRawRequest } from './router'; import { AuthHeaders } from './lifecycle/auth'; /** @@ -19,8 +19,8 @@ export type GetAuthHeaders = (request: KibanaRequest) => AuthHeaders | undefined /** @internal */ export class AuthHeadersStorage { - private authHeadersCache = new WeakMap(); - public set = (request: KibanaRequest | LegacyRequest, headers: AuthHeaders) => { + private authHeadersCache = new WeakMap(); + public set = (request: KibanaRequest | Request, headers: AuthHeaders) => { this.authHeadersCache.set(ensureRawRequest(request), headers); }; public get: GetAuthHeaders = (request) => { diff --git a/src/core/server/http/auth_state_storage.ts b/src/core/server/http/auth_state_storage.ts index 2dd49f8fb99cc..e85be12cb398c 100644 --- a/src/core/server/http/auth_state_storage.ts +++ b/src/core/server/http/auth_state_storage.ts @@ -5,8 +5,8 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - -import { ensureRawRequest, KibanaRequest, LegacyRequest } from './router'; +import { Request } from '@hapi/hapi'; +import { ensureRawRequest, KibanaRequest } from './router'; /** * Status indicating an outcome of the authentication. @@ -45,12 +45,12 @@ export type IsAuthenticated = (request: KibanaRequest) => boolean; /** @internal */ export class AuthStateStorage { - private readonly storage = new WeakMap(); + private readonly storage = new WeakMap(); constructor(private readonly canBeAuthenticated: () => boolean) {} - public set = (request: KibanaRequest | LegacyRequest, state: unknown) => { + public set = (request: KibanaRequest | Request, state: unknown) => { this.storage.set(ensureRawRequest(request), state); }; - public get = (request: KibanaRequest | LegacyRequest) => { + public get = (request: KibanaRequest | Request) => { const key = ensureRawRequest(request); const state = this.storage.get(key) as T; const status: AuthStatus = this.storage.has(key) diff --git a/src/core/server/http/base_path_service.ts b/src/core/server/http/base_path_service.ts index 7de943a479810..e52b627041290 100644 --- a/src/core/server/http/base_path_service.ts +++ b/src/core/server/http/base_path_service.ts @@ -7,8 +7,8 @@ */ import { modifyUrl } from '@kbn/std'; - -import { ensureRawRequest, KibanaRequest, LegacyRequest } from './router'; +import { Request } from '@hapi/hapi'; +import { ensureRawRequest, KibanaRequest } from './router'; /** * Access or manipulate the Kibana base path @@ -16,7 +16,7 @@ import { ensureRawRequest, KibanaRequest, LegacyRequest } from './router'; * @public */ export class BasePath { - private readonly basePathCache = new WeakMap(); + private readonly basePathCache = new WeakMap(); /** * returns the server's basePath diff --git a/src/core/server/http/http_service.mock.ts b/src/core/server/http/http_service.mock.ts index 894ff38e12a35..1b6aa2de3c192 100644 --- a/src/core/server/http/http_service.mock.ts +++ b/src/core/server/http/http_service.mock.ts @@ -81,7 +81,6 @@ const createAuthMock = () => { const createInternalPrebootContractMock = () => { const mock: InternalHttpServicePrebootMock = { registerRoutes: jest.fn(), - // @ts-expect-error tsc cannot infer ContextName and uses never registerRouteHandlerContext: jest.fn(), registerStaticDir: jest.fn(), basePath: createBasePathMock(), @@ -89,6 +88,15 @@ const createInternalPrebootContractMock = () => { externalUrl: ExternalUrlConfig.DEFAULT, auth: createAuthMock(), getServerInfo: jest.fn(), + server: { + name: 'http-preboot-server-test', + version: 'kibana', + route: jest.fn(), + start: jest.fn(), + stop: jest.fn(), + config: jest.fn().mockReturnValue(configMock.create()), + // @ts-expect-error somehow it thinks that `Server` isn't a `Construtable` + } as unknown as jest.MockedClass, }; return mock; }; @@ -122,7 +130,6 @@ const createInternalSetupContractMock = () => { registerOnPreAuth: jest.fn(), registerAuth: jest.fn(), registerOnPostAuth: jest.fn(), - // @ts-expect-error tsc cannot infer ContextName and uses never registerRouteHandlerContext: jest.fn(), registerOnPreResponse: jest.fn(), createRouter: jest.fn().mockImplementation(() => mockRouter.create({})), @@ -134,6 +141,7 @@ const createInternalSetupContractMock = () => { getAuthHeaders: jest.fn(), getServerInfo: jest.fn(), registerPrebootRoutes: jest.fn(), + registerRouterAfterListening: jest.fn(), }; mock.createCookieSessionStorageFactory.mockResolvedValue(sessionStorageMock.createFactory()); mock.createRouter.mockImplementation(() => mockRouter.create()); @@ -160,7 +168,6 @@ const createSetupContractMock = () => { basePath: internalMock.basePath, csp: CspConfig.DEFAULT, createRouter: jest.fn(), - // @ts-expect-error tsc cannot infer ContextName and uses never registerRouteHandlerContext: jest.fn(), auth: { get: internalMock.auth.get, diff --git a/src/core/server/http/http_service.ts b/src/core/server/http/http_service.ts index 98ae0f8b81aa6..ca031e8ab282b 100644 --- a/src/core/server/http/http_service.ts +++ b/src/core/server/http/http_service.ts @@ -40,11 +40,11 @@ import { ExternalUrlConfig, } from '../external_url'; -interface PrebootDeps { +export interface PrebootDeps { context: InternalContextPreboot; } -interface SetupDeps { +export interface SetupDeps { context: ContextSetup; executionContext: InternalExecutionContextSetup; } diff --git a/src/core/server/http/router/headers.ts b/src/core/server/http/router/headers.ts index 715337ba813b5..89a32d6dc5d2f 100644 --- a/src/core/server/http/router/headers.ts +++ b/src/core/server/http/router/headers.ts @@ -9,6 +9,16 @@ import { IncomingHttpHeaders } from 'http'; import { pick } from '@kbn/std'; +/** + * Converts an object type to a new object type where each string + * key is copied to the values of the object, and non string keys are + * given a `never` value. This allows us to map over the values and + * get the list of all string keys on a type in `KnownKeys` + */ +type StringKeysAsVals = { + [K in keyof T]: string extends K ? never : number extends K ? never : K; +}; + /** * Creates a Union type of all known keys of a given interface. * @example @@ -21,11 +31,7 @@ import { pick } from '@kbn/std'; * type PersonKnownKeys = KnownKeys; // "age" | "name" * ``` */ -type KnownKeys = { - [K in keyof T]: string extends K ? never : number extends K ? never : K; -} extends { [_ in keyof T]: infer U } - ? U - : never; +type KnownKeys = StringKeysAsVals extends { [_ in keyof T]: infer U } ? U : never; /** * Set of well-known HTTP headers. diff --git a/src/core/server/http/router/index.ts b/src/core/server/http/router/index.ts index 5ba8143936563..8acb2972e2676 100644 --- a/src/core/server/http/router/index.ts +++ b/src/core/server/http/router/index.ts @@ -23,7 +23,6 @@ export type { KibanaRequestRouteOptions, KibanaRouteOptions, KibanaRequestState, - LegacyRequest, } from './request'; export { isSafeMethod, validBodyOutput } from './route'; export type { diff --git a/src/core/server/http/router/request.ts b/src/core/server/http/router/request.ts index 94d353e1335b3..e53a30124a420 100644 --- a/src/core/server/http/router/request.ts +++ b/src/core/server/http/router/request.ts @@ -77,13 +77,6 @@ export interface KibanaRequestEvents { completed$: Observable; } -/** - * @deprecated - * `hapi` request object, supported during migration process only for backward compatibility. - * @public - */ -export interface LegacyRequest extends Request {} // eslint-disable-line @typescript-eslint/no-empty-interface - /** * Kibana specific abstraction for an incoming request. * @public @@ -312,7 +305,7 @@ export class KibanaRequest< * Returns underlying Hapi Request * @internal */ -export const ensureRawRequest = (request: KibanaRequest | LegacyRequest) => +export const ensureRawRequest = (request: KibanaRequest | Request) => isKibanaRequest(request) ? request[requestSymbol] : request; /** @@ -323,7 +316,7 @@ export function isKibanaRequest(request: unknown): request is KibanaRequest { return request instanceof KibanaRequest; } -function isRequest(request: any): request is LegacyRequest { +function isRequest(request: any): request is Request { try { return request.raw.req && typeof request.raw.req === 'object'; } catch { @@ -332,9 +325,9 @@ function isRequest(request: any): request is LegacyRequest { } /** - * Checks if an incoming request either KibanaRequest or Legacy.Request + * Checks if an incoming request either KibanaRequest or Hapi.Request * @internal */ -export function isRealRequest(request: unknown): request is KibanaRequest | LegacyRequest { +export function isRealRequest(request: unknown): request is KibanaRequest | Request { return isKibanaRequest(request) || isRequest(request); } diff --git a/src/core/server/i18n/i18n_service.ts b/src/core/server/i18n/i18n_service.ts index 02a809b3c2c36..5772703a5a6b8 100644 --- a/src/core/server/i18n/i18n_service.ts +++ b/src/core/server/i18n/i18n_service.ts @@ -16,12 +16,12 @@ import { getKibanaTranslationFiles } from './get_kibana_translation_files'; import { initTranslations } from './init_translations'; import { registerRoutes } from './routes'; -interface PrebootDeps { +export interface PrebootDeps { http: InternalHttpServicePreboot; pluginPaths: string[]; } -interface SetupDeps { +export interface SetupDeps { http: InternalHttpServiceSetup; pluginPaths: string[]; } diff --git a/src/core/server/logging/logging_service.ts b/src/core/server/logging/logging_service.ts index 6c3eee4981725..f5c6bbf8e9422 100644 --- a/src/core/server/logging/logging_service.ts +++ b/src/core/server/logging/logging_service.ts @@ -49,7 +49,7 @@ export interface InternalLoggingServicePreboot { /** @internal */ export type InternalLoggingServiceSetup = InternalLoggingServicePreboot; -interface PrebootDeps { +export interface PrebootDeps { loggingSystem: ILoggingSystem; } diff --git a/src/core/server/metrics/integration_tests/server_collector.test.ts b/src/core/server/metrics/integration_tests/server_collector.test.ts index a16e0f2217add..49e97f6a40e41 100644 --- a/src/core/server/metrics/integration_tests/server_collector.test.ts +++ b/src/core/server/metrics/integration_tests/server_collector.test.ts @@ -19,7 +19,8 @@ import { setTimeout as setTimeoutPromise } from 'timers/promises'; const requestWaitDelay = 25; -describe('ServerMetricsCollector', () => { +// FLAKY: https://github.com/elastic/kibana/issues/59234 +describe.skip('ServerMetricsCollector', () => { let server: HttpService; let collector: ServerMetricsCollector; let hapiServer: HapiServer; diff --git a/src/core/server/metrics/metrics_service.ts b/src/core/server/metrics/metrics_service.ts index 8e9604b50fb57..30609837447d1 100644 --- a/src/core/server/metrics/metrics_service.ts +++ b/src/core/server/metrics/metrics_service.ts @@ -17,7 +17,7 @@ import { OpsMetricsCollector } from './ops_metrics_collector'; import { opsConfig, OpsConfigType } from './ops_config'; import { getEcsOpsMetricsLog } from './logging'; -interface MetricsServiceSetupDeps { +export interface MetricsServiceSetupDeps { http: InternalHttpServiceSetup; } diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index fa461946d397f..d4393791a74fa 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -33,7 +33,6 @@ import type { KibanaClient } from '@elastic/elasticsearch/lib/api/kibana'; import { Logger } from '@kbn/logging'; import { LoggerFactory } from '@kbn/logging'; import { LogLevel as LogLevel_2 } from '@kbn/logging'; -import { LogLevelId } from '@kbn/logging'; import { LogMeta } from '@kbn/logging'; import { LogRecord } from '@kbn/logging'; import type { MaybePromise } from '@kbn/utility-types'; @@ -1372,14 +1371,32 @@ export type KibanaResponseFactory = typeof kibanaResponseFactory; export const kibanaResponseFactory: { custom: | Error | Buffer | Stream | { message: string | Error; - attributes?: Record | undefined; + attributes?: ResponseErrorAttributes | undefined; } | undefined>(options: CustomHttpResponseOptions) => KibanaResponse; - badRequest: (options?: ErrorHttpResponseOptions) => KibanaResponse; - unauthorized: (options?: ErrorHttpResponseOptions) => KibanaResponse; - forbidden: (options?: ErrorHttpResponseOptions) => KibanaResponse; - notFound: (options?: ErrorHttpResponseOptions) => KibanaResponse; - conflict: (options?: ErrorHttpResponseOptions) => KibanaResponse; - customError: (options: CustomHttpResponseOptions) => KibanaResponse; + badRequest: (options?: ErrorHttpResponseOptions) => KibanaResponse; + unauthorized: (options?: ErrorHttpResponseOptions) => KibanaResponse; + forbidden: (options?: ErrorHttpResponseOptions) => KibanaResponse; + notFound: (options?: ErrorHttpResponseOptions) => KibanaResponse; + conflict: (options?: ErrorHttpResponseOptions) => KibanaResponse; + customError: (options: CustomHttpResponseOptions) => KibanaResponse; redirected: (options: RedirectResponseOptions) => KibanaResponse | Buffer | Stream>; ok: (options?: HttpResponseOptions) => KibanaResponse | Buffer | Stream>; accepted: (options?: HttpResponseOptions) => KibanaResponse | Buffer | Stream>; diff --git a/src/core/server/server.ts b/src/core/server/server.ts index e8c7ce6abb029..c35fde302578a 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -128,7 +128,7 @@ export class Server { public async preboot() { this.log.debug('prebooting server'); - const prebootTransaction = apm.startTransaction('server_preboot', 'kibana_platform'); + const prebootTransaction = apm.startTransaction('server-preboot', 'kibana-platform'); const environmentPreboot = await this.environment.preboot(); @@ -184,7 +184,7 @@ export class Server { public async setup() { this.log.debug('setting up server'); - const setupTransaction = apm.startTransaction('server_setup', 'kibana_platform'); + const setupTransaction = apm.startTransaction('server-setup', 'kibana-platform'); const environmentSetup = this.environment.setup(); @@ -291,7 +291,7 @@ export class Server { public async start() { this.log.debug('starting server'); - const startTransaction = apm.startTransaction('server_start', 'kibana_platform'); + const startTransaction = apm.startTransaction('server-start', 'kibana-platform'); const executionContextStart = this.executionContext.start(); const elasticsearchStart = await this.elasticsearch.start(); diff --git a/src/core/server/status/status_service.ts b/src/core/server/status/status_service.ts index 29cc01da3f63d..63a1b02d5b2e7 100644 --- a/src/core/server/status/status_service.ts +++ b/src/core/server/status/status_service.ts @@ -32,7 +32,7 @@ interface StatusLogMeta extends LogMeta { kibana: { status: ServiceStatus }; } -interface SetupDeps { +export interface SetupDeps { elasticsearch: Pick; environment: InternalEnvironmentServiceSetup; pluginDependencies: ReadonlyMap; diff --git a/src/core/types/elasticsearch/search.ts b/src/core/types/elasticsearch/search.ts index 2e79bf6fea57c..c28bf3c258f77 100644 --- a/src/core/types/elasticsearch/search.ts +++ b/src/core/types/elasticsearch/search.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { ValuesType } from 'utility-types'; +import { ValuesType, UnionToIntersection } from 'utility-types'; import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; type InvalidAggregationRequest = unknown; @@ -21,11 +21,15 @@ type KeyOfSource = Record< (T extends Record ? null : never) | string | number >; -type KeysOfSources = T extends [infer U, ...infer V] - ? KeyOfSource & KeysOfSources - : T extends Array - ? KeyOfSource - : {}; +type KeysOfSources = T extends [any] + ? KeyOfSource + : T extends [any, any] + ? KeyOfSource & KeyOfSource + : T extends [any, any, any] + ? KeyOfSource & KeyOfSource & KeyOfSource + : T extends [any, any, any, any] + ? KeyOfSource & KeyOfSource & KeyOfSource & KeyOfSource + : Record; type CompositeKeysOf = TAggregationContainer extends { @@ -36,6 +40,13 @@ type CompositeKeysOf = + TAggregationContainer extends { top_metrics: { metrics: { field: infer TField } } } + ? TField + : TAggregationContainer extends { top_metrics: { metrics: Array<{ field: infer TField }> } } + ? TField + : string; + type ValueTypeOfField = T extends Record ? ValuesType : T extends Array @@ -532,12 +543,7 @@ export type AggregateOf< top_metrics: { top: Array<{ sort: number[] | string[]; - metrics: Record< - TAggregationContainer extends Record }> - ? TKeys - : string, - string | number | null - >; + metrics: Record, string | number | null>; }>; }; weighted_avg: { value: number | null }; @@ -547,8 +553,8 @@ export type AggregateOf< // t_test: {} not defined })[ValidAggregationKeysOf & AggregationTypeName]; -type AggregateOfMap = { - [TAggregationName in keyof TAggregationMap]: TAggregationMap[TAggregationName] extends estypes.AggregationsAggregationContainer +type AggregateOfMap = { + [TAggregationName in keyof TAggregationMap]: Required[TAggregationName] extends estypes.AggregationsAggregationContainer ? AggregateOf : never; // using never means we effectively ignore optional keys, using {} creates a union type of { ... } | {} }; @@ -567,7 +573,7 @@ type SearchResponseOf< > = SubAggregateOf; // if aggregation response cannot be inferred, fall back to unknown -type WrapAggregationResponse = keyof T extends never +type WrapAggregationResponse = keyof UnionToIntersection extends never ? { aggregations?: unknown } : { aggregations?: T }; diff --git a/src/dev/build/build_distributables.ts b/src/dev/build/build_distributables.ts index a5ed81c15c9b1..9e3a419d63964 100644 --- a/src/dev/build/build_distributables.ts +++ b/src/dev/build/build_distributables.ts @@ -8,7 +8,7 @@ import { ToolingLog } from '@kbn/dev-utils'; -import { Config, createRunner } from './lib'; +import { Config, createRunner, Task, GlobalTask } from './lib'; import * as Tasks from './tasks'; export interface BuildOptions { @@ -32,12 +32,12 @@ export interface BuildOptions { createExamplePlugins: boolean; } -export async function buildDistributables(log: ToolingLog, options: BuildOptions) { +export async function buildDistributables(log: ToolingLog, options: BuildOptions): Promise { log.verbose('building distributables with options:', options); - const config = await Config.create(options); + const config: Config = await Config.create(options); - const run = createRunner({ + const run: (task: Task | GlobalTask) => Promise = createRunner({ config, log, }); diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index 078786abb8c64..52b1f816090df 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -25,6 +25,7 @@ export const LICENSE_ALLOWED = [ '(MIT OR WTFPL)', '(Unlicense OR Apache-2.0)', 'AFLv2.1', + '(AFL-2.1 OR BSD-3-Clause)', 'Apache 2.0', 'Apache License, v2.0', 'Apache License, Version 2.0', diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index f5c1755b228e9..e3d9688e60962 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -97,6 +97,7 @@ export const IGNORE_DIRECTORY_GLOBS = [ 'packages/kbn-pm/src/utils/__fixtures__/*', 'x-pack/dev-tools', 'packages/kbn-optimizer/src/__fixtures__/mock_repo/x-pack', + 'typings/*', ]; /** diff --git a/src/dev/typescript/run_type_check_cli.ts b/src/dev/typescript/run_type_check_cli.ts index 27998f881a03d..5888e6eaf6806 100644 --- a/src/dev/typescript/run_type_check_cli.ts +++ b/src/dev/typescript/run_type_check_cli.ts @@ -75,7 +75,7 @@ export async function runTypeCheckCli() { [ '--max-old-space-size=5120', require.resolve('typescript/bin/tsc'), - ...['--project', p.tsConfigPath, ...(flags.verbose ? ['--verbose'] : [])], + ...['--project', p.tsConfigPath], ...tscArgs, ], { diff --git a/src/plugins/chart_expressions/expression_heatmap/common/constants.ts b/src/plugins/chart_expressions/expression_heatmap/common/constants.ts new file mode 100644 index 0000000000000..12939483e64fa --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/common/constants.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 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 EXPRESSION_HEATMAP_NAME = 'heatmap'; +export const EXPRESSION_HEATMAP_LEGEND_NAME = 'heatmap_legend'; +export const EXPRESSION_HEATMAP_GRID_NAME = 'heatmap_grid'; +export const HEATMAP_FUNCTION_RENDERER_NAME = 'heatmap_renderer'; diff --git a/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/__snapshots__/heatmap_function.test.ts.snap b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/__snapshots__/heatmap_function.test.ts.snap new file mode 100644 index 0000000000000..55b7ddfcaea53 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/__snapshots__/heatmap_function.test.ts.snap @@ -0,0 +1,103 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`interpreter/functions#heatmap logs correct datatable to inspector 1`] = ` +Object { + "columns": Array [ + Object { + "id": "col-0-1", + "meta": Object { + "dimensionName": undefined, + "type": "number", + }, + "name": "Count", + }, + Object { + "id": "col-1-2", + "meta": Object { + "dimensionName": undefined, + "type": "string", + }, + "name": "Dest", + }, + ], + "rows": Array [ + Object { + "col-0-1": 0, + }, + ], + "type": "datatable", +} +`; + +exports[`interpreter/functions#heatmap returns an object with the correct structure 1`] = ` +Object { + "as": "heatmap", + "type": "render", + "value": Object { + "args": Object { + "gridConfig": Object { + "isCellLabelVisible": true, + "isXAxisLabelVisible": true, + "isYAxisLabelVisible": true, + "type": "heatmap_grid", + }, + "highlightInHover": false, + "lastRangeIsRightOpen": true, + "legend": Object { + "isVisible": true, + "position": "top", + "type": "heatmap_legend", + }, + "palette": Object { + "name": "", + "params": Object { + "colors": Array [ + "rgb(0, 0, 0, 0)", + "rgb(112, 38, 231)", + ], + "gradient": false, + "range": "number", + "rangeMax": 150, + "rangeMin": 0, + "stops": Array [ + 0, + 10000, + ], + }, + "type": "palette", + }, + "percentageMode": false, + "showTooltip": true, + "splitColumnAccessor": undefined, + "splitRowAccessor": undefined, + "valueAccessor": "col-0-1", + "xAccessor": "col-1-2", + "yAccessor": undefined, + }, + "data": Object { + "columns": Array [ + Object { + "id": "col-0-1", + "meta": Object { + "type": "number", + }, + "name": "Count", + }, + Object { + "id": "col-1-2", + "meta": Object { + "type": "string", + }, + "name": "Dest", + }, + ], + "rows": Array [ + Object { + "col-0-1": 0, + }, + ], + "type": "datatable", + }, + }, +} +`; diff --git a/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_function.test.ts b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_function.test.ts new file mode 100644 index 0000000000000..0b0cdf565dc33 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_function.test.ts @@ -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 { heatmapFunction } from './heatmap_function'; +import type { HeatmapArguments } from '../../common'; +import { functionWrapper } from '../../../../expressions/common/expression_functions/specs/tests/utils'; +import { Datatable } from '../../../../expressions/common/expression_types/specs'; +import { EXPRESSION_HEATMAP_GRID_NAME, EXPRESSION_HEATMAP_LEGEND_NAME } from '../constants'; + +describe('interpreter/functions#heatmap', () => { + const fn = functionWrapper(heatmapFunction()); + const context: Datatable = { + type: 'datatable', + rows: [{ 'col-0-1': 0 }], + columns: [ + { id: 'col-0-1', name: 'Count', meta: { type: 'number' } }, + { id: 'col-1-2', name: 'Dest', meta: { type: 'string' } }, + ], + }; + const args: HeatmapArguments = { + percentageMode: false, + legend: { + isVisible: true, + position: 'top', + type: EXPRESSION_HEATMAP_LEGEND_NAME, + }, + gridConfig: { + isCellLabelVisible: true, + isYAxisLabelVisible: true, + isXAxisLabelVisible: true, + type: EXPRESSION_HEATMAP_GRID_NAME, + }, + palette: { + type: 'palette', + name: '', + params: { + colors: ['rgb(0, 0, 0, 0)', 'rgb(112, 38, 231)'], + stops: [0, 10000], + gradient: false, + rangeMin: 0, + rangeMax: 150, + range: 'number', + }, + }, + showTooltip: true, + highlightInHover: false, + xAccessor: 'col-1-2', + valueAccessor: 'col-0-1', + }; + + it('returns an object with the correct structure', () => { + const actual = fn(context, args, undefined); + + expect(actual).toMatchSnapshot(); + }); + + it('logs correct datatable to inspector', async () => { + let loggedTable: Datatable; + const handlers = { + inspectorAdapters: { + tables: { + logDatatable: (name: string, datatable: Datatable) => { + loggedTable = datatable; + }, + }, + }, + }; + await fn(context, args, handlers as any); + + expect(loggedTable!).toMatchSnapshot(); + }); +}); diff --git a/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_function.ts b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_function.ts new file mode 100644 index 0000000000000..6ebec4b118c76 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_function.ts @@ -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 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 type { DatatableColumn } from '../../../../expressions/public'; +import { ExpressionValueVisDimension } from '../../../../visualizations/common'; +import { prepareLogTable, Dimension } from '../../../../visualizations/common/prepare_log_table'; +import { HeatmapExpressionFunctionDefinition } from '../types'; +import { + EXPRESSION_HEATMAP_NAME, + EXPRESSION_HEATMAP_GRID_NAME, + EXPRESSION_HEATMAP_LEGEND_NAME, +} from '../constants'; + +const convertToVisDimension = (columns: DatatableColumn[], accessor: string) => { + const column = columns.find((c) => c.id === accessor); + if (!column) return; + return { + accessor: Number(column.id), + format: { + id: column.meta.params?.id, + params: { ...column.meta.params?.params }, + }, + type: 'vis_dimension', + } as ExpressionValueVisDimension; +}; + +const prepareHeatmapLogTable = ( + columns: DatatableColumn[], + accessor: string | ExpressionValueVisDimension, + table: Dimension[], + label: string +) => { + const dimension = + typeof accessor === 'string' ? convertToVisDimension(columns, accessor) : accessor; + if (dimension) { + table.push([[dimension], label]); + } +}; + +export const heatmapFunction = (): HeatmapExpressionFunctionDefinition => ({ + name: EXPRESSION_HEATMAP_NAME, + type: 'render', + inputTypes: ['datatable'], + help: i18n.translate('expressionHeatmap.function.help', { + defaultMessage: 'Heatmap visualization', + }), + args: { + // used only in legacy heatmap, consider it as @deprecated + percentageMode: { + types: ['boolean'], + default: false, + help: i18n.translate('expressionHeatmap.function.percentageMode.help', { + defaultMessage: 'When is on, tooltip and legends appear as percentages.', + }), + }, + palette: { + types: ['palette'], + help: i18n.translate('expressionHeatmap.function.palette.help', { + defaultMessage: 'Provides colors for the values, based on the bounds.', + }), + }, + legend: { + types: [EXPRESSION_HEATMAP_LEGEND_NAME], + help: i18n.translate('expressionHeatmap.function.legendConfig.help', { + defaultMessage: 'Configure the chart legend.', + }), + }, + gridConfig: { + types: [EXPRESSION_HEATMAP_GRID_NAME], + help: i18n.translate('expressionHeatmap.function.gridConfig.help', { + defaultMessage: 'Configure the heatmap layout.', + }), + }, + showTooltip: { + types: ['boolean'], + help: i18n.translate('expressionHeatmap.function.args.addTooltipHelpText', { + defaultMessage: 'Show tooltip on hover', + }), + default: true, + }, + // not supported yet + highlightInHover: { + types: ['boolean'], + help: i18n.translate('expressionHeatmap.function.args.highlightInHoverHelpText', { + defaultMessage: + 'When this is enabled, it highlights the ranges of the same color on legend hover', + }), + }, + lastRangeIsRightOpen: { + types: ['boolean'], + help: i18n.translate('expressionHeatmap.function.args.lastRangeIsRightOpen', { + defaultMessage: 'If is set to true, the last range value will be right open', + }), + default: true, + }, + xAccessor: { + types: ['string', 'vis_dimension'], + help: i18n.translate('expressionHeatmap.function.args.xAccessorHelpText', { + defaultMessage: 'The id of the x axis column or the corresponding dimension', + }), + }, + yAccessor: { + types: ['string', 'vis_dimension'], + + help: i18n.translate('expressionHeatmap.function.args.yAccessorHelpText', { + defaultMessage: 'The id of the y axis column or the corresponding dimension', + }), + }, + valueAccessor: { + types: ['string', 'vis_dimension'], + + help: i18n.translate('expressionHeatmap.function.args.valueAccessorHelpText', { + defaultMessage: 'The id of the value column or the corresponding dimension', + }), + }, + // not supported yet, small multiples accessor + splitRowAccessor: { + types: ['string', 'vis_dimension'], + + help: i18n.translate('expressionHeatmap.function.args.splitRowAccessorHelpText', { + defaultMessage: 'The id of the split row or the corresponding dimension', + }), + }, + // not supported yet, small multiples accessor + splitColumnAccessor: { + types: ['string', 'vis_dimension'], + + help: i18n.translate('expressionHeatmap.function.args.splitColumnAccessorHelpText', { + defaultMessage: 'The id of the split column or the corresponding dimension', + }), + }, + }, + fn(data, args, handlers) { + if (handlers?.inspectorAdapters?.tables) { + const argsTable: Dimension[] = []; + if (args.valueAccessor) { + prepareHeatmapLogTable( + data.columns, + args.valueAccessor, + argsTable, + i18n.translate('expressionHeatmap.function.dimension.metric', { + defaultMessage: 'Metric', + }) + ); + } + if (args.yAccessor) { + prepareHeatmapLogTable( + data.columns, + args.yAccessor, + argsTable, + i18n.translate('expressionHeatmap.function.dimension.yaxis', { + defaultMessage: 'Y axis', + }) + ); + } + if (args.xAccessor) { + prepareHeatmapLogTable( + data.columns, + args.xAccessor, + argsTable, + i18n.translate('expressionHeatmap.function.dimension.xaxis', { + defaultMessage: 'X axis', + }) + ); + } + if (args.splitRowAccessor) { + prepareHeatmapLogTable( + data.columns, + args.splitRowAccessor, + argsTable, + i18n.translate('expressionHeatmap.function.dimension.splitRow', { + defaultMessage: 'Split by row', + }) + ); + } + if (args.splitColumnAccessor) { + prepareHeatmapLogTable( + data.columns, + args.splitColumnAccessor, + argsTable, + i18n.translate('expressionHeatmap.function.dimension.splitColumn', { + defaultMessage: 'Split by column', + }) + ); + } + const logTable = prepareLogTable(data, argsTable); + handlers.inspectorAdapters.tables.logDatatable('default', logTable); + } + return { + type: 'render', + as: EXPRESSION_HEATMAP_NAME, + value: { + data, + args, + }, + }; + }, +}); diff --git a/x-pack/plugins/lens/common/expressions/heatmap_chart/heatmap_grid.ts b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts similarity index 54% rename from x-pack/plugins/lens/common/expressions/heatmap_chart/heatmap_grid.ts rename to src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts index 5fe7f4b8f6c62..17513555d394d 100644 --- a/x-pack/plugins/lens/common/expressions/heatmap_chart/heatmap_grid.ts +++ b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_grid.ts @@ -1,70 +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; you may not use this file except in compliance with the Elastic License - * 2.0. + * 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 type { ExpressionFunctionDefinition } from '../../../../../../src/plugins/expressions/common'; - -export const HEATMAP_GRID_FUNCTION = 'lens_heatmap_grid'; - -export interface HeatmapGridConfig { - // grid - strokeWidth?: number; - strokeColor?: string; - cellHeight?: number; - cellWidth?: number; - // cells - isCellLabelVisible: boolean; - // Y-axis - isYAxisLabelVisible: boolean; - yAxisLabelWidth?: number; - yAxisLabelColor?: string; - // X-axis - isXAxisLabelVisible: boolean; -} - -export type HeatmapGridConfigResult = HeatmapGridConfig & { type: typeof HEATMAP_GRID_FUNCTION }; +import type { ExpressionFunctionDefinition } from '../../../../expressions/common'; +import { EXPRESSION_HEATMAP_GRID_NAME } from '../constants'; +import { HeatmapGridConfig, HeatmapGridConfigResult } from '../types'; export const heatmapGridConfig: ExpressionFunctionDefinition< - typeof HEATMAP_GRID_FUNCTION, + typeof EXPRESSION_HEATMAP_GRID_NAME, null, HeatmapGridConfig, HeatmapGridConfigResult > = { - name: HEATMAP_GRID_FUNCTION, + name: EXPRESSION_HEATMAP_GRID_NAME, aliases: [], - type: HEATMAP_GRID_FUNCTION, + type: EXPRESSION_HEATMAP_GRID_NAME, help: `Configure the heatmap layout `, inputTypes: ['null'], args: { // grid strokeWidth: { types: ['number'], - help: i18n.translate('xpack.lens.heatmapChart.config.strokeWidth.help', { + help: i18n.translate('expressionHeatmap.function.args.grid.strokeWidth.help', { defaultMessage: 'Specifies the grid stroke width', }), required: false, }, strokeColor: { types: ['string'], - help: i18n.translate('xpack.lens.heatmapChart.config.strokeColor.help', { + help: i18n.translate('expressionHeatmap.function.args.grid.strokeColor.help', { defaultMessage: 'Specifies the grid stroke color', }), required: false, }, cellHeight: { types: ['number'], - help: i18n.translate('xpack.lens.heatmapChart.config.cellHeight.help', { + help: i18n.translate('expressionHeatmap.function.args.grid.cellHeight.help', { defaultMessage: 'Specifies the grid cell height', }), required: false, }, cellWidth: { types: ['number'], - help: i18n.translate('xpack.lens.heatmapChart.config.cellWidth.help', { + help: i18n.translate('expressionHeatmap.function.args.grid.cellWidth.help', { defaultMessage: 'Specifies the grid cell width', }), required: false, @@ -72,27 +55,27 @@ export const heatmapGridConfig: ExpressionFunctionDefinition< // cells isCellLabelVisible: { types: ['boolean'], - help: i18n.translate('xpack.lens.heatmapChart.config.isCellLabelVisible.help', { + help: i18n.translate('expressionHeatmap.function.args.grid.isCellLabelVisible.help', { defaultMessage: 'Specifies whether or not the cell label is visible.', }), }, // Y-axis isYAxisLabelVisible: { types: ['boolean'], - help: i18n.translate('xpack.lens.heatmapChart.config.isYAxisLabelVisible.help', { + help: i18n.translate('expressionHeatmap.function.args.grid.isYAxisLabelVisible.help', { defaultMessage: 'Specifies whether or not the Y-axis labels are visible.', }), }, yAxisLabelWidth: { types: ['number'], - help: i18n.translate('xpack.lens.heatmapChart.config.yAxisLabelWidth.help', { + help: i18n.translate('expressionHeatmap.function.args.grid.yAxisLabelWidth.help', { defaultMessage: 'Specifies the width of the Y-axis labels.', }), required: false, }, yAxisLabelColor: { types: ['string'], - help: i18n.translate('xpack.lens.heatmapChart.config.yAxisLabelColor.help', { + help: i18n.translate('expressionHeatmap.function.args.grid.yAxisLabelColor.help', { defaultMessage: 'Specifies the color of the Y-axis labels.', }), required: false, @@ -100,14 +83,14 @@ export const heatmapGridConfig: ExpressionFunctionDefinition< // X-axis isXAxisLabelVisible: { types: ['boolean'], - help: i18n.translate('xpack.lens.heatmapChart.config.isXAxisLabelVisible.help', { + help: i18n.translate('expressionHeatmap.function.args.grid.isXAxisLabelVisible.help', { defaultMessage: 'Specifies whether or not the X-axis labels are visible.', }), }, }, fn(input, args) { return { - type: HEATMAP_GRID_FUNCTION, + type: EXPRESSION_HEATMAP_GRID_NAME, ...args, }; }, diff --git a/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_legend.ts b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_legend.ts new file mode 100644 index 0000000000000..efbc251f6360b --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/heatmap_legend.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 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 { Position } from '@elastic/charts'; +import { i18n } from '@kbn/i18n'; +import type { ExpressionFunctionDefinition } from '../../../../expressions/common'; +import { EXPRESSION_HEATMAP_LEGEND_NAME } from '../constants'; +import { HeatmapLegendConfig, HeatmapLegendConfigResult } from '../types'; + +export const heatmapLegendConfig: ExpressionFunctionDefinition< + typeof EXPRESSION_HEATMAP_LEGEND_NAME, + null, + HeatmapLegendConfig, + HeatmapLegendConfigResult +> = { + name: EXPRESSION_HEATMAP_LEGEND_NAME, + aliases: [], + type: EXPRESSION_HEATMAP_LEGEND_NAME, + help: `Configure the heatmap chart's legend`, + inputTypes: ['null'], + args: { + isVisible: { + types: ['boolean'], + help: i18n.translate('expressionHeatmap.function.args.legend.isVisible.help', { + defaultMessage: 'Specifies whether or not the legend is visible.', + }), + }, + position: { + types: ['string'], + options: [Position.Top, Position.Right, Position.Bottom, Position.Left], + help: i18n.translate('expressionHeatmap.function.args.legend.position.help', { + defaultMessage: 'Specifies the legend position.', + }), + }, + maxLines: { + types: ['number'], + help: i18n.translate('expressionHeatmap.function.args.legend.maxLines.help', { + defaultMessage: 'Specifies the number of lines per legend item.', + }), + }, + shouldTruncate: { + types: ['boolean'], + default: true, + help: i18n.translate('expressionHeatmap.function.args.legend.shouldTruncate.help', { + defaultMessage: 'Specifies whether or not the legend items should be truncated.', + }), + }, + }, + fn(input, args) { + return { + type: EXPRESSION_HEATMAP_LEGEND_NAME, + ...args, + }; + }, +}; diff --git a/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/index.ts b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/index.ts new file mode 100644 index 0000000000000..f926de038a7e7 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/common/expression_functions/index.ts @@ -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. + */ + +export { heatmapFunction } from './heatmap_function'; +export { heatmapLegendConfig } from './heatmap_legend'; +export { heatmapGridConfig } from './heatmap_grid'; diff --git a/src/plugins/chart_expressions/expression_heatmap/common/index.ts b/src/plugins/chart_expressions/expression_heatmap/common/index.ts new file mode 100755 index 0000000000000..56bafc2a0d612 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/common/index.ts @@ -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 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 PLUGIN_ID = 'expressionHeatmap'; +export const PLUGIN_NAME = 'expressionHeatmap'; + +export type { + HeatmapExpressionProps, + FilterEvent, + BrushEvent, + FormatFactory, + HeatmapRenderProps, + CustomPaletteParams, + ColorStop, + RequiredPaletteParamTypes, + HeatmapLegendConfigResult, + HeatmapGridConfigResult, + HeatmapArguments, +} from './types'; + +export { heatmapFunction, heatmapLegendConfig, heatmapGridConfig } from './expression_functions'; + +export { EXPRESSION_HEATMAP_NAME } from './constants'; diff --git a/src/plugins/chart_expressions/expression_heatmap/common/types/expression_functions.ts b/src/plugins/chart_expressions/expression_heatmap/common/types/expression_functions.ts new file mode 100644 index 0000000000000..a983da669c56d --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/common/types/expression_functions.ts @@ -0,0 +1,100 @@ +/* + * Copyright 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 { Position } from '@elastic/charts'; +import { + Datatable, + ExpressionFunctionDefinition, + ExpressionValueRender, +} from '../../../../expressions'; +import { ExpressionValueVisDimension } from '../../../../visualizations/common'; + +import { CustomPaletteState, PaletteOutput } from '../../../../charts/common'; +import { + EXPRESSION_HEATMAP_NAME, + EXPRESSION_HEATMAP_LEGEND_NAME, + EXPRESSION_HEATMAP_GRID_NAME, + HEATMAP_FUNCTION_RENDERER_NAME, +} from '../constants'; + +export interface HeatmapLegendConfig { + /** + * Flag whether the legend should be shown. If there is just a single series, it will be hidden + */ + isVisible: boolean; + /** + * Position of the legend relative to the chart + */ + position: Position; + /** + * Defines the number of lines per legend item + */ + maxLines?: number; + /** + * Defines if the legend items should be truncated + */ + shouldTruncate?: boolean; +} + +export type HeatmapLegendConfigResult = HeatmapLegendConfig & { + type: typeof EXPRESSION_HEATMAP_LEGEND_NAME; +}; + +export interface HeatmapGridConfig { + // grid + strokeWidth?: number; + strokeColor?: string; + cellHeight?: number; + cellWidth?: number; + // cells + isCellLabelVisible: boolean; + // Y-axis + isYAxisLabelVisible: boolean; + yAxisLabelWidth?: number; + yAxisLabelColor?: string; + // X-axis + isXAxisLabelVisible: boolean; +} + +export type HeatmapGridConfigResult = HeatmapGridConfig & { + type: typeof EXPRESSION_HEATMAP_GRID_NAME; +}; + +export interface HeatmapArguments { + percentageMode?: boolean; + lastRangeIsRightOpen?: boolean; + showTooltip?: boolean; + highlightInHover?: boolean; + palette?: PaletteOutput; + xAccessor?: string | ExpressionValueVisDimension; + yAccessor?: string | ExpressionValueVisDimension; + valueAccessor?: string | ExpressionValueVisDimension; + splitRowAccessor?: string | ExpressionValueVisDimension; + splitColumnAccessor?: string | ExpressionValueVisDimension; + legend: HeatmapLegendConfigResult; + gridConfig: HeatmapGridConfigResult; +} + +export type HeatmapInput = Datatable; + +export interface HeatmapExpressionProps { + data: Datatable; + args: HeatmapArguments; +} + +export interface HeatmapRender { + type: 'render'; + as: typeof HEATMAP_FUNCTION_RENDERER_NAME; + value: HeatmapExpressionProps; +} + +export type HeatmapExpressionFunctionDefinition = ExpressionFunctionDefinition< + typeof EXPRESSION_HEATMAP_NAME, + HeatmapInput, + HeatmapArguments, + ExpressionValueRender +>; diff --git a/src/plugins/chart_expressions/expression_heatmap/common/types/expression_renderers.ts b/src/plugins/chart_expressions/expression_heatmap/common/types/expression_renderers.ts new file mode 100644 index 0000000000000..1498c04ca1b79 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/common/types/expression_renderers.ts @@ -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. + */ + +import type { ChartsPluginSetup, PaletteRegistry } from '../../../../charts/public'; +import type { IFieldFormat, SerializedFieldFormat } from '../../../../field_formats/common'; +import type { RangeSelectContext, ValueClickContext } from '../../../../embeddable/public'; +import type { PersistedState } from '../../../../visualizations/public'; +import type { HeatmapExpressionProps } from './expression_functions'; + +export interface FilterEvent { + name: 'filter'; + data: ValueClickContext['data']; +} + +export interface BrushEvent { + name: 'brush'; + data: RangeSelectContext['data']; +} + +export type FormatFactory = (mapping?: SerializedFieldFormat) => IFieldFormat; + +export type HeatmapRenderProps = HeatmapExpressionProps & { + timeZone?: string; + formatFactory: FormatFactory; + chartsThemeService: ChartsPluginSetup['theme']; + onClickValue: (data: FilterEvent['data']) => void; + onSelectRange: (data: BrushEvent['data']) => void; + paletteService: PaletteRegistry; + uiState: PersistedState; +}; + +export interface ColorStop { + color: string; + stop: number; +} + +export interface CustomPaletteParams { + name?: string; + reverse?: boolean; + rangeType?: 'number' | 'percent'; + continuity?: 'above' | 'below' | 'all' | 'none'; + progression?: 'fixed'; + rangeMin?: number; + rangeMax?: number; + stops?: ColorStop[]; + colorStops?: ColorStop[]; + steps?: number; +} + +export type RequiredPaletteParamTypes = Required; diff --git a/src/plugins/chart_expressions/expression_heatmap/common/types/index.ts b/src/plugins/chart_expressions/expression_heatmap/common/types/index.ts new file mode 100644 index 0000000000000..9c50bfab1305d --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/common/types/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 * from './expression_functions'; +export * from './expression_renderers'; diff --git a/src/plugins/chart_expressions/expression_heatmap/jest.config.js b/src/plugins/chart_expressions/expression_heatmap/jest.config.js new file mode 100644 index 0000000000000..319364343ee09 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/jest.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 = { + preset: '@kbn/test', + rootDir: '../../../../', + roots: ['/src/plugins/chart_expressions/expression_heatmap'], + coverageDirectory: + '/target/kibana-coverage/jest/src/plugins/chart_expressions/expression_heatmap', + coverageReporters: ['text', 'html'], + collectCoverageFrom: [ + '/src/plugins/chart_expressions/expression_heatmap/{common,public,server}/**/*.{ts,tsx}', + ], +}; diff --git a/src/plugins/chart_expressions/expression_heatmap/kibana.json b/src/plugins/chart_expressions/expression_heatmap/kibana.json new file mode 100755 index 0000000000000..604919ec54592 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/kibana.json @@ -0,0 +1,16 @@ +{ + "id": "expressionHeatmap", + "version": "1.0.0", + "kibanaVersion": "kibana", + "owner": { + "name": "Vis Editors", + "githubTeam": "kibana-vis-editors" + }, + "description": "Expression Heatmap plugin adds a `heatmap` renderer and function to the expression plugin. The renderer will display the `heatmap` chart.", + "server": true, + "ui": true, + "requiredPlugins": ["expressions", "fieldFormats", "charts", "visualizations", "presentationUtil", "data"], + "requiredBundles": ["kibanaUtils", "kibanaReact"], + "optionalPlugins": [], + "extraPublicDirs": ["common"] +} diff --git a/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.test.tsx b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.test.tsx new file mode 100644 index 0000000000000..b725f9eed3555 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.test.tsx @@ -0,0 +1,246 @@ +/* + * Copyright 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 { Settings, TooltipType, Heatmap } from '@elastic/charts'; +import { chartPluginMock } from '../../../../charts/public/mocks'; +import { EmptyPlaceholder } from '../../../../charts/public'; +import { fieldFormatsServiceMock } from '../../../../field_formats/public/mocks'; +import type { Datatable } from '../../../../expressions/public'; +import { mountWithIntl, shallowWithIntl } from '@kbn/test/jest'; +import { findTestSubject } from '@elastic/eui/lib/test'; +import { act } from 'react-dom/test-utils'; +import { HeatmapRenderProps, HeatmapArguments } from '../../common'; +import HeatmapComponent from './heatmap_component'; + +jest.mock('@elastic/charts', () => { + const original = jest.requireActual('@elastic/charts'); + + return { + ...original, + getSpecId: jest.fn(() => {}), + }; +}); + +const chartsThemeService = chartPluginMock.createSetupContract().theme; +const palettesRegistry = chartPluginMock.createPaletteRegistry(); +const formatService = fieldFormatsServiceMock.createStartContract(); +const args: HeatmapArguments = { + percentageMode: false, + legend: { + isVisible: true, + position: 'top', + type: 'heatmap_legend', + }, + gridConfig: { + isCellLabelVisible: true, + isYAxisLabelVisible: true, + isXAxisLabelVisible: true, + type: 'heatmap_grid', + }, + palette: { + type: 'palette', + name: '', + params: { + colors: ['rgb(0, 0, 0)', 'rgb(112, 38, 231)'], + stops: [0, 150], + gradient: false, + rangeMin: 0, + rangeMax: 150, + range: 'number', + }, + }, + showTooltip: true, + highlightInHover: false, + xAccessor: 'col-1-2', + valueAccessor: 'col-0-1', +}; +const data: Datatable = { + type: 'datatable', + rows: [ + { 'col-0-1': 0, 'col-1-2': 'a' }, + { 'col-0-1': 148, 'col-1-2': 'b' }, + ], + columns: [ + { id: 'col-0-1', name: 'Count', meta: { type: 'number' } }, + { id: 'col-1-2', name: 'Dest', meta: { type: 'string' } }, + ], +}; + +const mockState = new Map(); +const uiState = { + get: jest + .fn() + .mockImplementation((key, fallback) => (mockState.has(key) ? mockState.get(key) : fallback)), + set: jest.fn().mockImplementation((key, value) => mockState.set(key, value)), + emit: jest.fn(), + setSilent: jest.fn(), +} as any; + +describe('HeatmapComponent', function () { + let wrapperProps: HeatmapRenderProps; + + beforeAll(() => { + wrapperProps = { + data, + chartsThemeService, + args, + uiState, + onClickValue: jest.fn(), + onSelectRange: jest.fn(), + paletteService: palettesRegistry, + formatFactory: formatService.deserialize, + }; + }); + + it('renders the legend on the correct position', () => { + const component = shallowWithIntl(); + expect(component.find(Settings).prop('legendPosition')).toEqual('top'); + }); + + it('renders the legend toggle component if uiState is set', async () => { + const component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'vislibToggleLegend').length).toBe(1); + }); + }); + + it('not renders the legend toggle component if uiState is undefined', async () => { + const newProps = { ...wrapperProps, uiState: undefined } as unknown as HeatmapRenderProps; + const component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'vislibToggleLegend').length).toBe(0); + }); + }); + + it('renders the legendColorPicker if uiState is set', async () => { + const component = mountWithIntl(); + await act(async () => { + expect(component.find(Settings).prop('legendColorPicker')).toBeDefined(); + }); + }); + + it('not renders the legendColorPicker if uiState is undefined', async () => { + const newProps = { ...wrapperProps, uiState: undefined } as unknown as HeatmapRenderProps; + const component = mountWithIntl(); + await act(async () => { + expect(component.find(Settings).prop('legendColorPicker')).toBeUndefined(); + }); + }); + + it('computes the bands correctly for infinite bounds', async () => { + const component = mountWithIntl(); + await act(async () => { + expect(component.find(Heatmap).prop('colorScale')).toEqual({ + bands: [ + { color: 'rgb(0, 0, 0)', end: 0, start: 0 }, + { color: 'rgb(112, 38, 231)', end: Infinity, start: 0 }, + ], + type: 'bands', + }); + }); + }); + + it('computes the bands correctly for distinct bounds', async () => { + const newProps = { + ...wrapperProps, + args: { ...wrapperProps.args, lastRangeIsRightOpen: false }, + } as unknown as HeatmapRenderProps; + const component = mountWithIntl(); + await act(async () => { + expect(component.find(Heatmap).prop('colorScale')).toEqual({ + bands: [ + { color: 'rgb(0, 0, 0)', end: 0, start: 0 }, + { color: 'rgb(112, 38, 231)', end: 150, start: 0 }, + ], + type: 'bands', + }); + }); + }); + + it('hides the legend if the legend isVisible args is false', async () => { + const newProps = { + ...wrapperProps, + args: { ...wrapperProps.args, legend: { ...wrapperProps.args.legend, isVisible: false } }, + } as unknown as HeatmapRenderProps; + const component = mountWithIntl(); + expect(component.find(Settings).prop('showLegend')).toEqual(false); + }); + + it('defaults on displaying the tooltip', () => { + const component = shallowWithIntl(); + expect(component.find(Settings).prop('tooltip')).toStrictEqual({ type: TooltipType.Follow }); + }); + + it('hides the legend if the showTooltip is false', async () => { + const newProps = { + ...wrapperProps, + args: { ...wrapperProps.args, showTooltip: false }, + } as unknown as HeatmapRenderProps; + const component = mountWithIntl(); + expect(component.find(Settings).prop('tooltip')).toStrictEqual({ type: TooltipType.None }); + }); + + it('not renders the component if no value accessor is given', () => { + const newProps = { ...wrapperProps, valueAccessor: undefined } as unknown as HeatmapRenderProps; + const component = mountWithIntl(); + expect(component).toEqual({}); + }); + + it('renders the EmptyPlaceholder if no data are provided', () => { + const newData: Datatable = { + type: 'datatable', + rows: [], + columns: [ + { id: 'col-0-1', name: 'Count', meta: { type: 'number' } }, + { id: 'col-1-2', name: 'Dest', meta: { type: 'string' } }, + ], + }; + const newProps = { ...wrapperProps, data: newData }; + const component = mountWithIntl(); + expect(component.find(EmptyPlaceholder).length).toBe(1); + }); + + it('calls filter callback', () => { + const component = shallowWithIntl(); + component.find(Settings).first().prop('onElementClick')!([ + [ + { + x: 436.68671874999995, + y: 1, + yIndex: 0, + width: 143.22890625, + height: 198.5, + datum: { + x: 'Vienna International Airport', + y: 'ES-Air', + value: 6, + originalIndex: 12, + }, + fill: { + color: [78, 175, 98, 1], + }, + stroke: { + color: [128, 128, 128, 1], + width: 0, + }, + value: 6, + visible: true, + formatted: '6', + fontSize: 18, + textColor: 'rgba(0, 0, 0, 1)', + }, + { + specId: 'heatmap', + key: 'spec{heatmap}', + }, + ], + ]); + expect(wrapperProps.onClickValue).toHaveBeenCalled(); + }); +}); diff --git a/x-pack/plugins/lens/public/heatmap_visualization/chart_component.tsx b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx similarity index 51% rename from x-pack/plugins/lens/public/heatmap_visualization/chart_component.tsx rename to src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx index 4300208109b76..a53cb6359c800 100644 --- a/x-pack/plugins/lens/public/heatmap_visualization/chart_component.tsx +++ b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_component.tsx @@ -1,11 +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; you may not use this file except in compliance with the Elastic License - * 2.0. + * 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, { FC, useMemo } from 'react'; +import React, { FC, useMemo, useState, useCallback } from 'react'; import { Chart, ElementClickListener, @@ -16,23 +16,21 @@ import { HeatmapSpec, ScaleType, Settings, + TooltipType, + TooltipProps, ESFixedIntervalUnit, ESCalendarIntervalUnit, } from '@elastic/charts'; -import type { CustomPaletteState } from 'src/plugins/charts/public'; -import { VisualizationContainer } from '../visualization_container'; -import type { HeatmapRenderProps } from './types'; -import './index.scss'; -import type { LensBrushEvent, LensFilterEvent } from '../types'; -import { - applyPaletteParams, - defaultPaletteParams, - EmptyPlaceholder, - findMinMaxByColumnId, -} from '../shared_components'; -import { LensIconChartHeatmap } from '../assets/chart_heatmap'; -import { DEFAULT_PALETTE_NAME } from './constants'; -import { search } from '../../../../../src/plugins/data/public'; +import type { CustomPaletteState } from '../../../../charts/public'; +import { search } from '../../../../data/public'; +import { LegendToggle, EmptyPlaceholder } from '../../../../charts/public'; +import type { DatatableColumn } from '../../../../expressions/public'; +import { ExpressionValueVisDimension } from '../../../../visualizations/public'; +import type { HeatmapRenderProps, FilterEvent, BrushEvent } from '../../common'; +import { applyPaletteParams, findMinMaxByColumnId, getSortPredicate } from './helpers'; +import { getColorPicker } from '../utils/get_color_picker'; +import { DEFAULT_PALETTE_NAME, defaultPaletteParams } from '../constants'; +import { HeatmapIcon } from './heatmap_icon'; declare global { interface Window { @@ -113,7 +111,18 @@ function computeColorRanges( return { colors, ranges }; } -export const HeatmapComponent: FC = ({ +const getAccessor = (value: string | ExpressionValueVisDimension, columns: DatatableColumn[]) => { + if (typeof value === 'string') { + return value; + } + const accessor = value.accessor; + if (typeof accessor === 'number') { + return columns[accessor].id; + } + return accessor.id; +}; + +const HeatmapComponent: FC = ({ data, args, timeZone, @@ -122,33 +131,73 @@ export const HeatmapComponent: FC = ({ onClickValue, onSelectRange, paletteService, + uiState, }) => { const chartTheme = chartsThemeService.useChartsTheme(); const isDarkTheme = chartsThemeService.useDarkMode(); + // legacy heatmap legend is handled by the uiState + const [showLegend, setShowLegend] = useState(() => { + const bwcLegendStateDefault = args.legend.isVisible ?? true; + return uiState?.get('vis.legendOpen', bwcLegendStateDefault); + }); + + const toggleLegend = useCallback(() => { + setShowLegend((value) => { + const newValue = !value; + uiState?.set?.('vis.legendOpen', newValue); + return newValue; + }); + }, [uiState]); + + const setColor = useCallback( + (newColor: string | null, seriesLabel: string | number) => { + const colors = uiState?.get('vis.colors') || {}; + if (colors[seriesLabel] === newColor || !newColor) { + delete colors[seriesLabel]; + } else { + colors[seriesLabel] = newColor; + } + uiState?.setSilent('vis.colors', null); + uiState?.set('vis.colors', colors); + uiState?.emit('reload'); + uiState?.emit('colorChanged'); + }, + [uiState] + ); - const tableId = Object.keys(data.tables)[0]; - const table = data.tables[tableId]; + const legendColorPicker = useMemo( + () => getColorPicker(args.legend.position, setColor, uiState), + [args.legend.position, setColor, uiState] + ); + const table = data; + const valueAccessor = args.valueAccessor + ? getAccessor(args.valueAccessor, table.columns) + : undefined; + const minMaxByColumnId = useMemo( + () => findMinMaxByColumnId([valueAccessor!], table), + [valueAccessor, table] + ); const paletteParams = args.palette?.params; + const xAccessor = args.xAccessor ? getAccessor(args.xAccessor, table.columns) : undefined; + const yAccessor = args.yAccessor ? getAccessor(args.yAccessor, table.columns) : undefined; - const xAxisColumnIndex = table.columns.findIndex((v) => v.id === args.xAccessor); - const yAxisColumnIndex = table.columns.findIndex((v) => v.id === args.yAccessor); + const xAxisColumnIndex = table.columns.findIndex((v) => v.id === xAccessor); + const yAxisColumnIndex = table.columns.findIndex((v) => v.id === yAccessor); const xAxisColumn = table.columns[xAxisColumnIndex]; const yAxisColumn = table.columns[yAxisColumnIndex]; - const valueColumn = table.columns.find((v) => v.id === args.valueAccessor); + const valueColumn = table.columns.find((v) => v.id === valueAccessor); - const minMaxByColumnId = useMemo( - () => findMinMaxByColumnId([args.valueAccessor!], table), - [args.valueAccessor, table] - ); - - if (!xAxisColumn || !valueColumn) { + if (!valueColumn) { // Chart is not ready return null; } - let chartData = table.rows.filter((v) => typeof v[args.valueAccessor!] === 'number'); + let chartData = table.rows.filter((v) => typeof v[valueAccessor!] === 'number'); + if (!chartData || !chartData.length) { + return ; + } if (!yAxisColumn) { // required for tooltip @@ -159,17 +208,23 @@ export const HeatmapComponent: FC = ({ }; }); } - - const xAxisMeta = xAxisColumn.meta; - const isTimeBasedSwimLane = xAxisMeta.type === 'date'; + const { min, max } = minMaxByColumnId[valueAccessor!]; + // formatters + const xAxisMeta = xAxisColumn?.meta; + const xValuesFormatter = formatFactory(xAxisMeta?.params); + const metricFormatter = formatFactory( + typeof args.valueAccessor === 'string' ? valueColumn.meta.params : args?.valueAccessor?.format + ); + const isTimeBasedSwimLane = xAxisMeta?.type === 'date'; + const dateHistogramMeta = xAxisColumn + ? search.aggs.getDateHistogramMetaDataByDatatableColumn(xAxisColumn) + : undefined; // Fallback to the ordinal scale type when a single row of data is provided. // Related issue https://github.com/elastic/elastic-charts/issues/1184 - let xScale: HeatmapSpec['xScale'] = { type: ScaleType.Ordinal }; if (isTimeBasedSwimLane && chartData.length > 1) { - const dateInterval = - search.aggs.getDateHistogramMetaDataByDatatableColumn(xAxisColumn)?.interval; + const dateInterval = dateHistogramMeta?.interval; const esInterval = dateInterval ? search.aggs.parseEsInterval(dateInterval) : undefined; if (esInterval) { xScale = { @@ -190,24 +245,48 @@ export const HeatmapComponent: FC = ({ } } - const xValuesFormatter = formatFactory(xAxisMeta.params); - const valueFormatter = formatFactory(valueColumn.meta.params); + const tooltip: TooltipProps = { + type: args.showTooltip ? TooltipType.Follow : TooltipType.None, + }; + + const valueFormatter = (d: number) => { + let value = d; + + if (args.percentageMode) { + const percentageNumber = (Math.abs(value - min) / (max - min)) * 100; + value = parseInt(percentageNumber.toString(), 10) / 100; + } + return metricFormatter.convert(value); + }; const { colors, ranges } = computeColorRanges( paletteService, paletteParams, isDarkTheme ? '#000' : '#fff', - minMaxByColumnId[args.valueAccessor!] + minMaxByColumnId[valueAccessor!] ); + // adds a very small number to the max value to make sure the max value will be included + const endValue = + paletteParams && paletteParams.range === 'number' ? paletteParams.rangeMax : max + 0.00000001; + const overwriteColors = uiState?.get('vis.colors') ?? null; + const bands = ranges.map((start, index, array) => { + // by default the last range is right-open + let end = index === array.length - 1 ? Infinity : array[index + 1]; + // if the lastRangeIsRightOpen is set to false, we need to set the last range to the max value + if (args.lastRangeIsRightOpen === false) { + const lastBand = max === start ? Infinity : endValue; + end = index === array.length - 1 ? lastBand : array[index + 1]; + } + const overwriteArrayIdx = `${metricFormatter.convert(start)} - ${metricFormatter.convert(end)}`; + const overwriteColor = overwriteColors?.[overwriteArrayIdx]; return { // with the default continuity:above the every range is left-closed start, - // with the default continuity:above the last range is right-open - end: index === array.length - 1 ? Infinity : array[index + 1], + end, // the current colors array contains a duplicated color at the beginning that we need to skip - color: colors[index + 1], + color: overwriteColor ?? colors[index + 1], }; }); @@ -215,7 +294,7 @@ export const HeatmapComponent: FC = ({ const cell = e[0][0]; const { x, y } = cell.datum; - const xAxisFieldName = xAxisColumn.meta.field; + const xAxisFieldName = xAxisColumn?.meta?.field; const timeFieldName = isTimeBasedSwimLane ? xAxisFieldName : ''; const points = [ @@ -235,7 +314,7 @@ export const HeatmapComponent: FC = ({ : []), ]; - const context: LensFilterEvent['data'] = { + const context: FilterEvent['data'] = { data: points.map((point) => ({ row: point.row, column: point.column, @@ -250,11 +329,11 @@ export const HeatmapComponent: FC = ({ const onBrushEnd = (e: HeatmapBrushEvent) => { const { x, y } = e; - const xAxisFieldName = xAxisColumn.meta.field; + const xAxisFieldName = xAxisColumn?.meta?.field; const timeFieldName = isTimeBasedSwimLane ? xAxisFieldName : ''; if (isTimeBasedSwimLane) { - const context: LensBrushEvent['data'] = { + const context: BrushEvent['data'] = { range: x as number[], table, column: xAxisColumnIndex, @@ -273,16 +352,17 @@ export const HeatmapComponent: FC = ({ }); }); } - - (x as string[]).forEach((v) => { - points.push({ - row: table.rows.findIndex((r) => r[xAxisColumn.id] === v), - column: xAxisColumnIndex, - value: v, + if (xAxisColumn) { + (x as string[]).forEach((v) => { + points.push({ + row: table.rows.findIndex((r) => r[xAxisColumn.id] === v), + column: xAxisColumnIndex, + value: v, + }); }); - }); + } - const context: LensFilterEvent['data'] = { + const context: FilterEvent['data'] = { data: points.map((point) => ({ row: point.row, column: point.column, @@ -334,11 +414,12 @@ export const HeatmapComponent: FC = ({ : {}), }, xAxisLabel: { - visible: args.gridConfig.isXAxisLabelVisible, + visible: Boolean(args.gridConfig.isXAxisLabelVisible && xAxisColumn), // eui color subdued textColor: chartTheme.axes?.tickLabel?.fill ?? `#6a717d`, + padding: xAxisColumn?.name ? 8 : 0, formatter: (v: number | string) => xValuesFormatter.convert(v), - name: xAxisColumn.name, + name: xAxisColumn?.name ?? '', }, brushMask: { fill: isDarkTheme ? 'rgb(30,31,35,80%)' : 'rgb(247,247,247,50%)', @@ -349,56 +430,65 @@ export const HeatmapComponent: FC = ({ timeZone, }; - if (!chartData || !chartData.length) { - return ; - } - return ( - - - valueFormatter.convert(v)} - xScale={xScale} - ySortPredicate="dataIndex" - config={config} - xSortPredicate="dataIndex" - /> - + <> + {showLegend !== undefined && ( + + )} + + + + + ); }; -const MemoizedChart = React.memo(HeatmapComponent); - -export function HeatmapChartReportable(props: HeatmapRenderProps) { - return ( - - - - ); -} +// default export required for React.Lazy +// eslint-disable-next-line import/no-default-export +export { HeatmapComponent as default }; diff --git a/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_icon.tsx b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_icon.tsx new file mode 100644 index 0000000000000..e6ff3a65e02bb --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/components/heatmap_icon.tsx @@ -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 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 { EuiIconProps } from '@elastic/eui'; +import React from 'react'; + +export const HeatmapIcon = ({ title, titleId, ...props }: Omit) => ( + + {title ? {title} : null} + + + +); diff --git a/src/plugins/chart_expressions/expression_heatmap/public/components/helpers.test.ts b/src/plugins/chart_expressions/expression_heatmap/public/components/helpers.test.ts new file mode 100644 index 0000000000000..7e9ccee19aa11 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/components/helpers.test.ts @@ -0,0 +1,433 @@ +/* + * Copyright 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 { chartPluginMock } from 'src/plugins/charts/public/mocks'; +import type { DatatableColumn } from 'src/plugins/expressions/public'; +import { + applyPaletteParams, + getDataMinMax, + getPaletteStops, + getStepValue, + remapStopsByNewInterval, + reversePalette, + getSortPredicate, +} from './helpers'; + +describe('applyPaletteParams', () => { + const paletteRegistry = chartPluginMock.createPaletteRegistry(); + it('should return a palette stops array only by the name', () => { + expect( + applyPaletteParams( + paletteRegistry, + { name: 'default', type: 'palette', params: { name: 'default' } }, + { min: 0, max: 100 } + ) + ).toEqual([ + // stops are 0 and 50 by with a 20 offset (100 divided by 5 steps) for display + // the mock palette service has only 2 colors so tests are a bit off by that + { color: 'red', stop: 20 }, + { color: 'black', stop: 70 }, + ]); + }); + + it('should return a palette stops array reversed', () => { + expect( + applyPaletteParams( + paletteRegistry, + { name: 'default', type: 'palette', params: { name: 'default', reverse: true } }, + { min: 0, max: 100 } + ) + ).toEqual([ + { color: 'black', stop: 20 }, + { color: 'red', stop: 70 }, + ]); + }); + + it('should pick the default palette from the activePalette object when passed', () => { + expect( + applyPaletteParams(paletteRegistry, { name: 'mocked', type: 'palette' }, { min: 0, max: 100 }) + ).toEqual([ + { color: 'blue', stop: 20 }, + { color: 'yellow', stop: 70 }, + ]); + }); +}); + +describe('remapStopsByNewInterval', () => { + it('should correctly remap the current palette from 0..1 to 0...100', () => { + expect( + remapStopsByNewInterval( + [ + { color: 'black', stop: 0 }, + { color: 'green', stop: 0.5 }, + { color: 'red', stop: 0.9 }, + ], + { newInterval: 100, oldInterval: 1, newMin: 0, oldMin: 0 } + ) + ).toEqual([ + { color: 'black', stop: 0 }, + { color: 'green', stop: 50 }, + { color: 'red', stop: 90 }, + ]); + + // now test the other way around + expect( + remapStopsByNewInterval( + [ + { color: 'black', stop: 0 }, + { color: 'green', stop: 50 }, + { color: 'red', stop: 90 }, + ], + { newInterval: 1, oldInterval: 100, newMin: 0, oldMin: 0 } + ) + ).toEqual([ + { color: 'black', stop: 0 }, + { color: 'green', stop: 0.5 }, + { color: 'red', stop: 0.9 }, + ]); + }); + + it('should correctly handle negative numbers to/from', () => { + expect( + remapStopsByNewInterval( + [ + { color: 'black', stop: -100 }, + { color: 'green', stop: -50 }, + { color: 'red', stop: -1 }, + ], + { newInterval: 100, oldInterval: 100, newMin: 0, oldMin: -100 } + ) + ).toEqual([ + { color: 'black', stop: 0 }, + { color: 'green', stop: 50 }, + { color: 'red', stop: 99 }, + ]); + + // now map the other way around + expect( + remapStopsByNewInterval( + [ + { color: 'black', stop: 0 }, + { color: 'green', stop: 50 }, + { color: 'red', stop: 99 }, + ], + { newInterval: 100, oldInterval: 100, newMin: -100, oldMin: 0 } + ) + ).toEqual([ + { color: 'black', stop: -100 }, + { color: 'green', stop: -50 }, + { color: 'red', stop: -1 }, + ]); + + // and test also palettes that also contains negative values + expect( + remapStopsByNewInterval( + [ + { color: 'black', stop: -50 }, + { color: 'green', stop: 0 }, + { color: 'red', stop: 50 }, + ], + { newInterval: 100, oldInterval: 100, newMin: 0, oldMin: -50 } + ) + ).toEqual([ + { color: 'black', stop: 0 }, + { color: 'green', stop: 50 }, + { color: 'red', stop: 100 }, + ]); + }); +}); + +describe('getDataMinMax', () => { + it('should pick the correct min/max based on the current range type', () => { + expect(getDataMinMax('percent', { min: -100, max: 0 })).toEqual({ min: 0, max: 100 }); + }); + + it('should pick the correct min/max apply percent by default', () => { + expect(getDataMinMax(undefined, { min: -100, max: 0 })).toEqual({ min: 0, max: 100 }); + }); +}); + +describe('getPaletteStops', () => { + const paletteRegistry = chartPluginMock.createPaletteRegistry(); + it('should correctly compute a predefined palette stops definition from only the name', () => { + expect( + getPaletteStops(paletteRegistry, { name: 'mock' }, { dataBounds: { min: 0, max: 100 } }) + ).toEqual([ + { color: 'blue', stop: 20 }, + { color: 'yellow', stop: 70 }, + ]); + }); + + it('should correctly compute a predefined palette stops definition from explicit prevPalette (override)', () => { + expect( + getPaletteStops( + paletteRegistry, + { name: 'default' }, + { dataBounds: { min: 0, max: 100 }, prevPalette: 'mock' } + ) + ).toEqual([ + { color: 'blue', stop: 20 }, + { color: 'yellow', stop: 70 }, + ]); + }); + + it('should infer the domain from dataBounds but start from 0', () => { + expect( + getPaletteStops( + paletteRegistry, + { name: 'default', rangeType: 'number' }, + { dataBounds: { min: 1, max: 11 }, prevPalette: 'mock' } + ) + ).toEqual([ + { color: 'blue', stop: 2 }, + { color: 'yellow', stop: 7 }, + ]); + }); + + it('should override the minStop when requested', () => { + expect( + getPaletteStops( + paletteRegistry, + { name: 'default', rangeType: 'number' }, + { dataBounds: { min: 1, max: 11 }, mapFromMinValue: true } + ) + ).toEqual([ + { color: 'red', stop: 1 }, + { color: 'black', stop: 6 }, + ]); + }); + + it('should compute a display stop palette from custom colorStops defined by the user', () => { + expect( + getPaletteStops( + paletteRegistry, + { + name: 'custom', + rangeType: 'number', + colorStops: [ + { color: 'green', stop: 0 }, + { color: 'blue', stop: 40 }, + { color: 'red', stop: 80 }, + ], + }, + { dataBounds: { min: 0, max: 100 } } + ) + ).toEqual([ + { color: 'green', stop: 40 }, + { color: 'blue', stop: 80 }, + { color: 'red', stop: 100 }, + ]); + }); + + it('should compute a display stop palette from custom colorStops defined by the user - handle stop at the end', () => { + expect( + getPaletteStops( + paletteRegistry, + { + name: 'custom', + rangeType: 'number', + colorStops: [ + { color: 'green', stop: 0 }, + { color: 'blue', stop: 40 }, + { color: 'red', stop: 100 }, + ], + }, + { dataBounds: { min: 0, max: 100 } } + ) + ).toEqual([ + { color: 'green', stop: 40 }, + { color: 'blue', stop: 100 }, + { color: 'red', stop: 101 }, + ]); + }); + + it('should compute a display stop palette from custom colorStops defined by the user - handle stop at the end (fractional)', () => { + expect( + getPaletteStops( + paletteRegistry, + { + name: 'custom', + rangeType: 'number', + colorStops: [ + { color: 'green', stop: 0 }, + { color: 'blue', stop: 0.4 }, + { color: 'red', stop: 1 }, + ], + }, + { dataBounds: { min: 0, max: 1 } } + ) + ).toEqual([ + { color: 'green', stop: 0.4 }, + { color: 'blue', stop: 1 }, + { color: 'red', stop: 2 }, + ]); + }); + + it('should compute a display stop palette from custom colorStops defined by the user - stretch the stops to 100% percent', () => { + expect( + getPaletteStops( + paletteRegistry, + { + name: 'custom', + colorStops: [ + { color: 'green', stop: 0 }, + { color: 'blue', stop: 0.4 }, + { color: 'red', stop: 1 }, + ], + }, + { dataBounds: { min: 0, max: 1 } } + ) + ).toEqual([ + { color: 'green', stop: 0.4 }, + { color: 'blue', stop: 1 }, + { color: 'red', stop: 100 }, // default rangeType is percent, hence stretch to 100% + ]); + }); +}); + +describe('reversePalette', () => { + it('should correctly reverse color and stops', () => { + expect( + reversePalette([ + { color: 'red', stop: 0 }, + { color: 'green', stop: 0.5 }, + { color: 'blue', stop: 0.9 }, + ]) + ).toEqual([ + { color: 'blue', stop: 0 }, + { color: 'green', stop: 0.5 }, + { color: 'red', stop: 0.9 }, + ]); + }); +}); + +describe('getStepValue', () => { + it('should compute the next step based on the last 2 stops', () => { + expect( + getStepValue( + // first arg is taken as max reference + [ + { color: 'red', stop: 0 }, + { color: 'red', stop: 50 }, + ], + [ + { color: 'red', stop: 0 }, + { color: 'red', stop: 50 }, + ], + 100 + ) + ).toBe(50); + + expect( + getStepValue( + // first arg is taken as max reference + [ + { color: 'red', stop: 0 }, + { color: 'red', stop: 80 }, + ], + [ + { color: 'red', stop: 0 }, + { color: 'red', stop: 50 }, + ], + 90 + ) + ).toBe(10); // 90 - 80 + + expect( + getStepValue( + // first arg is taken as max reference + [ + { color: 'red', stop: 0 }, + { color: 'red', stop: 100 }, + ], + [ + { color: 'red', stop: 0 }, + { color: 'red', stop: 50 }, + ], + 100 + ) + ).toBe(1); + }); +}); + +describe('getSortPredicate', () => { + it('should return dataIndex if otherbucker it enabled', () => { + const column = { + id: '0c4cfb78-3c2f-4eaf-82b3-4b2c1c6abe5a', + name: 'Top values of Carrier', + meta: { + type: 'string', + source: 'esaggs', + sourceParams: { + params: { + field: 'Carrier', + orderBy: '1', + order: 'desc', + size: 3, + otherBucket: true, + otherBucketLabel: 'Other', + missingBucket: false, + missingBucketLabel: '(missing value)', + }, + schema: 'segment', + }, + }, + } as DatatableColumn; + expect(getSortPredicate(column)).toEqual('dataIndex'); + }); + + it('should return numDesc for descending metric sorting', () => { + const column = { + id: 'col-0-2', + name: 'Dest: Descending', + meta: { + type: 'string', + source: 'esaggs', + sourceParams: { + params: { + field: 'Dest', + orderBy: '1', + order: 'desc', + size: 5, + otherBucket: false, + otherBucketLabel: 'Other', + missingBucket: false, + missingBucketLabel: 'Missing', + }, + schema: 'segment', + }, + }, + } as DatatableColumn; + expect(getSortPredicate(column)).toEqual('numDesc'); + }); + + it('should return alphaAsc for ascending alphabetical sorting', () => { + const column = { + id: 'col-0-2', + name: 'Dest: Ascending', + meta: { + type: 'string', + source: 'esaggs', + sourceParams: { + params: { + field: 'Dest', + orderBy: '_key', + order: 'asc', + size: 5, + otherBucket: false, + otherBucketLabel: 'Other', + missingBucket: false, + missingBucketLabel: 'Missing', + }, + schema: 'segment', + }, + }, + } as DatatableColumn; + expect(getSortPredicate(column)).toEqual('alphaAsc'); + }); +}); diff --git a/src/plugins/chart_expressions/expression_heatmap/public/components/helpers.ts b/src/plugins/chart_expressions/expression_heatmap/public/components/helpers.ts new file mode 100644 index 0000000000000..c9bfa68da9f22 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/components/helpers.ts @@ -0,0 +1,248 @@ +/* + * Copyright 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 { PaletteOutput, PaletteRegistry } from 'src/plugins/charts/public'; +import type { Datatable, DatatableColumn } from 'src/plugins/expressions/public'; +import type { CustomPaletteParams, ColorStop } from '../../common'; +import { + CUSTOM_PALETTE, + defaultPaletteParams, + DEFAULT_MAX_STOP, + DEFAULT_MIN_STOP, +} from '../constants'; + +// very simple heuristic: pick last two stops and compute a new stop based on the same distance +// if the new stop is above max, then reduce the step to reach max, or if zero then just 1. +// +// it accepts two series of stops as the function is used also when computing stops from colorStops +export function getStepValue(colorStops: ColorStop[], newColorStops: ColorStop[], max: number) { + const length = newColorStops.length; + // workout the steps from the last 2 items + const dataStep = newColorStops[length - 1].stop - newColorStops[length - 2].stop || 1; + let step = Number(dataStep.toFixed(2)); + if (max < colorStops[length - 1].stop + step) { + const diffToMax = max - colorStops[length - 1].stop; + // if the computed step goes way out of bound, fallback to 1, otherwise reach max + step = diffToMax > 0 ? diffToMax : 1; + } + return step; +} + +// Need to shift the Custom palette in order to correctly visualize it when in display mode +function shiftPalette(stops: ColorStop[], max: number) { + // shift everything right and add an additional stop at the end + const result = stops.map((entry, i, array) => ({ + ...entry, + stop: i + 1 < array.length ? array[i + 1].stop : max, + })); + if (stops[stops.length - 1].stop === max) { + // extends the range by a fair amount to make it work the extra case for the last stop === max + const computedStep = getStepValue(stops, result, max) || 1; + // do not go beyond the unit step in this case + const step = Math.min(1, computedStep); + result[stops.length - 1].stop = max + step; + } + return result; +} + +function getOverallMinMax( + params: CustomPaletteParams | undefined, + dataBounds: { min: number; max: number } +) { + const { min: dataMin, max: dataMax } = getDataMinMax(params?.rangeType, dataBounds); + const minStopValue = params?.colorStops?.[0]?.stop ?? Infinity; + const maxStopValue = params?.colorStops?.[params.colorStops.length - 1]?.stop ?? -Infinity; + const overallMin = Math.min(dataMin, minStopValue); + const overallMax = Math.max(dataMax, maxStopValue); + return { min: overallMin, max: overallMax }; +} + +export function getDataMinMax( + rangeType: CustomPaletteParams['rangeType'] | undefined, + dataBounds: { min: number; max: number } +) { + const dataMin = rangeType === 'number' ? dataBounds.min : DEFAULT_MIN_STOP; + const dataMax = rangeType === 'number' ? dataBounds.max : DEFAULT_MAX_STOP; + return { min: dataMin, max: dataMax }; +} +// Utility to remap color stops within new domain +export function remapStopsByNewInterval( + controlStops: ColorStop[], + { + newInterval, + oldInterval, + newMin, + oldMin, + }: { newInterval: number; oldInterval: number; newMin: number; oldMin: number } +) { + return (controlStops || []).map(({ color, stop }) => { + return { + color, + stop: newMin + ((stop - oldMin) * newInterval) / oldInterval, + }; + }); +} +/** + * This is a generic function to compute stops from the current parameters. + */ +export function getPaletteStops( + palettes: PaletteRegistry, + activePaletteParams: CustomPaletteParams, + // used to customize color resolution + { + prevPalette, + dataBounds, + mapFromMinValue, + defaultPaletteName, + }: { + prevPalette?: string; + dataBounds: { min: number; max: number }; + mapFromMinValue?: boolean; + defaultPaletteName?: string; + } +) { + const { min: minValue, max: maxValue } = getOverallMinMax(activePaletteParams, dataBounds); + const interval = maxValue - minValue; + const { stops: currentStops, ...otherParams } = activePaletteParams || {}; + + if (activePaletteParams.name === 'custom' && activePaletteParams?.colorStops) { + // need to generate the palette from the existing controlStops + return shiftPalette(activePaletteParams.colorStops, maxValue); + } + // generate a palette from predefined ones and customize the domain + const colorStopsFromPredefined = palettes + .get( + prevPalette || activePaletteParams?.name || defaultPaletteName || defaultPaletteParams.name + ) + .getCategoricalColors(defaultPaletteParams.steps, otherParams); + + const newStopsMin = mapFromMinValue ? minValue : interval / defaultPaletteParams.steps; + + const stops = remapStopsByNewInterval( + colorStopsFromPredefined.map((color, index) => ({ color, stop: index })), + { + newInterval: interval, + oldInterval: colorStopsFromPredefined.length, + newMin: newStopsMin, + oldMin: 0, + } + ); + return stops; +} + +export function reversePalette(paletteColorRepresentation: ColorStop[] = []) { + const stops = paletteColorRepresentation.map(({ stop }) => stop); + return paletteColorRepresentation + .map(({ color }, i) => ({ + color, + stop: stops[paletteColorRepresentation.length - i - 1], + })) + .reverse(); +} + +/** + * Some name conventions here: + * * `displayStops` => It's an additional transformation of `stops` into a [0, N] domain for the EUIPaletteDisplay component. + * * `stops` => final steps used to table coloring. It is a rightShift of the colorStops + * * `colorStops` => user's color stop inputs. Used to compute range min. + * + * When the user inputs the colorStops, they are designed to be the initial part of the color segment, + * so the next stops indicate where the previous stop ends. + * Both table coloring logic and EuiPaletteDisplay format implementation works differently than our current `colorStops`, + * by having the stop values at the end of each color segment rather than at the beginning: `stops` values are computed by a rightShift of `colorStops`. + * EuiPaletteDisplay has an additional requirement as it is always mapped against a domain [0, N]: from `stops` the `displayStops` are computed with + * some continuity enrichment and a remap against a [0, 100] domain to make the palette component work ok. + * + * These naming conventions would be useful to track the code flow in this feature as multiple transformations are happening + * for a single change. + */ + +export function applyPaletteParams>( + palettes: PaletteRegistry, + activePalette: T, + dataBounds: { min: number; max: number } +) { + // make a copy of it as they have to be manipulated later on + let displayStops = getPaletteStops(palettes, activePalette?.params || {}, { + dataBounds, + defaultPaletteName: activePalette?.name, + }); + + if (activePalette?.params?.reverse && activePalette?.params?.name !== CUSTOM_PALETTE) { + displayStops = reversePalette(displayStops); + } + return displayStops; +} + +function getId(id: string) { + return id; +} + +export function getNumericValue(rowValue: number | number[] | undefined) { + if (rowValue == null || Array.isArray(rowValue)) { + return; + } + return rowValue; +} + +export const findMinMaxByColumnId = ( + columnIds: string[], + table: Datatable | undefined, + getOriginalId: (id: string) => string = getId +) => { + const minMax: Record = {}; + + if (table != null) { + for (const columnId of columnIds) { + const originalId = getOriginalId(columnId); + minMax[originalId] = minMax[originalId] || { max: -Infinity, min: Infinity }; + table.rows.forEach((row) => { + const rowValue = row[columnId]; + const numericValue = getNumericValue(rowValue); + if (numericValue != null) { + if (minMax[originalId].min > numericValue) { + minMax[originalId].min = numericValue; + } + if (minMax[originalId].max < numericValue) { + minMax[originalId].max = numericValue; + } + } + }); + // what happens when there's no data in the table? Fallback to a percent range + if (minMax[originalId].max === -Infinity) { + minMax[originalId] = { max: 100, min: 0, fallback: true }; + } + } + } + return minMax; +}; +interface SourceParams { + order?: string; + orderBy?: string; + otherBucket?: boolean; +} + +export const getSortPredicate = (column: DatatableColumn) => { + const params = column.meta?.sourceParams?.params as SourceParams | undefined; + const sort: string | undefined = params?.orderBy; + if (params?.otherBucket || !sort) return 'dataIndex'; + // metric sorting + if (sort && sort !== '_key') { + if (params?.order === 'desc') { + return 'numDesc'; + } else { + return 'numAsc'; + } + // alphabetical sorting + } else { + if (params?.order === 'desc') { + return 'alphaDesc'; + } else { + return 'alphaAsc'; + } + } +}; diff --git a/src/plugins/chart_expressions/expression_heatmap/public/constants.ts b/src/plugins/chart_expressions/expression_heatmap/public/constants.ts new file mode 100644 index 0000000000000..79e24d05e3fde --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/constants.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 { RequiredPaletteParamTypes } from '../common'; +export const DEFAULT_PALETTE_NAME = 'temperature'; +export const FIXED_PROGRESSION = 'fixed' as const; +export const CUSTOM_PALETTE = 'custom'; +export const DEFAULT_CONTINUITY = 'above'; +export const DEFAULT_MIN_STOP = 0; +export const DEFAULT_MAX_STOP = 100; +export const DEFAULT_COLOR_STEPS = 5; +export const defaultPaletteParams: RequiredPaletteParamTypes = { + name: DEFAULT_PALETTE_NAME, + reverse: false, + rangeType: 'percent', + rangeMin: DEFAULT_MIN_STOP, + rangeMax: DEFAULT_MAX_STOP, + progression: FIXED_PROGRESSION, + stops: [], + steps: DEFAULT_COLOR_STEPS, + colorStops: [], + continuity: DEFAULT_CONTINUITY, +}; diff --git a/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx new file mode 100644 index 0000000000000..efdb6aee7782d --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/heatmap_renderer.tsx @@ -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 { i18n } from '@kbn/i18n'; +import React, { memo } from 'react'; +import { render, unmountComponentAtNode } from 'react-dom'; +import type { PersistedState } from '../../../../visualizations/public'; +import { ThemeServiceStart } from '../../../../../core/public'; +import { KibanaThemeProvider } from '../../../../kibana_react/public'; +import { ExpressionRenderDefinition } from '../../../../expressions/common/expression_renderers'; +import { + EXPRESSION_HEATMAP_NAME, + HeatmapExpressionProps, + FilterEvent, + BrushEvent, +} from '../../common'; +import { getFormatService, getPaletteService, getUISettings, getThemeService } from '../services'; +import { getTimeZone } from '../utils/get_timezone'; + +import HeatmapComponent from '../components/heatmap_component'; +import './index.scss'; +const MemoizedChart = memo(HeatmapComponent); + +interface ExpressioHeatmapRendererDependencies { + theme: ThemeServiceStart; +} + +export const heatmapRenderer: ( + deps: ExpressioHeatmapRendererDependencies +) => ExpressionRenderDefinition = ({ theme }) => ({ + name: EXPRESSION_HEATMAP_NAME, + displayName: i18n.translate('expressionHeatmap.visualizationName', { + defaultMessage: 'Heatmap', + }), + reuseDomNode: true, + render: async (domNode, config, handlers) => { + handlers.onDestroy(() => { + unmountComponentAtNode(domNode); + }); + const onClickValue = (data: FilterEvent['data']) => { + handlers.event({ name: 'filter', data }); + }; + const onSelectRange = (data: BrushEvent['data']) => { + handlers.event({ name: 'brush', data }); + }; + + const timeZone = getTimeZone(getUISettings()); + render( + +
+ +
+
, + domNode, + () => { + handlers.done(); + } + ); + }, +}); diff --git a/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/index.scss b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/index.scss new file mode 100644 index 0000000000000..6e1afd91c476d --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/index.scss @@ -0,0 +1,26 @@ +.heatmap-container { + @include euiScrollBar; + height: 100%; + width: 100%; + // the FocusTrap is adding extra divs which are making the visualization redraw twice + // with a visible glitch. This make the chart library resilient to this extra reflow + overflow: auto hidden; + user-select: text; + padding: $euiSizeS; +} + +.heatmap-chart__empty { + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.heatmap-chart-icon__subdued { + fill: $euiTextSubduedColor; +} + +.heatmap-chart-icon__accent { + fill: $euiColorVis0; +} \ No newline at end of file diff --git a/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/index.ts b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/index.ts new file mode 100644 index 0000000000000..d74f77b4eb5fc --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/expression_renderers/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 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 { heatmapRenderer } from './heatmap_renderer'; diff --git a/src/plugins/chart_expressions/expression_heatmap/public/index.ts b/src/plugins/chart_expressions/expression_heatmap/public/index.ts new file mode 100644 index 0000000000000..fbbf8027eb343 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/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. + */ + +import { ExpressionHeatmapPlugin } from './plugin'; + +export function plugin() { + return new ExpressionHeatmapPlugin(); +} diff --git a/src/plugins/chart_expressions/expression_heatmap/public/plugin.ts b/src/plugins/chart_expressions/expression_heatmap/public/plugin.ts new file mode 100644 index 0000000000000..cabb938f6f6b4 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/plugin.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. + */ +import { ChartsPluginSetup } from '../../../charts/public'; +import { CoreSetup, CoreStart } from '../../../../core/public'; +import { Plugin as ExpressionsPublicPlugin } from '../../../expressions/public'; +import { heatmapFunction, heatmapLegendConfig, heatmapGridConfig } from '../common'; +import { setFormatService, setPaletteService, setUISettings, setThemeService } from './services'; +import { heatmapRenderer } from './expression_renderers'; +import type { FieldFormatsStart } from '../../../field_formats/public'; + +/** @internal */ +export interface ExpressionHeatmapPluginSetup { + expressions: ReturnType; + charts: ChartsPluginSetup; +} + +/** @internal */ +export interface ExpressionHeatmapPluginStart { + fieldFormats: FieldFormatsStart; +} + +/** @internal */ +export class ExpressionHeatmapPlugin { + public setup(core: CoreSetup, { expressions, charts }: ExpressionHeatmapPluginSetup) { + charts.palettes.getPalettes().then((palettes) => { + setPaletteService(palettes); + }); + setUISettings(core.uiSettings); + setThemeService(charts.theme); + expressions.registerFunction(heatmapFunction); + expressions.registerFunction(heatmapLegendConfig); + expressions.registerFunction(heatmapGridConfig); + expressions.registerRenderer(heatmapRenderer({ theme: core.theme })); + } + + public start(core: CoreStart, { fieldFormats }: ExpressionHeatmapPluginStart) { + setFormatService(fieldFormats); + } +} diff --git a/src/plugins/chart_expressions/expression_heatmap/public/services/format_service.ts b/src/plugins/chart_expressions/expression_heatmap/public/services/format_service.ts new file mode 100644 index 0000000000000..73b66341c4d9a --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/services/format_service.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. + */ + +import { createGetterSetter } from '../../../../kibana_utils/public'; +import { FieldFormatsStart } from '../../../../field_formats/public'; + +export const [getFormatService, setFormatService] = + createGetterSetter('fieldFormats'); diff --git a/src/plugins/chart_expressions/expression_heatmap/public/services/index.ts b/src/plugins/chart_expressions/expression_heatmap/public/services/index.ts new file mode 100644 index 0000000000000..a86d9e4fee7c2 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/services/index.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 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 { getFormatService, setFormatService } from './format_service'; +export { + getPaletteService, + setPaletteService, + setThemeService, + getThemeService, +} from './palette_service'; +export { getUISettings, setUISettings } from './ui_settings'; diff --git a/src/plugins/chart_expressions/expression_heatmap/public/services/palette_service.ts b/src/plugins/chart_expressions/expression_heatmap/public/services/palette_service.ts new file mode 100644 index 0000000000000..4e76e3149c7a6 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/services/palette_service.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 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 { createGetterSetter } from '../../../../kibana_utils/public'; +import { PaletteRegistry, ChartsPluginSetup } from '../../../../charts/public'; + +export const [getPaletteService, setPaletteService] = + createGetterSetter('palette'); + +export const [getThemeService, setThemeService] = + createGetterSetter('charts.theme'); diff --git a/src/plugins/chart_expressions/expression_heatmap/public/services/ui_settings.ts b/src/plugins/chart_expressions/expression_heatmap/public/services/ui_settings.ts new file mode 100644 index 0000000000000..5e49e8da28840 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/services/ui_settings.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. + */ + +import { createGetterSetter } from '../../../../kibana_utils/public'; +import { CoreSetup } from '../../../../../core/public'; + +export const [getUISettings, setUISettings] = + createGetterSetter('core.uiSettings'); diff --git a/src/plugins/chart_expressions/expression_heatmap/public/utils/get_color_picker.tsx b/src/plugins/chart_expressions/expression_heatmap/public/utils/get_color_picker.tsx new file mode 100644 index 0000000000000..2f5297c5fd475 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/utils/get_color_picker.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 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, { useCallback } from 'react'; +import { LegendColorPicker, Position } from '@elastic/charts'; +import { PopoverAnchorPosition, EuiPopover, EuiOutsideClickDetector } from '@elastic/eui'; +import type { PersistedState } from '../../../../visualizations/public'; +import { ColorPicker } from '../../../../charts/public'; + +const KEY_CODE_ENTER = 13; + +function getAnchorPosition(legendPosition: Position): PopoverAnchorPosition { + switch (legendPosition) { + case Position.Bottom: + return 'upCenter'; + case Position.Top: + return 'downCenter'; + case Position.Left: + return 'rightCenter'; + default: + return 'leftCenter'; + } +} + +export const getColorPicker = + ( + legendPosition: Position, + setColor: (newColor: string | null, seriesKey: string | number) => void, + uiState: PersistedState + ): LegendColorPicker => + ({ anchor, color, onClose, onChange, seriesIdentifiers: [seriesIdentifier] }) => { + const seriesName = seriesIdentifier.key; + const overwriteColors: Record = uiState?.get('vis.colors', {}) ?? {}; + const colorIsOverwritten = seriesName.toString() in overwriteColors; + let keyDownEventOn = false; + const handleChange = (newColor: string | null) => { + if (newColor) { + onChange(newColor); + } + setColor(newColor, seriesName); + // close the popover if no color is applied or the user has clicked a color + if (!newColor || !keyDownEventOn) { + onClose(); + } + }; + + const onKeyDown = (e: React.KeyboardEvent) => { + if (e.keyCode === KEY_CODE_ENTER) { + onClose?.(); + } + keyDownEventOn = true; + }; + + const handleOutsideClick = useCallback(() => { + onClose?.(); + }, [onClose]); + + return ( + + + + + + ); + }; diff --git a/src/plugins/chart_expressions/expression_heatmap/public/utils/get_timezone.ts b/src/plugins/chart_expressions/expression_heatmap/public/utils/get_timezone.ts new file mode 100644 index 0000000000000..8d33a94c956d0 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/public/utils/get_timezone.ts @@ -0,0 +1,22 @@ +/* + * Copyright 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 moment from 'moment'; +import type { IUiSettingsClient } from '../../../../../core/public'; + +/** + * Get timeZone from uiSettings + */ +export function getTimeZone(uiSettings: IUiSettingsClient) { + if (uiSettings.isDefault('dateFormat:tz')) { + const detectedTimeZone = moment.tz.guess(); + return detectedTimeZone || moment().format('Z'); + } else { + return uiSettings.get('dateFormat:tz', 'Browser'); + } +} diff --git a/src/plugins/chart_expressions/expression_heatmap/server/index.ts b/src/plugins/chart_expressions/expression_heatmap/server/index.ts new file mode 100644 index 0000000000000..fbbf8027eb343 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/server/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. + */ + +import { ExpressionHeatmapPlugin } from './plugin'; + +export function plugin() { + return new ExpressionHeatmapPlugin(); +} diff --git a/src/plugins/chart_expressions/expression_heatmap/server/plugin.ts b/src/plugins/chart_expressions/expression_heatmap/server/plugin.ts new file mode 100644 index 0000000000000..858c67da86a6e --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/server/plugin.ts @@ -0,0 +1,37 @@ +/* + * Copyright 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 { CoreSetup, CoreStart, Plugin } from '../../../../core/public'; +import { ExpressionsServerStart, ExpressionsServerSetup } from '../../../expressions/server'; +import { heatmapFunction, heatmapLegendConfig, heatmapGridConfig } from '../common'; + +interface SetupDeps { + expressions: ExpressionsServerSetup; +} + +interface StartDeps { + expression: ExpressionsServerStart; +} + +export type ExpressionHeatmapPluginSetup = void; +export type ExpressionHeatmapPluginStart = void; + +export class ExpressionHeatmapPlugin + implements + Plugin +{ + public setup(core: CoreSetup, { expressions }: SetupDeps): ExpressionHeatmapPluginSetup { + expressions.registerFunction(heatmapFunction); + expressions.registerFunction(heatmapLegendConfig); + expressions.registerFunction(heatmapGridConfig); + } + + public start(core: CoreStart): ExpressionHeatmapPluginStart {} + + public stop() {} +} diff --git a/src/plugins/chart_expressions/expression_heatmap/tsconfig.json b/src/plugins/chart_expressions/expression_heatmap/tsconfig.json new file mode 100644 index 0000000000000..ff5089c7f4d21 --- /dev/null +++ b/src/plugins/chart_expressions/expression_heatmap/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "./target/types", + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true, + "isolatedModules": true + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + ], + "references": [ + { "path": "../../../core/tsconfig.json" }, + { "path": "../../expressions/tsconfig.json" }, + { "path": "../../presentation_util/tsconfig.json" }, + { "path": "../../field_formats/tsconfig.json" }, + { "path": "../../charts/tsconfig.json" }, + { "path": "../../visualizations/tsconfig.json" }, + ] +} diff --git a/src/plugins/charts/public/static/components/empty_placeholder.tsx b/src/plugins/charts/public/static/components/empty_placeholder.tsx new file mode 100644 index 0000000000000..db3f3fb6739d5 --- /dev/null +++ b/src/plugins/charts/public/static/components/empty_placeholder.tsx @@ -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 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 { EuiIcon, EuiText, IconType, EuiSpacer } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; + +export const EmptyPlaceholder = (props: { icon: IconType }) => ( + <> + + + +

+ +

+
+ +); diff --git a/src/plugins/charts/public/static/components/index.ts b/src/plugins/charts/public/static/components/index.ts index 7f3af50a01aa4..ea3e66e7f30a3 100644 --- a/src/plugins/charts/public/static/components/index.ts +++ b/src/plugins/charts/public/static/components/index.ts @@ -9,4 +9,5 @@ export { LegendToggle } from './legend_toggle'; export { ColorPicker } from './color_picker'; export { CurrentTime } from './current_time'; +export { EmptyPlaceholder } from './empty_placeholder'; export * from './endzones'; diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor_output.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor_output.tsx index cb5301fa41c1d..9f9cdcad9115b 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor_output.tsx +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor_output.tsx @@ -12,7 +12,7 @@ import React, { useEffect, useRef } from 'react'; // Ensure the modes we might switch to dynamically are available import 'brace/mode/text'; -import 'brace/mode/json'; +import 'brace/mode/hjson'; import 'brace/mode/yaml'; import { expandLiteralStrings } from '../../../../../shared_imports'; @@ -47,7 +47,8 @@ function modeForContentType(contentType?: string) { return 'ace/mode/text'; } if (isJSONContentType(contentType)) { - return 'ace/mode/json'; + // Using hjson will allow us to use comments in editor output and solves the problem with error markers + return 'ace/mode/hjson'; } else if (contentType.indexOf('application/yaml') >= 0) { return 'ace/mode/yaml'; } 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 0f65d3f1e33e2..01a7786c5d856 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 @@ -492,7 +492,9 @@ export class SenseEditor { return result.join('\n'); }; - updateActionsBar = () => this.coreEditor.legacyUpdateUI(this.currentReqRange); + updateActionsBar = () => { + return this.coreEditor.legacyUpdateUI(this.currentReqRange); + }; getCoreEditor() { return this.coreEditor; diff --git a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx index 09ac0c1dd94bb..8be3526e3ad29 100644 --- a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx +++ b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx @@ -17,7 +17,7 @@ import classNames from 'classnames'; import _ from 'lodash'; import React from 'react'; import { Subscription } from 'rxjs'; -import ReactGridLayout, { Layout } from 'react-grid-layout'; +import ReactGridLayout, { Layout, ReactGridLayoutProps } from 'react-grid-layout'; import { GridData } from '../../../../common'; import { ViewMode } from '../../../services/embeddable'; import { DASHBOARD_GRID_COLUMN_COUNT, DASHBOARD_GRID_HEIGHT } from '../dashboard_constants'; @@ -54,9 +54,9 @@ function ResponsiveGrid({ size: { width: number }; isViewMode: boolean; layout: Layout[]; - onLayoutChange: () => void; + onLayoutChange: ReactGridLayoutProps['onLayoutChange']; children: JSX.Element[]; - maximizedPanelId: string; + maximizedPanelId?: string; useMargins: boolean; }) { // This is to prevent a bug where view mode changes when the panel is expanded. View mode changes will trigger diff --git a/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts index 2e89ee70d057d..3f6f9f0966c9c 100644 --- a/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts +++ b/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts @@ -79,15 +79,12 @@ const panelsAreEqual = (panelsA: DashboardPanelMap, panelsB: DashboardPanelMap): } // embeddable ids are equal so let's compare individual panels. for (const id of embeddableIdsA) { - if ( - Object.keys( - commonDiff( - panelsA[id] as unknown as DashboardDiffCommon, - panelsB[id] as unknown as DashboardDiffCommon, - ['panelRefName'] - ) - ).length > 0 - ) { + const panelCommonDiff = commonDiff( + panelsA[id] as unknown as DashboardDiffCommon, + panelsB[id] as unknown as DashboardDiffCommon, + ['panelRefName'] + ); + if (Object.keys(panelCommonDiff).length > 0) { return false; } } diff --git a/src/plugins/data/common/search/aggs/agg_config.ts b/src/plugins/data/common/search/aggs/agg_config.ts index 4cb091787c058..7f9ce07efbe51 100644 --- a/src/plugins/data/common/search/aggs/agg_config.ts +++ b/src/plugins/data/common/search/aggs/agg_config.ts @@ -402,6 +402,10 @@ export class AggConfig { return this.type.getValue(this, bucket); } + getResponseId() { + return this.type.getResponseId(this); + } + getKey(bucket: any, key?: string) { if (this.type.getKey) { return this.type.getKey(bucket, key, this); diff --git a/src/plugins/data/common/search/aggs/agg_type.ts b/src/plugins/data/common/search/aggs/agg_type.ts index 3f91eadd19eb4..b22780273c23e 100644 --- a/src/plugins/data/common/search/aggs/agg_type.ts +++ b/src/plugins/data/common/search/aggs/agg_type.ts @@ -58,6 +58,7 @@ export interface AggTypeConfig< getValue?: (agg: TAggConfig, bucket: any) => any; getKey?: (bucket: any, key: any, agg: TAggConfig) => any; getValueBucketPath?: (agg: TAggConfig) => string; + getResponseId?: (agg: TAggConfig) => string; } // TODO need to make a more explicit interface for this @@ -224,6 +225,25 @@ export class AggType< return false; } + /** + * Returns the key of the object containing the results of the agg in the Elasticsearch response object. + * In most cases this returns the `agg.id` property, but in some cases the response object is structured differently. + * In the following example of a terms agg, `getResponseId` returns "myAgg": + * ``` + * { + * "aggregations": { + * "myAgg": { + * "doc_count_error_upper_bound": 0, + * "sum_other_doc_count": 0, + * "buckets": [ + * ... + * ``` + * + * @param {agg} agg - the agg to return the id in the ES reponse object for + * @return {string} + */ + getResponseId: (agg: TAggConfig) => string; + /** * Generic AggType Constructor * @@ -298,5 +318,7 @@ export class AggType< }); this.getValue = config.getValue || ((agg: TAggConfig, bucket: any) => {}); + + this.getResponseId = config.getResponseId || ((agg: TAggConfig) => agg.id); } } diff --git a/src/plugins/data/common/search/aggs/metrics/filtered_metric.test.ts b/src/plugins/data/common/search/aggs/metrics/filtered_metric.test.ts index b27e4dd1494be..c86c5d89ff6a3 100644 --- a/src/plugins/data/common/search/aggs/metrics/filtered_metric.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/filtered_metric.test.ts @@ -69,4 +69,10 @@ describe('filtered metric agg type', () => { }) ).toEqual(10); }); + + it('provides the id of the inner filter bucket to look up the agg config in the response object', () => { + const agg = aggConfigs.getResponseAggs()[0]; + + expect(agg.getResponseId()).toEqual('filtered_metric-bucket'); + }); }); diff --git a/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts b/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts index 00f47d31b0398..fe35f3ea90008 100644 --- a/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts +++ b/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts @@ -52,5 +52,8 @@ export const getFilteredMetricAgg = () => { } return `${customBucket.getValueBucketPath()}>${customMetric.getValueBucketPath()}`; }, + getResponseId(agg) { + return agg.params.customBucket.id; + }, }); }; diff --git a/src/plugins/data/common/search/aggs/utils/time_splits.ts b/src/plugins/data/common/search/aggs/utils/time_splits.ts index 2eb49d76c6082..6eb1827e56b13 100644 --- a/src/plugins/data/common/search/aggs/utils/time_splits.ts +++ b/src/plugins/data/common/search/aggs/utils/time_splits.ts @@ -186,7 +186,7 @@ export function mergeTimeShifts( return; } else { // a sub-agg - const agg = requestAggs.find((requestAgg) => key.indexOf(requestAgg.id) === 0); + const agg = requestAggs.find((requestAgg) => key === requestAgg.getResponseId()); if (agg && agg.type.type === AggGroupNames.Metrics) { const timeShift = agg.getTimeShift(); if ( diff --git a/src/plugins/data/public/search/search_interceptor/search_interceptor.ts b/src/plugins/data/public/search/search_interceptor/search_interceptor.ts index 180e826b5bc4e..9e968c9bae8a0 100644 --- a/src/plugins/data/public/search/search_interceptor/search_interceptor.ts +++ b/src/plugins/data/public/search/search_interceptor/search_interceptor.ts @@ -383,7 +383,7 @@ export class SearchInterceptor { private showTimeoutErrorMemoized = memoize( this.showTimeoutErrorToast, - (_: SearchTimeoutError, sessionId: string) => { + (_: SearchTimeoutError, sessionId?: string) => { return sessionId; } ); @@ -400,12 +400,7 @@ export class SearchInterceptor { ); }; - private showRestoreWarning = memoize( - this.showRestoreWarningToast, - (_: SearchTimeoutError, sessionId: string) => { - return sessionId; - } - ); + private showRestoreWarning = memoize(this.showRestoreWarningToast); /** * Show one error notification per session. diff --git a/src/plugins/data/public/ui/search_bar/search_bar.tsx b/src/plugins/data/public/ui/search_bar/search_bar.tsx index 9478d84741b7e..385f052adece6 100644 --- a/src/plugins/data/public/ui/search_bar/search_bar.tsx +++ b/src/plugins/data/public/ui/search_bar/search_bar.tsx @@ -25,7 +25,7 @@ import { FilterBar } from '../filter_bar/filter_bar'; import { SavedQueryMeta, SaveQueryForm } from '../saved_query_form'; import { SavedQueryManagementComponent } from '../saved_query_management'; -interface SearchBarInjectedDeps { +export interface SearchBarInjectedDeps { kibana: KibanaReactContextValue; intl: InjectedIntl; timeHistory: TimeHistoryContract; diff --git a/src/plugins/data/server/search/collectors/usage.ts b/src/plugins/data/server/search/collectors/usage.ts index f9d703900fc04..836ff33b335c4 100644 --- a/src/plugins/data/server/search/collectors/usage.ts +++ b/src/plugins/data/server/search/collectors/usage.ts @@ -62,15 +62,15 @@ export function usageProvider(core: CoreSetup): SearchUsage { { maxWait: 5000 } ); - const trackSuccess = (duration: number) => { + const trackSuccess = async (duration: number) => { collectedUsage.successCount++; collectedUsage.totalDuration += duration; - return updateSearchUsage(); + return await updateSearchUsage(); }; - const trackError = () => { + const trackError = async () => { collectedUsage.errorCount++; - return updateSearchUsage(); + return await updateSearchUsage(); }; return { trackSuccess, trackError }; diff --git a/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/number/number.tsx b/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/number/number.tsx index 4a86d8322b9ef..dfbd43f99142c 100644 --- a/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/number/number.tsx +++ b/src/plugins/data_view_field_editor/public/components/field_format_editor/editors/number/number.tsx @@ -26,7 +26,7 @@ export class NumberFormatEditor extends DefaultFormatEditor; + declare context: React.ContextType; state = { ...defaultState, sampleInputs: [10000, 12.345678, -1, -999, 0.52], diff --git a/src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx b/src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx index 76c460de4ed42..36e61af6cea33 100644 --- a/src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx +++ b/src/plugins/data_view_management/public/components/field_editor/components/scripting_help/test_script.tsx @@ -51,7 +51,7 @@ interface TestScriptState { export class TestScript extends Component { static contextType = contextType; - public readonly context!: IndexPatternManagmentContextValue; + public declare readonly context: IndexPatternManagmentContextValue; defaultProps = { name: 'myScriptedField', diff --git a/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx b/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx index ceaad76d6d124..5beb4fb989d5b 100644 --- a/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx +++ b/src/plugins/data_view_management/public/components/field_editor/field_editor.tsx @@ -125,7 +125,7 @@ export interface FieldEdiorProps { export class FieldEditor extends PureComponent { static contextType = contextType; - public readonly context!: IndexPatternManagmentContextValue; + public declare readonly context: IndexPatternManagmentContextValue; supportedLangs: estypes.ScriptLanguage[] = []; deprecatedLangs: estypes.ScriptLanguage[] = []; 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 eeed4b9054d7b..fdbd6543b08ba 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 @@ -5,15 +5,16 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import { css } from '@emotion/react'; import { EuiBadge, EuiButton, - EuiBadgeGroup, EuiButtonEmpty, EuiInMemoryTable, EuiPageHeader, EuiSpacer, + EuiFlexItem, + EuiFlexGroup, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { RouteComponentProps, withRouter, useLocation } from 'react-router-dom'; @@ -59,6 +60,10 @@ const securityDataView = i18n.translate( const securitySolution = 'security-solution'; +const flexItemStyles = css` + justify-content: center; +`; + interface Props extends RouteComponentProps { canSave: boolean; showCreateDialog?: boolean; @@ -120,19 +125,24 @@ export const IndexPatternTable = ({ } ) => ( <> - - {name} - -   - + + + + {name} + + {index.id && index.id.indexOf(securitySolution) === 0 && ( - {securityDataView} + + {securityDataView} + )} {index.tags && index.tags.map(({ key: tagKey, name: tagName }) => ( - {tagName} + + {tagName} + ))} - + ), dataType: 'string' as const, diff --git a/src/plugins/data_views/common/data_views/__snapshots__/data_views.test.ts.snap b/src/plugins/data_views/common/data_views/__snapshots__/data_views.test.ts.snap index af9499bd7e263..50054478173e6 100644 --- a/src/plugins/data_views/common/data_views/__snapshots__/data_views.test.ts.snap +++ b/src/plugins/data_views/common/data_views/__snapshots__/data_views.test.ts.snap @@ -22,6 +22,10 @@ FldList [ ] `; +exports[`IndexPatterns createAndSave will throw if insufficient access 1`] = `[DataViewInsufficientAccessError: Operation failed due to insufficient access, id: undefined]`; + +exports[`IndexPatterns delete will throw if insufficient access 1`] = `[DataViewInsufficientAccessError: Operation failed due to insufficient access, id: 1]`; + exports[`IndexPatterns savedObjectToSpec 1`] = ` Object { "allowNoIndex": undefined, @@ -60,3 +64,5 @@ Object { "version": "version", } `; + +exports[`IndexPatterns updateSavedObject will throw if insufficient access 1`] = `[DataViewInsufficientAccessError: Operation failed due to insufficient access, id: id]`; 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 210c926f92df7..7ed3e1f2c5434 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 @@ -48,6 +48,7 @@ const savedObject = { describe('IndexPatterns', () => { let indexPatterns: DataViewsService; + let indexPatternsNoAccess: DataViewsService; let savedObjectsClient: SavedObjectsClientCommon; let SOClientGetDelay = 0; const uiSettings = { @@ -99,6 +100,18 @@ describe('IndexPatterns', () => { onNotification: () => {}, onError: () => {}, onRedirectNoIndexPattern: () => {}, + getCanSave: () => Promise.resolve(true), + }); + + indexPatternsNoAccess = new DataViewsService({ + uiSettings, + savedObjectsClient: savedObjectsClient as unknown as SavedObjectsClientCommon, + apiClient: createFieldsFetcher(), + fieldFormats, + onNotification: () => {}, + onError: () => {}, + onRedirectNoIndexPattern: () => {}, + getCanSave: () => Promise.resolve(false), }); }); @@ -171,6 +184,10 @@ describe('IndexPatterns', () => { expect(indexPattern).not.toBe(await indexPatterns.get(id)); }); + test('delete will throw if insufficient access', async () => { + await expect(indexPatternsNoAccess.delete('1')).rejects.toMatchSnapshot(); + }); + test('should handle version conflicts', async () => { setDocsourcePayload(null, { id: 'foo', @@ -246,6 +263,18 @@ describe('IndexPatterns', () => { expect(indexPatterns.setDefault).toBeCalled(); }); + test('createAndSave will throw if insufficient access', async () => { + const title = 'kibana-*'; + + await expect(indexPatternsNoAccess.createAndSave({ title })).rejects.toMatchSnapshot(); + }); + + test('updateSavedObject will throw if insufficient access', async () => { + await expect( + indexPatternsNoAccess.updateSavedObject({ id: 'id' } as unknown as DataView) + ).rejects.toMatchSnapshot(); + }); + test('savedObjectToSpec', () => { const spec = indexPatterns.savedObjectToSpec(savedObject); expect(spec).toMatchSnapshot(); 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 b54bcf3471d4b..bb62bd1875aae 100644 --- a/src/plugins/data_views/common/data_views/data_views.ts +++ b/src/plugins/data_views/common/data_views/data_views.ts @@ -35,7 +35,7 @@ import { META_FIELDS, SavedObject } from '../../common'; import { SavedObjectNotFound } from '../../../kibana_utils/common'; import { DataViewMissingIndices } from '../lib'; import { findByTitle } from '../utils'; -import { DuplicateDataViewError } from '../errors'; +import { DuplicateDataViewError, DataViewInsufficientAccessError } from '../errors'; const MAX_ATTEMPTS_TO_RESOLVE_CONFLICTS = 3; @@ -67,6 +67,7 @@ interface IndexPatternsServiceDeps { onNotification: OnNotification; onError: OnError; onRedirectNoIndexPattern?: () => void; + getCanSave: () => Promise; } export class DataViewsService { @@ -78,6 +79,7 @@ export class DataViewsService { private onNotification: OnNotification; private onError: OnError; private dataViewCache: ReturnType; + private getCanSave: () => Promise; /** * @deprecated Use `getDefaultDataView` instead (when loading data view) and handle @@ -93,6 +95,7 @@ export class DataViewsService { onNotification, onError, onRedirectNoIndexPattern = () => {}, + getCanSave = () => Promise.resolve(false), }: IndexPatternsServiceDeps) { this.apiClient = apiClient; this.config = uiSettings; @@ -101,6 +104,7 @@ export class DataViewsService { this.onNotification = onNotification; this.onError = onError; this.ensureDefaultDataView = createEnsureDefaultDataView(uiSettings, onRedirectNoIndexPattern); + this.getCanSave = getCanSave; this.dataViewCache = createDataViewCache(); } @@ -557,6 +561,9 @@ export class DataViewsService { */ async createSavedObject(indexPattern: DataView, override = false) { + if (!(await this.getCanSave())) { + throw new DataViewInsufficientAccessError(); + } const dupe = await findByTitle(this.savedObjectsClient, indexPattern.title); if (dupe) { if (override) { @@ -595,6 +602,9 @@ export class DataViewsService { ignoreErrors: boolean = false ): Promise { if (!indexPattern.id) return; + if (!(await this.getCanSave())) { + throw new DataViewInsufficientAccessError(indexPattern.id); + } // get the list of attributes const body = indexPattern.getAsSavedObjectBody(); @@ -678,6 +688,9 @@ export class DataViewsService { * @param indexPatternId: Id of kibana Index Pattern to delete */ async delete(indexPatternId: string) { + if (!(await this.getCanSave())) { + throw new DataViewInsufficientAccessError(indexPatternId); + } this.dataViewCache.clear(indexPatternId); return this.savedObjectsClient.delete(DATA_VIEW_SAVED_OBJECT_TYPE, indexPatternId); } diff --git a/src/plugins/data_views/common/errors/index.ts b/src/plugins/data_views/common/errors/index.ts index 20ff90d3fd6cf..97203b2a4baeb 100644 --- a/src/plugins/data_views/common/errors/index.ts +++ b/src/plugins/data_views/common/errors/index.ts @@ -8,3 +8,4 @@ export * from './duplicate_index_pattern'; export * from './data_view_saved_object_conflict'; +export * from './insufficient_access'; diff --git a/src/plugins/data_views/common/errors/insufficient_access.ts b/src/plugins/data_views/common/errors/insufficient_access.ts new file mode 100644 index 0000000000000..48c826ec78557 --- /dev/null +++ b/src/plugins/data_views/common/errors/insufficient_access.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 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 class DataViewInsufficientAccessError extends Error { + constructor(savedObjectId?: string) { + super(`Operation failed due to insufficient access, id: ${savedObjectId}`); + this.name = 'DataViewInsufficientAccessError'; + } +} diff --git a/src/plugins/data_views/public/plugin.ts b/src/plugins/data_views/public/plugin.ts index 58f66623b64ab..4a00ea91a47bd 100644 --- a/src/plugins/data_views/public/plugin.ts +++ b/src/plugins/data_views/public/plugin.ts @@ -61,6 +61,7 @@ export class DataViewsPublicPlugin application.navigateToApp, overlays ), + getCanSave: () => Promise.resolve(application.capabilities.indexPatterns.save === true), }); } diff --git a/src/plugins/data_views/server/data_views_service_factory.ts b/src/plugins/data_views/server/data_views_service_factory.ts index 2f720cd7388f4..620107231fb4f 100644 --- a/src/plugins/data_views/server/data_views_service_factory.ts +++ b/src/plugins/data_views/server/data_views_service_factory.ts @@ -11,6 +11,8 @@ import { SavedObjectsClientContract, ElasticsearchClient, UiSettingsServiceStart, + KibanaRequest, + CoreStart, } from 'kibana/server'; import { DataViewsService } from '../common'; import { FieldFormatsStart } from '../../field_formats/server'; @@ -23,14 +25,17 @@ export const dataViewsServiceFactory = logger, uiSettings, fieldFormats, + capabilities, }: { logger: Logger; uiSettings: UiSettingsServiceStart; fieldFormats: FieldFormatsStart; + capabilities: CoreStart['capabilities']; }) => async ( savedObjectsClient: SavedObjectsClientContract, - elasticsearchClient: ElasticsearchClient + elasticsearchClient: ElasticsearchClient, + request?: KibanaRequest ) => { const uiSettingsClient = uiSettings.asScopedToClient(savedObjectsClient); const formats = await fieldFormats.fieldFormatServiceFactory(uiSettingsClient); @@ -46,5 +51,9 @@ export const dataViewsServiceFactory = onNotification: ({ title, text }) => { logger.warn(`${title}${text ? ` : ${text}` : ''}`); }, + getCanSave: async () => + request + ? (await capabilities.resolveCapabilities(request)).indexPatterns.save === true + : false, }); }; diff --git a/src/plugins/data_views/server/expressions/load_index_pattern.ts b/src/plugins/data_views/server/expressions/load_index_pattern.ts index 8ade41132e144..8604709e81582 100644 --- a/src/plugins/data_views/server/expressions/load_index_pattern.ts +++ b/src/plugins/data_views/server/expressions/load_index_pattern.ts @@ -85,7 +85,8 @@ export function getIndexPatternLoad({ return { indexPatterns: await indexPatternsServiceFactory( savedObjects.getScopedClient(request), - elasticsearch.client.asScoped(request).asCurrentUser + elasticsearch.client.asScoped(request).asCurrentUser, + request ), }; }, diff --git a/src/plugins/data_views/server/plugin.ts b/src/plugins/data_views/server/plugin.ts index 7285e74847e58..6b9e28101ac24 100644 --- a/src/plugins/data_views/server/plugin.ts +++ b/src/plugins/data_views/server/plugin.ts @@ -53,13 +53,14 @@ export class DataViewsServerPlugin } public start( - { uiSettings }: CoreStart, + { uiSettings, capabilities }: CoreStart, { fieldFormats }: DataViewsServerPluginStartDependencies ) { const serviceFactory = dataViewsServiceFactory({ logger: this.logger.get('indexPatterns'), uiSettings, fieldFormats, + capabilities, }); return { diff --git a/src/plugins/data_views/server/routes/create_index_pattern.ts b/src/plugins/data_views/server/routes/create_index_pattern.ts index b87b03f8bd4a1..d50012596ee56 100644 --- a/src/plugins/data_views/server/routes/create_index_pattern.ts +++ b/src/plugins/data_views/server/routes/create_index_pattern.ts @@ -71,7 +71,8 @@ export const registerCreateIndexPatternRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const body = req.body; diff --git a/src/plugins/data_views/server/routes/default_index_pattern.ts b/src/plugins/data_views/server/routes/default_index_pattern.ts index 620e201a4850d..1fe56db6c7488 100644 --- a/src/plugins/data_views/server/routes/default_index_pattern.ts +++ b/src/plugins/data_views/server/routes/default_index_pattern.ts @@ -29,7 +29,8 @@ export const registerManageDefaultIndexPatternRoutes = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const defaultIndexPatternId = await indexPatternsService.getDefaultId(); @@ -63,7 +64,8 @@ export const registerManageDefaultIndexPatternRoutes = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const newDefaultId = req.body.index_pattern_id; diff --git a/src/plugins/data_views/server/routes/delete_index_pattern.ts b/src/plugins/data_views/server/routes/delete_index_pattern.ts index 0d3f929cdccc3..151fb0b0224b6 100644 --- a/src/plugins/data_views/server/routes/delete_index_pattern.ts +++ b/src/plugins/data_views/server/routes/delete_index_pattern.ts @@ -40,7 +40,8 @@ export const registerDeleteIndexPatternRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; diff --git a/src/plugins/data_views/server/routes/fields/update_fields.ts b/src/plugins/data_views/server/routes/fields/update_fields.ts index 3e45ee46f2bb7..258ae9ebec3af 100644 --- a/src/plugins/data_views/server/routes/fields/update_fields.ts +++ b/src/plugins/data_views/server/routes/fields/update_fields.ts @@ -64,7 +64,8 @@ export const registerUpdateFieldsRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const { fields } = req.body; diff --git a/src/plugins/data_views/server/routes/get_index_pattern.ts b/src/plugins/data_views/server/routes/get_index_pattern.ts index 7fea748ca3389..b7d95fe687a0a 100644 --- a/src/plugins/data_views/server/routes/get_index_pattern.ts +++ b/src/plugins/data_views/server/routes/get_index_pattern.ts @@ -40,7 +40,8 @@ export const registerGetIndexPatternRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const indexPattern = await indexPatternsService.get(id); diff --git a/src/plugins/data_views/server/routes/has_user_index_pattern.ts b/src/plugins/data_views/server/routes/has_user_index_pattern.ts index af0ad1cc88d2e..6562d06df6f65 100644 --- a/src/plugins/data_views/server/routes/has_user_index_pattern.ts +++ b/src/plugins/data_views/server/routes/has_user_index_pattern.ts @@ -29,7 +29,8 @@ export const registerHasUserIndexPatternRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); return res.ok({ diff --git a/src/plugins/data_views/server/routes/runtime_fields/create_runtime_field.ts b/src/plugins/data_views/server/routes/runtime_fields/create_runtime_field.ts index 04b661d14732f..434d57f1aeecb 100644 --- a/src/plugins/data_views/server/routes/runtime_fields/create_runtime_field.ts +++ b/src/plugins/data_views/server/routes/runtime_fields/create_runtime_field.ts @@ -48,7 +48,8 @@ export const registerCreateRuntimeFieldRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const { name, runtimeField } = req.body; diff --git a/src/plugins/data_views/server/routes/runtime_fields/delete_runtime_field.ts b/src/plugins/data_views/server/routes/runtime_fields/delete_runtime_field.ts index e5c6b03a64224..d15365647f2a0 100644 --- a/src/plugins/data_views/server/routes/runtime_fields/delete_runtime_field.ts +++ b/src/plugins/data_views/server/routes/runtime_fields/delete_runtime_field.ts @@ -44,7 +44,8 @@ export const registerDeleteRuntimeFieldRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const name = req.params.name; diff --git a/src/plugins/data_views/server/routes/runtime_fields/get_runtime_field.ts b/src/plugins/data_views/server/routes/runtime_fields/get_runtime_field.ts index b457ae6b0159b..a6f45b81af149 100644 --- a/src/plugins/data_views/server/routes/runtime_fields/get_runtime_field.ts +++ b/src/plugins/data_views/server/routes/runtime_fields/get_runtime_field.ts @@ -45,7 +45,8 @@ export const registerGetRuntimeFieldRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const name = req.params.name; diff --git a/src/plugins/data_views/server/routes/runtime_fields/put_runtime_field.ts b/src/plugins/data_views/server/routes/runtime_fields/put_runtime_field.ts index 1c3ed99fdf67e..7cea9864f17dd 100644 --- a/src/plugins/data_views/server/routes/runtime_fields/put_runtime_field.ts +++ b/src/plugins/data_views/server/routes/runtime_fields/put_runtime_field.ts @@ -47,7 +47,8 @@ export const registerPutRuntimeFieldRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const { name, runtimeField } = req.body; diff --git a/src/plugins/data_views/server/routes/runtime_fields/update_runtime_field.ts b/src/plugins/data_views/server/routes/runtime_fields/update_runtime_field.ts index ca92f310ff281..b2c6bf0576b9b 100644 --- a/src/plugins/data_views/server/routes/runtime_fields/update_runtime_field.ts +++ b/src/plugins/data_views/server/routes/runtime_fields/update_runtime_field.ts @@ -55,7 +55,8 @@ export const registerUpdateRuntimeFieldRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const name = req.params.name; diff --git a/src/plugins/data_views/server/routes/scripted_fields/create_scripted_field.ts b/src/plugins/data_views/server/routes/scripted_fields/create_scripted_field.ts index e620960afbe13..b3660f5841442 100644 --- a/src/plugins/data_views/server/routes/scripted_fields/create_scripted_field.ts +++ b/src/plugins/data_views/server/routes/scripted_fields/create_scripted_field.ts @@ -47,7 +47,8 @@ export const registerCreateScriptedFieldRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const { field } = req.body; diff --git a/src/plugins/data_views/server/routes/scripted_fields/delete_scripted_field.ts b/src/plugins/data_views/server/routes/scripted_fields/delete_scripted_field.ts index bd1bfe0ec4e25..628ba9fb41aa1 100644 --- a/src/plugins/data_views/server/routes/scripted_fields/delete_scripted_field.ts +++ b/src/plugins/data_views/server/routes/scripted_fields/delete_scripted_field.ts @@ -48,7 +48,8 @@ export const registerDeleteScriptedFieldRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const name = req.params.name; diff --git a/src/plugins/data_views/server/routes/scripted_fields/get_scripted_field.ts b/src/plugins/data_views/server/routes/scripted_fields/get_scripted_field.ts index ae9cca2c79b48..82f14faaaed99 100644 --- a/src/plugins/data_views/server/routes/scripted_fields/get_scripted_field.ts +++ b/src/plugins/data_views/server/routes/scripted_fields/get_scripted_field.ts @@ -48,7 +48,8 @@ export const registerGetScriptedFieldRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const name = req.params.name; diff --git a/src/plugins/data_views/server/routes/scripted_fields/put_scripted_field.ts b/src/plugins/data_views/server/routes/scripted_fields/put_scripted_field.ts index a6cee3762513e..bd79203b1161f 100644 --- a/src/plugins/data_views/server/routes/scripted_fields/put_scripted_field.ts +++ b/src/plugins/data_views/server/routes/scripted_fields/put_scripted_field.ts @@ -47,7 +47,8 @@ export const registerPutScriptedFieldRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const { field } = req.body; diff --git a/src/plugins/data_views/server/routes/scripted_fields/update_scripted_field.ts b/src/plugins/data_views/server/routes/scripted_fields/update_scripted_field.ts index 2917838293ec8..fba7488a83a24 100644 --- a/src/plugins/data_views/server/routes/scripted_fields/update_scripted_field.ts +++ b/src/plugins/data_views/server/routes/scripted_fields/update_scripted_field.ts @@ -68,7 +68,8 @@ export const registerUpdateScriptedFieldRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; const name = req.params.name; diff --git a/src/plugins/data_views/server/routes/update_index_pattern.ts b/src/plugins/data_views/server/routes/update_index_pattern.ts index 1421057d65d26..078ef5dec5de5 100644 --- a/src/plugins/data_views/server/routes/update_index_pattern.ts +++ b/src/plugins/data_views/server/routes/update_index_pattern.ts @@ -68,7 +68,8 @@ export const registerUpdateIndexPatternRoute = ( const [, , { indexPatternsServiceFactory }] = await getStartServices(); const indexPatternsService = await indexPatternsServiceFactory( savedObjectsClient, - elasticsearchClient + elasticsearchClient, + req ); const id = req.params.id; diff --git a/src/plugins/data_views/server/types.ts b/src/plugins/data_views/server/types.ts index 4a57a1d01b9c3..a5111a535f3ef 100644 --- a/src/plugins/data_views/server/types.ts +++ b/src/plugins/data_views/server/types.ts @@ -6,7 +6,12 @@ * Side Public License, v 1. */ -import { Logger, SavedObjectsClientContract, ElasticsearchClient } from 'kibana/server'; +import { + Logger, + SavedObjectsClientContract, + ElasticsearchClient, + KibanaRequest, +} from 'kibana/server'; import { ExpressionsServerSetup } from 'src/plugins/expressions/server'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/server'; import { DataViewsService } from '../common'; @@ -14,7 +19,8 @@ import { FieldFormatsSetup, FieldFormatsStart } from '../../field_formats/server type ServiceFactory = ( savedObjectsClient: SavedObjectsClientContract, - elasticsearchClient: ElasticsearchClient + elasticsearchClient: ElasticsearchClient, + request?: KibanaRequest ) => Promise; export interface DataViewsServerPluginStart { dataViewsServiceFactory: ServiceFactory; diff --git a/src/plugins/discover/public/application/context/context_app.test.tsx b/src/plugins/discover/public/application/context/context_app.test.tsx index 7f78bb1c698ab..a31557124d49a 100644 --- a/src/plugins/discover/public/application/context/context_app.test.tsx +++ b/src/plugins/discover/public/application/context/context_app.test.tsx @@ -19,6 +19,7 @@ import { DiscoverServices } from '../../build_services'; import { indexPatternsMock } from '../../__mocks__/index_patterns'; import { act } from 'react-dom/test-utils'; import { uiSettingsMock } from '../../__mocks__/ui_settings'; +import { themeServiceMock } from '../../../../../core/public/mocks'; const mockFilterManager = createFilterManagerMock(); const mockNavigationPlugin = { ui: { TopNavMenu: mockTopNavMenu } }; @@ -60,7 +61,10 @@ describe('ContextApp test', () => { indexPatterns: indexPatternsMock, toastNotifications: { addDanger: () => {} }, navigation: mockNavigationPlugin, - core: { notifications: { toasts: [] } }, + core: { + notifications: { toasts: [] }, + theme: { theme$: themeServiceMock.createStartContract().theme$ }, + }, history: () => {}, fieldFormats: { getDefaultInstance: jest.fn(() => ({ convert: (value: unknown) => value })), diff --git a/src/plugins/discover/public/application/context/context_app_content.tsx b/src/plugins/discover/public/application/context/context_app_content.tsx index f498c6f0a244d..45bc3df77bd22 100644 --- a/src/plugins/discover/public/application/context/context_app_content.tsx +++ b/src/plugins/discover/public/application/context/context_app_content.tsx @@ -15,7 +15,7 @@ import { SortDirection } from '../../../../data/public'; import { LoadingStatus } from './services/context_query_state'; import { ActionBar } from './components/action_bar/action_bar'; import { DiscoverGrid } from '../../components/discover_grid/discover_grid'; -import { DocViewFilterFn, ElasticSearchHit } from '../../services/doc_views/doc_views_types'; +import { DocViewFilterFn } from '../../services/doc_views/doc_views_types'; import { AppState } from './services/context_state'; import { SurrDocType } from './services/context'; import { DiscoverServices } from '../../build_services'; @@ -23,6 +23,7 @@ import { MAX_CONTEXT_SIZE, MIN_CONTEXT_SIZE } from './services/constants'; import { DocTableContext } from '../../components/doc_table/doc_table_context'; import { EsHitRecordList } from '../types'; import { SortPairArr } from '../../components/doc_table/lib/get_sort'; +import { ElasticSearchHit } from '../../types'; export interface ContextAppContentProps { columns: string[]; diff --git a/src/plugins/discover/public/application/context/utils/use_context_app_fetch.test.ts b/src/plugins/discover/public/application/context/utils/use_context_app_fetch.test.ts index cd7bcd810dc39..0fc8bd99c021d 100644 --- a/src/plugins/discover/public/application/context/utils/use_context_app_fetch.test.ts +++ b/src/plugins/discover/public/application/context/utils/use_context_app_fetch.test.ts @@ -21,6 +21,7 @@ import { import { indexPatternWithTimefieldMock } from '../../../__mocks__/index_pattern_with_timefield'; import { createContextSearchSourceStub } from '../services/_stubs'; import { IndexPattern } from '../../../../../data_views/common'; +import { themeServiceMock } from '../../../../../../core/public/mocks'; const mockFilterManager = createFilterManagerMock(); @@ -60,7 +61,10 @@ const initDefaults = (tieBreakerFields: string[], indexPatternId = 'the-index-pa }, }, toastNotifications: { addDanger: dangerNotification }, - core: { notifications: { toasts: [] } }, + core: { + notifications: { toasts: [] }, + theme: { theme$: themeServiceMock.createStartContract().theme$ }, + }, history: () => {}, filterManager: mockFilterManager, uiSettings: { diff --git a/src/plugins/discover/public/application/context/utils/use_context_app_fetch.tsx b/src/plugins/discover/public/application/context/utils/use_context_app_fetch.tsx index e5ed24d475497..fc5718abb43f0 100644 --- a/src/plugins/discover/public/application/context/utils/use_context_app_fetch.tsx +++ b/src/plugins/discover/public/application/context/utils/use_context_app_fetch.tsx @@ -11,7 +11,7 @@ import { CONTEXT_TIE_BREAKER_FIELDS_SETTING } from '../../../../common'; import { DiscoverServices } from '../../../build_services'; import { fetchAnchor } from '../services/anchor'; import { fetchSurroundingDocs, SurrDocType } from '../services/context'; -import { MarkdownSimple, toMountPoint } from '../../../../../kibana_react/public'; +import { MarkdownSimple, toMountPoint, wrapWithTheme } from '../../../../../kibana_react/public'; import { IndexPattern, SortDirection } from '../../../../../data/public'; import { ContextFetchState, @@ -42,7 +42,8 @@ export function useContextAppFetch({ useNewFieldsApi, services, }: ContextAppFetchProps) { - const { uiSettings: config, data, toastNotifications, filterManager } = services; + const { uiSettings: config, data, toastNotifications, filterManager, core } = services; + const { theme$ } = core.theme; const searchSource = useMemo(() => { return data.search.searchSource.createEmpty(); @@ -70,11 +71,14 @@ export function useContextAppFetch({ toastNotifications.addDanger({ title: errorTitle, text: toMountPoint( - - {i18n.translate('discover.context.invalidTieBreakerFiledSetting', { - defaultMessage: 'Invalid tie breaker field setting', - })} - + wrapWithTheme( + + {i18n.translate('discover.context.invalidTieBreakerFiledSetting', { + defaultMessage: 'Invalid tie breaker field setting', + })} + , + theme$ + ) ), }); return; @@ -93,7 +97,7 @@ export function useContextAppFetch({ setState(createError('anchorStatus', FailureReason.UNKNOWN, error)); toastNotifications.addDanger({ title: errorTitle, - text: toMountPoint({error.message}), + text: toMountPoint(wrapWithTheme({error.message}, theme$)), }); } }, [ @@ -104,6 +108,7 @@ export function useContextAppFetch({ anchorId, searchSource, useNewFieldsApi, + theme$, ]); const fetchSurroundingRows = useCallback( @@ -135,7 +140,9 @@ export function useContextAppFetch({ setState(createError(statusKey, FailureReason.UNKNOWN, error)); toastNotifications.addDanger({ title: errorTitle, - text: toMountPoint({error.message}), + text: toMountPoint( + wrapWithTheme({error.message}, theme$) + ), }); } }, @@ -148,6 +155,7 @@ export function useContextAppFetch({ indexPattern, toastNotifications, useNewFieldsApi, + theme$, ] ); diff --git a/src/plugins/discover/public/application/index.tsx b/src/plugins/discover/public/application/index.tsx index f6c7d60ed7db8..55407835c0a4b 100644 --- a/src/plugins/discover/public/application/index.tsx +++ b/src/plugins/discover/public/application/index.tsx @@ -8,11 +8,11 @@ import { i18n } from '@kbn/i18n'; import { getServices } from '../kibana_services'; import { discoverRouter } from './discover_router'; -import { toMountPoint } from '../../../kibana_react/public'; +import { toMountPoint, wrapWithTheme } from '../../../kibana_react/public'; export const renderApp = (element: HTMLElement) => { const services = getServices(); - const { history: getHistory, capabilities, chrome, data } = services; + const { history: getHistory, capabilities, chrome, data, core } = services; const history = getHistory(); if (!capabilities.discover.save) { @@ -26,7 +26,9 @@ export const renderApp = (element: HTMLElement) => { iconType: 'glasses', }); } - const unmount = toMountPoint(discoverRouter(services, history))(element); + const unmount = toMountPoint(wrapWithTheme(discoverRouter(services, history), core.theme.theme$))( + element + ); return () => { unmount(); diff --git a/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx index 829d88bbafd08..45c064d06c51f 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_documents.test.tsx @@ -17,8 +17,8 @@ import { DataDocuments$ } from '../../utils/use_saved_search'; import { discoverServiceMock } from '../../../../__mocks__/services'; import { FetchStatus } from '../../../types'; import { DiscoverDocuments } from './discover_documents'; -import { ElasticSearchHit } from '../../../../services/doc_views/doc_views_types'; import { indexPatternMock } from '../../../../__mocks__/index_pattern'; +import { ElasticSearchHit } from 'src/plugins/discover/public/types'; jest.mock('../../../../kibana_services', () => ({ ...jest.requireActual('../../../../kibana_services'), 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 154f83796490b..ae0f5ad670ce9 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 @@ -14,7 +14,7 @@ import { EuiScreenReaderOnly, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { DocViewFilterFn, ElasticSearchHit } from '../../../../services/doc_views/doc_views_types'; +import { DocViewFilterFn } from '../../../../services/doc_views/doc_views_types'; import { DiscoverGrid } from '../../../../components/discover_grid/discover_grid'; import { FetchStatus } from '../../../types'; import { @@ -32,6 +32,7 @@ import { AppState, GetStateReturn } from '../../services/discover_state'; import { useDataState } from '../../utils/use_data_state'; import { DocTableInfinite } from '../../../../components/doc_table/doc_table_infinite'; import { SortPairArr } from '../../../../components/doc_table/lib/get_sort'; +import { ElasticSearchHit } from '../../../../types'; const DocTableInfiniteMemoized = React.memo(DocTableInfinite); const DataGridMemoized = React.memo(DiscoverGrid); @@ -54,7 +55,7 @@ function DiscoverDocumentsComponent({ onAddFilter: DocViewFilterFn; savedSearch: SavedSearch; services: DiscoverServices; - setExpandedDoc: (doc: ElasticSearchHit | undefined) => void; + setExpandedDoc: (doc?: ElasticSearchHit) => void; state: AppState; stateContainer: GetStateReturn; }) { diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx index c222e4038f517..77eeb88904100 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx @@ -28,10 +28,10 @@ import { } from '../../utils/use_saved_search'; import { discoverServiceMock } from '../../../../__mocks__/services'; import { FetchStatus } from '../../../types'; -import { ElasticSearchHit } from '../../../../services/doc_views/doc_views_types'; import { RequestAdapter } from '../../../../../../inspector'; import { Chart } from '../chart/point_series'; import { DiscoverSidebar } from '../sidebar/discover_sidebar'; +import { ElasticSearchHit } from '../../../../types'; jest.mock('../../../../kibana_services', () => ({ ...jest.requireActual('../../../../kibana_services'), @@ -150,6 +150,7 @@ function getProps(indexPattern: IndexPattern, wasSidebarClosed?: boolean): Disco services, state: { columns: [] }, stateContainer: {} as GetStateReturn, + setExpandedDoc: jest.fn(), }; } diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx index 39d8268de2d0b..4b647867cf64a 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx @@ -29,7 +29,7 @@ import { DiscoverLayoutProps } from './types'; import { SEARCH_FIELDS_FROM_SOURCE, SHOW_FIELD_STATISTICS } from '../../../../../common'; import { popularizeField } from '../../../../utils/popularize_field'; import { DiscoverTopNav } from '../top_nav/discover_topnav'; -import { DocViewFilterFn, ElasticSearchHit } from '../../../../services/doc_views/doc_views_types'; +import { DocViewFilterFn } from '../../../../services/doc_views/doc_views_types'; import { DiscoverChart } from '../chart'; import { getResultState } from '../../utils/get_result_state'; import { InspectorSession } from '../../../../../../inspector/public'; @@ -62,9 +62,11 @@ export function DiscoverLayout({ indexPattern, indexPatternList, inspectorAdapters, + expandedDoc, navigateTo, onChangeIndexPattern, onUpdateQuery, + setExpandedDoc, savedSearchRefetch$, resetSavedSearch, savedSearchData$, @@ -86,7 +88,6 @@ export function DiscoverLayout({ spaces, } = services; const { main$, charts$, totalHits$ } = savedSearchData$; - const [expandedDoc, setExpandedDoc] = useState(undefined); const [inspectorSession, setInspectorSession] = useState(undefined); const viewMode = useMemo(() => { diff --git a/src/plugins/discover/public/application/main/components/layout/types.ts b/src/plugins/discover/public/application/main/components/layout/types.ts index 1ed34978416fa..7d0f747b9bd5a 100644 --- a/src/plugins/discover/public/application/main/components/layout/types.ts +++ b/src/plugins/discover/public/application/main/components/layout/types.ts @@ -19,6 +19,7 @@ import { DataRefetch$, SavedSearchData } from '../../utils/use_saved_search'; import { DiscoverServices } from '../../../../build_services'; import { SavedSearch } from '../../../../services/saved_searches'; import { RequestAdapter } from '../../../../../../inspector'; +import { ElasticSearchHit } from '../../../../types'; export interface DiscoverLayoutProps { indexPattern: IndexPattern; @@ -28,6 +29,8 @@ export interface DiscoverLayoutProps { onChangeIndexPattern: (id: string) => void; onUpdateQuery: (payload: { dateRange: TimeRange; query?: Query }, isUpdate?: boolean) => void; resetSavedSearch: () => void; + expandedDoc?: ElasticSearchHit; + setExpandedDoc: (doc?: ElasticSearchHit) => void; savedSearch: SavedSearch; savedSearchData$: SavedSearchData; savedSearchRefetch$: DataRefetch$; diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.test.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.test.tsx index 9dd7ef19ffc07..a4d7107a7f15c 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.test.tsx +++ b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.test.tsx @@ -19,10 +19,10 @@ import { flattenHit, IndexPatternAttributes } from '../../../../../../data/commo import { SavedObject } from '../../../../../../../core/types'; import { getDefaultFieldFilter } from './lib/field_filter'; import { DiscoverSidebarComponent as DiscoverSidebar } from './discover_sidebar'; -import { ElasticSearchHit } from '../../../../services/doc_views/doc_views_types'; import { discoverServiceMock as mockDiscoverServices } from '../../../../__mocks__/services'; import { stubLogstashIndexPattern } from '../../../../../../data/common/stubs'; import { VIEW_MODE } from '../../../../components/view_mode_toggle'; +import { ElasticSearchHit } from '../../../../types'; jest.mock('../../../../kibana_services', () => ({ getServices: () => mockDiscoverServices, diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx index 3b4ff997f324e..78aee49d1b288 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx +++ b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx @@ -39,8 +39,8 @@ import { FieldFilterState, getDefaultFieldFilter, setFieldFilterProp } from './l import { getIndexPatternFieldList } from './lib/get_index_pattern_field_list'; import { DiscoverSidebarResponsiveProps } from './discover_sidebar_responsive'; import { DiscoverIndexPatternManagement } from './discover_index_pattern_management'; -import { ElasticSearchHit } from '../../../../services/doc_views/doc_views_types'; import { VIEW_MODE } from '../../../../components/view_mode_toggle'; +import { ElasticSearchHit } from '../../../../types'; /** * Default number of available fields displayed and added on scroll diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx index b412cd69c82af..c65d0b0a4ec2c 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx +++ b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx @@ -22,11 +22,11 @@ import { DiscoverSidebarResponsiveProps, } from './discover_sidebar_responsive'; import { DiscoverServices } from '../../../../build_services'; -import { ElasticSearchHit } from '../../../../services/doc_views/doc_views_types'; import { FetchStatus } from '../../../types'; import { DataDocuments$ } from '../../utils/use_saved_search'; import { stubLogstashIndexPattern } from '../../../../../../data/common/stubs'; import { VIEW_MODE } from '../../../../components/view_mode_toggle'; +import { ElasticSearchHit } from '../../../../types'; const mockServices = { history: () => ({ diff --git a/src/plugins/discover/public/application/main/components/sidebar/lib/get_details.ts b/src/plugins/discover/public/application/main/components/sidebar/lib/get_details.ts index b5beebf6fb8d4..0715c7377da7d 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/lib/get_details.ts +++ b/src/plugins/discover/public/application/main/components/sidebar/lib/get_details.ts @@ -9,7 +9,7 @@ // @ts-expect-error import { fieldCalculator } from './field_calculator'; import { IndexPattern, IndexPatternField } from '../../../../../../../data/public'; -import { ElasticSearchHit } from '../../../../../services/doc_views/doc_views_types'; +import { ElasticSearchHit } from '../../../../../types'; export function getDetails( field: IndexPatternField, diff --git a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.ts b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.ts index 4b9d48a92e0f5..6e93bc40f7d7f 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.ts +++ b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.ts @@ -52,6 +52,7 @@ export const getTopNavLinks = ({ openOptionsPopover({ I18nContext: services.core.i18n.Context, anchorElement, + theme$: services.core.theme.theme$, }), testId: 'discoverOptionsButton', }; @@ -95,6 +96,7 @@ export const getTopNavLinks = ({ showOpenSearchPanel({ onOpenSavedSearch, I18nContext: services.core.i18n.Context, + theme$: services.core.theme.theme$, }), }; diff --git a/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.tsx b/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.tsx index 0d359c865220f..ea0cd804efec0 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/open_options_popover.tsx @@ -8,7 +8,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { I18nStart } from 'kibana/public'; +import { CoreTheme, I18nStart } from 'kibana/public'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { @@ -22,8 +22,10 @@ import { EuiTextAlign, } from '@elastic/eui'; import './open_options_popover.scss'; +import { Observable } from 'rxjs'; import { DOC_TABLE_LEGACY } from '../../../../../common'; import { getServices } from '../../../../kibana_services'; +import { KibanaThemeProvider } from '../../../../../../kibana_react/public'; const container = document.createElement('div'); let isOpen = false; @@ -125,9 +127,11 @@ function onClose() { export function openOptionsPopover({ I18nContext, anchorElement, + theme$, }: { I18nContext: I18nStart['Context']; anchorElement: HTMLElement; + theme$: Observable; }) { if (isOpen) { onClose(); @@ -139,7 +143,9 @@ export function openOptionsPopover({ const element = ( - + + + ); ReactDOM.render(element, container); diff --git a/src/plugins/discover/public/application/main/components/top_nav/show_open_search_panel.tsx b/src/plugins/discover/public/application/main/components/top_nav/show_open_search_panel.tsx index 1a9bfd7e30c57..d506de357675a 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/show_open_search_panel.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/show_open_search_panel.tsx @@ -8,17 +8,21 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { I18nStart } from 'kibana/public'; +import { CoreTheme, I18nStart } from 'kibana/public'; +import { Observable } from 'rxjs'; import { OpenSearchPanel } from './open_search_panel'; +import { KibanaThemeProvider } from '../../../../../../kibana_react/public'; let isOpen = false; export function showOpenSearchPanel({ I18nContext, onOpenSavedSearch, + theme$, }: { I18nContext: I18nStart['Context']; onOpenSavedSearch: (id: string) => void; + theme$: Observable; }) { if (isOpen) { return; @@ -35,7 +39,9 @@ export function showOpenSearchPanel({ document.body.appendChild(container); const element = ( - + + + ); ReactDOM.render(element, container); diff --git a/src/plugins/discover/public/application/main/discover_main_app.tsx b/src/plugins/discover/public/application/main/discover_main_app.tsx index ea3f852a5290a..1ef6641e9bc72 100644 --- a/src/plugins/discover/public/application/main/discover_main_app.tsx +++ b/src/plugins/discover/public/application/main/discover_main_app.tsx @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import React, { useCallback, useEffect } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import { History } from 'history'; import { DiscoverLayout } from './components/layout'; import { setBreadcrumbsTitle } from '../../utils/breadcrumbs'; @@ -15,6 +15,7 @@ import { useUrl } from './utils/use_url'; import { IndexPatternAttributes, SavedObject } from '../../../../data/common'; import { DiscoverServices } from '../../build_services'; import { SavedSearch } from '../../services/saved_searches'; +import { ElasticSearchHit } from '../../types'; const DiscoverLayoutMemoized = React.memo(DiscoverLayout); @@ -40,6 +41,7 @@ export interface DiscoverMainProps { export function DiscoverMainApp(props: DiscoverMainProps) { const { savedSearch, services, history, indexPatternList } = props; const { chrome, docLinks, uiSettings: config, data } = services; + const [expandedDoc, setExpandedDoc] = useState(undefined); const navigateTo = useCallback( (path: string) => { history.push(path); @@ -65,6 +67,7 @@ export function DiscoverMainApp(props: DiscoverMainProps) { services, history, savedSearch, + setExpandedDoc, }); /** @@ -100,9 +103,11 @@ export function DiscoverMainApp(props: DiscoverMainProps) { indexPattern={indexPattern} indexPatternList={indexPatternList} inspectorAdapters={inspectorAdapters} + expandedDoc={expandedDoc} onChangeIndexPattern={onChangeIndexPattern} onUpdateQuery={onUpdateQuery} resetSavedSearch={resetCurrentSavedSearch} + setExpandedDoc={setExpandedDoc} navigateTo={navigateTo} savedSearch={savedSearch} savedSearchData$={data$} diff --git a/src/plugins/discover/public/application/main/services/discover_search_session.ts b/src/plugins/discover/public/application/main/services/discover_search_session.ts index cace655a82a0f..c864c06e4003c 100644 --- a/src/plugins/discover/public/application/main/services/discover_search_session.ts +++ b/src/plugins/discover/public/application/main/services/discover_search_session.ts @@ -31,8 +31,10 @@ export class DiscoverSearchSessionManager { * skips if `searchSessionId` matches current search session id */ readonly newSearchSessionIdFromURL$: Rx.Observable; + private readonly deps: DiscoverSearchSessionManagerDeps; - constructor(private readonly deps: DiscoverSearchSessionManagerDeps) { + constructor(deps: DiscoverSearchSessionManagerDeps) { + this.deps = deps; this.newSearchSessionIdFromURL$ = createQueryParamObservable( this.deps.history, SEARCH_SESSION_ID_QUERY_PARAM diff --git a/src/plugins/discover/public/application/main/utils/calc_field_counts.test.ts b/src/plugins/discover/public/application/main/utils/calc_field_counts.test.ts index 9d198947e06c7..28d814b871104 100644 --- a/src/plugins/discover/public/application/main/utils/calc_field_counts.test.ts +++ b/src/plugins/discover/public/application/main/utils/calc_field_counts.test.ts @@ -8,7 +8,7 @@ import { calcFieldCounts } from './calc_field_counts'; import { indexPatternMock } from '../../../__mocks__/index_pattern'; -import { ElasticSearchHit } from '../../../services/doc_views/doc_views_types'; +import { ElasticSearchHit } from '../../../types'; describe('calcFieldCounts', () => { test('returns valid field count data', async () => { diff --git a/src/plugins/discover/public/application/main/utils/calc_field_counts.ts b/src/plugins/discover/public/application/main/utils/calc_field_counts.ts index 08d1a2639fa0b..9a7f68550d840 100644 --- a/src/plugins/discover/public/application/main/utils/calc_field_counts.ts +++ b/src/plugins/discover/public/application/main/utils/calc_field_counts.ts @@ -7,7 +7,7 @@ */ import { flattenHit, IndexPattern } from '../../../../../data/common'; -import { ElasticSearchHit } from '../../../services/doc_views/doc_views_types'; +import { ElasticSearchHit } from '../../../types'; /** * This function is recording stats of the available fields, for usage in sidebar and sharing diff --git a/src/plugins/discover/public/application/main/utils/use_discover_state.test.ts b/src/plugins/discover/public/application/main/utils/use_discover_state.test.ts index 78f742b9f7c9b..bac6d085acf05 100644 --- a/src/plugins/discover/public/application/main/utils/use_discover_state.test.ts +++ b/src/plugins/discover/public/application/main/utils/use_discover_state.test.ts @@ -37,6 +37,7 @@ describe('test useDiscoverState', () => { services: discoverServiceMock, history, savedSearch: savedSearchMock, + setExpandedDoc: jest.fn(), }); }); expect(result.current.state.index).toBe(indexPatternMock.id); @@ -53,6 +54,7 @@ describe('test useDiscoverState', () => { services: discoverServiceMock, history, savedSearch: savedSearchMock, + setExpandedDoc: jest.fn(), }); }); await act(async () => { @@ -69,6 +71,7 @@ describe('test useDiscoverState', () => { services: discoverServiceMock, history, savedSearch: savedSearchMock, + setExpandedDoc: jest.fn(), }); }); diff --git a/src/plugins/discover/public/application/main/utils/use_discover_state.ts b/src/plugins/discover/public/application/main/utils/use_discover_state.ts index b70bcded4c608..a4ef9382b4995 100644 --- a/src/plugins/discover/public/application/main/utils/use_discover_state.ts +++ b/src/plugins/discover/public/application/main/utils/use_discover_state.ts @@ -24,15 +24,18 @@ import { useSearchSession } from './use_search_session'; import { FetchStatus } from '../../types'; import { getSwitchIndexPatternAppState } from './get_switch_index_pattern_app_state'; import { SortPairArr } from '../../../components/doc_table/lib/get_sort'; +import { ElasticSearchHit } from '../../../types'; export function useDiscoverState({ services, history, savedSearch, + setExpandedDoc, }: { services: DiscoverServices; savedSearch: SavedSearch; history: History; + setExpandedDoc: (doc?: ElasticSearchHit) => void; }) { const { uiSettings: config, data, filterManager, indexPatterns, storage } = services; const useNewFieldsApi = useMemo(() => !config.get(SEARCH_FIELDS_FROM_SOURCE), [config]); @@ -186,8 +189,9 @@ export function useDiscoverState({ ); stateContainer.setAppState(nextAppState); } + setExpandedDoc(undefined); }, - [config, indexPattern, indexPatterns, state.columns, state.sort, stateContainer] + [config, indexPattern, indexPatterns, setExpandedDoc, state.columns, state.sort, stateContainer] ); /** * Function triggered when the user changes the query in the search bar diff --git a/src/plugins/discover/public/application/main/utils/use_saved_search.test.ts b/src/plugins/discover/public/application/main/utils/use_saved_search.test.ts index b3ed7ab854190..2788d63fdf983 100644 --- a/src/plugins/discover/public/application/main/utils/use_saved_search.test.ts +++ b/src/plugins/discover/public/application/main/utils/use_saved_search.test.ts @@ -59,6 +59,7 @@ describe('test useSavedSearch', () => { services: discoverServiceMock, history, savedSearch: savedSearchMock, + setExpandedDoc: jest.fn(), }); }); @@ -100,6 +101,7 @@ describe('test useSavedSearch', () => { services: discoverServiceMock, history, savedSearch: savedSearchMock, + setExpandedDoc: jest.fn(), }); }); diff --git a/src/plugins/discover/public/application/main/utils/use_saved_search.ts b/src/plugins/discover/public/application/main/utils/use_saved_search.ts index bfd6f1daa4bc0..0f4b9058316a0 100644 --- a/src/plugins/discover/public/application/main/utils/use_saved_search.ts +++ b/src/plugins/discover/public/application/main/utils/use_saved_search.ts @@ -11,7 +11,6 @@ import { DiscoverServices } from '../../../build_services'; import { DiscoverSearchSessionManager } from '../services/discover_search_session'; import { ISearchSource } from '../../../../../data/common'; import { GetStateReturn } from '../services/discover_state'; -import { ElasticSearchHit } from '../../../services/doc_views/doc_views_types'; import { RequestAdapter } from '../../../../../inspector/public'; import type { AutoRefreshDoneFn } from '../../../../../data/public'; import { validateTimeRange } from './validate_time_range'; @@ -23,6 +22,7 @@ import { fetchAll } from './fetch_all'; import { useBehaviorSubject } from './use_behavior_subject'; import { sendResetMsg } from './use_saved_search_messages'; import { getFetch$ } from './get_fetch_observable'; +import { ElasticSearchHit } from '../../../types'; export interface SavedSearchData { main$: DataMain$; diff --git a/src/plugins/discover/public/application/not_found/not_found_route.tsx b/src/plugins/discover/public/application/not_found/not_found_route.tsx index 80e4e5c8057f6..7b42e85584428 100644 --- a/src/plugins/discover/public/application/not_found/not_found_route.tsx +++ b/src/plugins/discover/public/application/not_found/not_found_route.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { EuiCallOut } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { Redirect } from 'react-router-dom'; -import { toMountPoint } from '../../../../kibana_react/public'; +import { toMountPoint, wrapWithTheme } from '../../../../kibana_react/public'; import { DiscoverServices } from '../../build_services'; import { getUrlTracker } from '../../kibana_services'; @@ -39,17 +39,20 @@ export function NotFoundRoute(props: NotFoundRouteProps) { bannerId = core.overlays.banners.replace( bannerId, toMountPoint( - -

- -

-
+ wrapWithTheme( + +

+ +

+
, + core.theme.theme$ + ) ) ); @@ -59,7 +62,7 @@ export function NotFoundRoute(props: NotFoundRouteProps) { core.overlays.banners.remove(bannerId); } }, 15000); - }, [core.overlays.banners, history, urlForwarding]); + }, [core.overlays.banners, history, urlForwarding, core.theme.theme$]); return ; } diff --git a/src/plugins/discover/public/build_services.ts b/src/plugins/discover/public/build_services.ts index b86212251cb74..9cc2eb78aafbe 100644 --- a/src/plugins/discover/public/build_services.ts +++ b/src/plugins/discover/public/build_services.ts @@ -40,6 +40,10 @@ import { EmbeddableStart } from '../../embeddable/public'; import type { SpacesApi } from '../../../../x-pack/plugins/spaces/public'; +export interface HistoryLocationState { + referrer: string; +} + export interface DiscoverServices { addBasePath: (path: string) => string; capabilities: Capabilities; @@ -48,7 +52,7 @@ export interface DiscoverServices { data: DataPublicPluginStart; docLinks: DocLinksStart; embeddable: EmbeddableStart; - history: () => History; + history: () => History; theme: ChartsPluginStart['theme']; filterManager: FilterManager; fieldFormats: FieldFormatsStart; diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid.test.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid.test.tsx index 4a0e472f17455..d1a1f2dcdbe8a 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid.test.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid.test.tsx @@ -16,8 +16,8 @@ import { mountWithIntl } from '@kbn/test/jest'; import { DiscoverGrid, DiscoverGridProps } from './discover_grid'; import { uiSettingsMock } from '../../__mocks__/ui_settings'; import { DiscoverServices } from '../../build_services'; -import { ElasticSearchHit } from '../../services/doc_views/doc_views_types'; import { getDocId } from './discover_grid_document_selection'; +import { ElasticSearchHit } from '../../types'; jest.mock('../../kibana_services', () => ({ ...jest.requireActual('../../kibana_services'), 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 f0e0513c7748c..c9d2ec72bfc02 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid.tsx @@ -22,7 +22,7 @@ import { EuiIcon, } from '@elastic/eui'; import { flattenHit, IndexPattern } from '../../../../data/common'; -import { DocViewFilterFn, ElasticSearchHit } from '../../services/doc_views/doc_views_types'; +import { DocViewFilterFn } from '../../services/doc_views/doc_views_types'; import { getSchemaDetectors } from './discover_grid_schema'; import { DiscoverGridFlyout } from './discover_grid_flyout'; import { DiscoverGridContext } from './discover_grid_context'; @@ -33,7 +33,12 @@ import { getLeadControlColumns, getVisibleColumns, } from './discover_grid_columns'; -import { defaultPageSize, gridStyle, pageSizeArr, toolbarVisibility } from './constants'; +import { + defaultPageSize, + gridStyle, + pageSizeArr, + toolbarVisibility as toolbarVisibilityDefaults, +} from './constants'; import { DiscoverServices } from '../../build_services'; import { getDisplayedColumns } from '../../utils/columns'; import { @@ -44,6 +49,7 @@ import { import { DiscoverGridDocumentToolbarBtn, getDocId } from './discover_grid_document_selection'; import { SortPairArr } from '../doc_table/lib/get_sort'; import { getFieldsToShow } from '../../utils/get_fields_to_show'; +import { ElasticSearchHit } from '../../types'; interface SortObj { id: string; @@ -111,7 +117,7 @@ export interface DiscoverGridProps { /** * Function to set the expanded document, which is displayed in a flyout */ - setExpandedDoc: (doc: ElasticSearchHit | undefined) => void; + setExpandedDoc: (doc?: ElasticSearchHit) => void; /** * Grid display settings persisted in Elasticsearch (e.g. column width) */ @@ -158,6 +164,8 @@ export const EuiDataGridMemoized = React.memo((props: EuiDataGridProps) => { return ; }); +const CONTROL_COLUMN_IDS_DEFAULT = ['openDetails', 'select']; + export const DiscoverGrid = ({ ariaLabelledBy, columns, @@ -182,7 +190,7 @@ export const DiscoverGrid = ({ useNewFieldsApi, isSortEnabled = true, isPaginationEnabled = true, - controlColumnIds = ['openDetails', 'select'], + controlColumnIds = CONTROL_COLUMN_IDS_DEFAULT, className, }: DiscoverGridProps) => { const [selectedDocs, setSelectedDocs] = useState([]); @@ -345,6 +353,23 @@ export const DiscoverGrid = ({ [usedSelectedDocs, isFilterActive, rows, setIsFilterActive] ); + const toolbarVisibility = useMemo( + () => + defaultColumns + ? { + ...toolbarVisibilityDefaults, + showColumnSelector: false, + showSortSelector: isSortEnabled, + additionalControls, + } + : { + ...toolbarVisibilityDefaults, + showSortSelector: isSortEnabled, + additionalControls, + }, + [defaultColumns, additionalControls, isSortEnabled] + ); + if (!rowCount && isLoading) { return (
@@ -404,30 +429,13 @@ export const DiscoverGrid = ({ data-test-subj="docTable" gridStyle={gridStyle as EuiDataGridStyle} leadingControlColumns={lead} - onColumnResize={(col: { columnId: string; width: number }) => { - if (onResize) { - onResize(col); - } - }} + onColumnResize={onResize} pagination={paginationObj} renderCellValue={renderCellValue} rowCount={rowCount} schemaDetectors={schemaDetectors} sorting={sorting as EuiDataGridSorting} - toolbarVisibility={ - defaultColumns - ? { - ...toolbarVisibility, - showColumnSelector: false, - showSortSelector: isSortEnabled, - additionalControls, - } - : { - ...toolbarVisibility, - showSortSelector: isSortEnabled, - additionalControls, - } - } + toolbarVisibility={toolbarVisibility} /> {showDisclaimer && ( diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid_context.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid_context.tsx index 49b72ef126a76..3bf80872b0685 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid_context.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid_context.tsx @@ -8,11 +8,12 @@ import React from 'react'; import type { IndexPattern } from 'src/plugins/data/common'; -import { DocViewFilterFn, ElasticSearchHit } from '../../services/doc_views/doc_views_types'; +import { DocViewFilterFn } from '../../services/doc_views/doc_views_types'; +import { ElasticSearchHit } from '../../types'; export interface GridContext { - expanded: ElasticSearchHit | undefined; - setExpanded: (hit: ElasticSearchHit | undefined) => void; + expanded?: ElasticSearchHit; + setExpanded: (hit?: ElasticSearchHit) => void; rows: ElasticSearchHit[]; onFilter: DocViewFilterFn; indexPattern: IndexPattern; diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid_document_selection.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid_document_selection.tsx index c517d3a65b6b9..6fb614327d2af 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid_document_selection.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid_document_selection.tsx @@ -21,8 +21,8 @@ import { euiLightVars as themeLight, euiDarkVars as themeDark, } from '@kbn/ui-shared-deps-src/theme'; -import { ElasticSearchHit } from '../../services/doc_views/doc_views_types'; import { DiscoverGridContext } from './discover_grid_context'; +import { ElasticSearchHit } from '../../types'; /** * Returning a generated id of a given ES document, since `_id` can be the same diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid_flyout.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid_flyout.tsx index d5b2248162b2f..30e0cf24f7d52 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid_flyout.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid_flyout.tsx @@ -25,10 +25,11 @@ import { keys, } from '@elastic/eui'; import { DocViewer } from '../../services/doc_views/components/doc_viewer/doc_viewer'; -import { DocViewFilterFn, ElasticSearchHit } from '../../services/doc_views/doc_views_types'; +import { DocViewFilterFn } from '../../services/doc_views/doc_views_types'; import { DiscoverServices } from '../../build_services'; import { getContextUrl } from '../../utils/get_context_url'; import { getSingleDocUrl } from '../../utils/get_single_doc_url'; +import { ElasticSearchHit } from '../../types'; interface Props { columns: string[]; diff --git a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx index e97a2b2901f33..b81dda5c27915 100644 --- a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx +++ b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.test.tsx @@ -10,8 +10,8 @@ import React from 'react'; import { ReactWrapper, shallow } from 'enzyme'; import { getRenderCellValueFn } from './get_render_cell_value'; import { indexPatternMock } from '../../__mocks__/index_pattern'; -import { ElasticSearchHit } from '../../services/doc_views/doc_views_types'; import { flattenHit } from 'src/plugins/data/common'; +import { ElasticSearchHit } from '../../types'; jest.mock('../../../../kibana_react/public', () => ({ useUiSetting: () => true, diff --git a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx index 8fd5f73701932..c1673dad7eaa7 100644 --- a/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx +++ b/src/plugins/discover/public/components/discover_grid/get_render_cell_value.tsx @@ -19,13 +19,13 @@ import { EuiDescriptionListTitle, EuiDescriptionListDescription, } from '@elastic/eui'; -import { ElasticSearchHit } from '../../services/doc_views/doc_views_types'; import { DiscoverGridContext } from './discover_grid_context'; import { JsonCodeEditor } from '../json_code_editor/json_code_editor'; import { defaultMonacoEditorWidth } from './constants'; import { EsHitRecord } from '../../application/types'; import { formatFieldValue } from '../../utils/format_value'; import { formatHit } from '../../utils/format_hit'; +import { ElasticSearchHit } from '../../types'; export const getRenderCellValueFn = ( diff --git a/src/plugins/discover/public/components/doc_table/components/table_row.tsx b/src/plugins/discover/public/components/doc_table/components/table_row.tsx index 8a980cc4160d8..2eee9a177e4f8 100644 --- a/src/plugins/discover/public/components/doc_table/components/table_row.tsx +++ b/src/plugins/discover/public/components/doc_table/components/table_row.tsx @@ -15,11 +15,12 @@ import { flattenHit } from '../../../../../data/common'; import { DocViewer } from '../../../services/doc_views/components/doc_viewer/doc_viewer'; import { FilterManager, IndexPattern } from '../../../../../data/public'; import { TableCell } from './table_row/table_cell'; -import { ElasticSearchHit, DocViewFilterFn } from '../../../services/doc_views/doc_views_types'; +import { DocViewFilterFn } from '../../../services/doc_views/doc_views_types'; import { getContextUrl } from '../../../utils/get_context_url'; import { getSingleDocUrl } from '../../../utils/get_single_doc_url'; import { TableRowDetails } from './table_row_details'; import { formatRow, formatTopLevelObject } from '../lib/row_formatter'; +import { ElasticSearchHit } from '../../../types'; export type DocTableRow = ElasticSearchHit & { isAnchor?: boolean; diff --git a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx index 7146f84e194e2..6d7e515e33fa4 100644 --- a/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx +++ b/src/plugins/discover/public/embeddable/saved_search_embeddable.tsx @@ -26,7 +26,6 @@ import { Query, TimeRange, } from '../../../data/common'; -import { ElasticSearchHit } from '../services/doc_views/doc_views_types'; import { SavedSearchEmbeddableComponent } from './saved_search_embeddable_component'; import { UiActionsStart } from '../../../ui_actions/public'; import { getServices } from '../kibana_services'; @@ -48,6 +47,8 @@ import { SortOrder } from '../components/doc_table/components/table_header/helpe import { VIEW_MODE } from '../components/view_mode_toggle'; import { updateSearchSource } from './utils/update_search_source'; import { FieldStatsTableSavedSearchEmbeddable } from '../application/main/components/field_stats_table'; +import { ElasticSearchHit } from '../types'; +import { KibanaThemeProvider } from '../../../kibana_react/public'; export type SearchProps = Partial & Partial & { @@ -391,15 +392,17 @@ export class SavedSearchEmbeddable Array.isArray(searchProps.columns) ) { ReactDOM.render( - , + + + , domNode ); return; @@ -410,7 +413,14 @@ export class SavedSearchEmbeddable useLegacyTable, refs: domNode, }; - ReactDOM.render(, domNode); + if (searchProps.services) { + ReactDOM.render( + + + , + domNode + ); + } } public reload() { diff --git a/src/plugins/discover/public/embeddable/saved_search_grid.tsx b/src/plugins/discover/public/embeddable/saved_search_grid.tsx index a28e509d3ba72..aa15ccb79da8b 100644 --- a/src/plugins/discover/public/embeddable/saved_search_grid.tsx +++ b/src/plugins/discover/public/embeddable/saved_search_grid.tsx @@ -10,8 +10,8 @@ import { I18nProvider } from '@kbn/i18n-react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { DiscoverGrid, DiscoverGridProps } from '../components/discover_grid/discover_grid'; import { getServices } from '../kibana_services'; -import { ElasticSearchHit } from '../services/doc_views/doc_views_types'; import { TotalDocuments } from '../application/main/components/total_documents/total_documents'; +import { ElasticSearchHit } from '../types'; export interface DiscoverGridEmbeddableProps extends DiscoverGridProps { totalHitCount: number; diff --git a/src/plugins/discover/public/kibana_services.ts b/src/plugins/discover/public/kibana_services.ts index 12b0a77a7865d..ffdfd82058693 100644 --- a/src/plugins/discover/public/kibana_services.ts +++ b/src/plugins/discover/public/kibana_services.ts @@ -10,7 +10,7 @@ import { once } from 'lodash'; import { createHashHistory } from 'history'; import type { ScopedHistory, AppMountParameters } from 'kibana/public'; import type { UiActionsStart } from 'src/plugins/ui_actions/public'; -import { DiscoverServices } from './build_services'; +import { DiscoverServices, HistoryLocationState } from './build_services'; import { createGetterSetter } from '../../kibana_utils/public'; import { DocViewsRegistry } from './services/doc_views/doc_views_registry'; @@ -46,7 +46,7 @@ export const [getDocViewsRegistry, setDocViewsRegistry] = * Makes sure discover and context are using one instance of history. */ export const getHistory = once(() => { - const history = createHashHistory(); + const history = createHashHistory(); history.listen(() => { // keep at least one listener so that `history.location` always in sync }); diff --git a/src/plugins/discover/public/services/doc_views/components/doc_viewer/doc_viewer_tab.test.tsx b/src/plugins/discover/public/services/doc_views/components/doc_viewer/doc_viewer_tab.test.tsx index 3537699e4fe20..8eab6b1e12c8c 100644 --- a/src/plugins/discover/public/services/doc_views/components/doc_viewer/doc_viewer_tab.test.tsx +++ b/src/plugins/discover/public/services/doc_views/components/doc_viewer/doc_viewer_tab.test.tsx @@ -9,8 +9,8 @@ import React from 'react'; import { shallow } from 'enzyme'; import { DocViewerTab } from './doc_viewer_tab'; -import { ElasticSearchHit } from '../../doc_views_types'; import { indexPatternMock } from '../../../../__mocks__/index_pattern'; +import { ElasticSearchHit } from 'src/plugins/discover/public/types'; describe('DocViewerTab', () => { test('changing columns triggers an update', () => { diff --git a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.test.tsx b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.test.tsx index 5133ca46015a0..c956b36b62594 100644 --- a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.test.tsx +++ b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.test.tsx @@ -11,13 +11,13 @@ import { mountWithIntl } from '@kbn/test/jest'; import { findTestSubject } from '@elastic/eui/lib/test'; import { DocViewerTable, DocViewerTableProps } from './table'; import { IndexPattern } from '../../../../../../data/public'; -import { ElasticSearchHit } from '../../doc_views_types'; jest.mock('../../../../kibana_services', () => ({ getServices: jest.fn(), })); import { getServices } from '../../../../kibana_services'; +import { ElasticSearchHit } from '../../../../types'; (getServices as jest.Mock).mockImplementation(() => ({ uiSettings: { diff --git a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx index 707a98d87c924..433227133370e 100644 --- a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx +++ b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table.tsx @@ -13,12 +13,13 @@ import { IndexPattern, IndexPatternField } from '../../../../../../data/public'; import { flattenHit } from '../../../../../../data/common'; import { SHOW_MULTIFIELDS } from '../../../../../common'; import { getServices } from '../../../../kibana_services'; -import { DocViewFilterFn, ElasticSearchHit, DocViewRenderProps } from '../../doc_views_types'; +import { DocViewFilterFn, DocViewRenderProps } from '../../doc_views_types'; import { ACTIONS_COLUMN, MAIN_COLUMNS } from './table_columns'; import { getFieldsToShow } from '../../../../utils/get_fields_to_show'; import { getIgnoredReason, IgnoredReason } from '../../../../utils/get_ignored_reason'; import { formatFieldValue } from '../../../../utils/format_value'; import { isNestedFieldParent } from '../../../../application/main/utils/nested_fields'; +import { ElasticSearchHit } from '../../../../types'; export interface DocViewerTableProps { columns?: string[]; diff --git a/src/plugins/discover/public/services/doc_views/doc_views_registry.ts b/src/plugins/discover/public/services/doc_views/doc_views_registry.ts index 26b5016881b85..8ee8741d73d3f 100644 --- a/src/plugins/discover/public/services/doc_views/doc_views_registry.ts +++ b/src/plugins/discover/public/services/doc_views/doc_views_registry.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -import { DocView, DocViewInput, ElasticSearchHit, DocViewInputFn } from './doc_views_types'; +import { ElasticSearchHit } from '../../types'; +import { DocView, DocViewInput, DocViewInputFn } from './doc_views_types'; export class DocViewsRegistry { private docViews: DocView[] = []; diff --git a/src/plugins/discover/public/services/doc_views/doc_views_types.ts b/src/plugins/discover/public/services/doc_views/doc_views_types.ts index e8faa51bbab40..ef2600b4d04df 100644 --- a/src/plugins/discover/public/services/doc_views/doc_views_types.ts +++ b/src/plugins/discover/public/services/doc_views/doc_views_types.ts @@ -7,11 +7,8 @@ */ import { ComponentType } from 'react'; - -import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { IndexPattern } from '../../../../data/public'; - -export type ElasticSearchHit = estypes.SearchHit; +import { ElasticSearchHit } from '../../types'; export interface FieldMapping { filterable?: boolean; diff --git a/src/plugins/discover/public/types.ts b/src/plugins/discover/public/types.ts new file mode 100644 index 0000000000000..f6872e9951c37 --- /dev/null +++ b/src/plugins/discover/public/types.ts @@ -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 type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + +export type ElasticSearchHit = estypes.SearchHit; diff --git a/src/plugins/discover/public/utils/get_sharing_data.ts b/src/plugins/discover/public/utils/get_sharing_data.ts index a8e210c980810..b4006a691afca 100644 --- a/src/plugins/discover/public/utils/get_sharing_data.ts +++ b/src/plugins/discover/public/utils/get_sharing_data.ts @@ -9,7 +9,7 @@ import type { Capabilities } from 'kibana/public'; import type { IUiSettingsClient } from 'kibana/public'; import type { DataPublicPluginStart } from 'src/plugins/data/public'; -import type { ISearchSource, SearchSourceFields } from 'src/plugins/data/common'; +import type { Filter, ISearchSource, SearchSourceFields } from 'src/plugins/data/common'; import { DOC_HIDE_TIME_COLUMN_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../common'; import type { SavedSearch, SortOrder } from '../services/saved_searches'; import { getSortForSearchSource } from '../components/doc_table'; @@ -26,6 +26,7 @@ export async function getSharingData( const { uiSettings: config, data } = services; const searchSource = currentSearchSource.createCopy(); const index = searchSource.getField('index')!; + const existingFilter = searchSource.getField('filter'); searchSource.setField( 'sort', @@ -55,11 +56,21 @@ export async function getSharingData( return { getSearchSource: (absoluteTime?: boolean): SearchSourceFields => { - const filter = absoluteTime + const timeFilter = absoluteTime ? data.query.timefilter.timefilter.createFilter(index) : data.query.timefilter.timefilter.createRelativeFilter(index); - searchSource.setField('filter', filter); + if (existingFilter && timeFilter) { + searchSource.setField( + 'filter', + Array.isArray(existingFilter) + ? [timeFilter, ...existingFilter] + : ([timeFilter, existingFilter] as Filter[]) + ); + } else { + const filter = timeFilter || existingFilter; + searchSource.setField('filter', filter); + } return searchSource.getSerializedFields(true); }, diff --git a/src/plugins/discover/public/utils/use_es_doc_search.ts b/src/plugins/discover/public/utils/use_es_doc_search.ts index 10c97c53b3fb3..c8b870b1a1dae 100644 --- a/src/plugins/discover/public/utils/use_es_doc_search.ts +++ b/src/plugins/discover/public/utils/use_es_doc_search.ts @@ -11,9 +11,9 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { IndexPattern } from '../../../data/common'; import { DocProps } from '../application/doc/components/doc'; import { ElasticRequestState } from '../application/doc/types'; -import { ElasticSearchHit } from '../services/doc_views/doc_views_types'; import { getServices } from '../kibana_services'; import { SEARCH_FIELDS_FROM_SOURCE } from '../../common'; +import { ElasticSearchHit } from '../types'; type RequestBody = Pick; diff --git a/src/plugins/embeddable/public/lib/attribute_service/attribute_service.mock.tsx b/src/plugins/embeddable/public/lib/attribute_service/attribute_service.mock.tsx index 8229b84d15b54..859e9be9d29dd 100644 --- a/src/plugins/embeddable/public/lib/attribute_service/attribute_service.mock.tsx +++ b/src/plugins/embeddable/public/lib/attribute_service/attribute_service.mock.tsx @@ -17,14 +17,15 @@ export const mockAttributeService = < V extends EmbeddableInput & { [ATTRIBUTE_SERVICE_KEY]: A } = EmbeddableInput & { [ATTRIBUTE_SERVICE_KEY]: A; }, - R extends SavedObjectEmbeddableInput = SavedObjectEmbeddableInput + R extends SavedObjectEmbeddableInput = SavedObjectEmbeddableInput, + M extends unknown = unknown >( type: string, - options: AttributeServiceOptions, + options: AttributeServiceOptions, customCore?: jest.Mocked -): AttributeService => { +): AttributeService => { const core = customCore ? customCore : coreMock.createStart(); - return new AttributeService( + return new AttributeService( type, jest.fn(), core.i18n.Context, diff --git a/src/plugins/embeddable/public/lib/attribute_service/attribute_service.test.ts b/src/plugins/embeddable/public/lib/attribute_service/attribute_service.test.ts index ccca51b13f9ef..8b954b7271e41 100644 --- a/src/plugins/embeddable/public/lib/attribute_service/attribute_service.test.ts +++ b/src/plugins/embeddable/public/lib/attribute_service/attribute_service.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { ATTRIBUTE_SERVICE_KEY } from './attribute_service'; +import { ATTRIBUTE_SERVICE_KEY, AttributeServiceUnwrapResult } from './attribute_service'; import { mockAttributeService } from './attribute_service.mock'; import { coreMock } from '../../../../../core/public/mocks'; import { OnSaveProps } from 'src/plugins/saved_objects/public/save_modal'; @@ -35,7 +35,10 @@ describe('attributeService', () => { return { id: '123' }; }); }; - const defaultUnwrapMethod = (savedObjectId: string): Promise => { + + const defaultUnwrapMethod = ( + savedObjectId: string + ): Promise> => { return new Promise(() => { return { ...attributes }; }); @@ -104,12 +107,14 @@ describe('attributeService', () => { saveMethod: defaultSaveMethod, checkForDuplicateTitle: jest.fn(), }); - expect(await attributeService.unwrapAttributes(byReferenceInput)).toEqual(byReferenceInput); + expect(await attributeService.unwrapAttributes(byReferenceInput)).toEqual({ + attributes: byReferenceInput, + }); }); it('returns attributes when when given value type input', async () => { const attributeService = mockAttributeService(defaultTestType, options); - expect(await attributeService.unwrapAttributes(byValueInput)).toEqual(attributes); + expect(await attributeService.unwrapAttributes(byValueInput)).toEqual({ attributes }); }); it('runs attributes through a custom unwrap method', async () => { @@ -118,16 +123,20 @@ describe('attributeService', () => { unwrapMethod: (savedObjectId) => { return new Promise((resolve) => { return resolve({ - ...attributes, - testAttr2: { array: [1, 2, 3, 4, 5], testAttr3: 'kibanana' }, + attributes: { + ...attributes, + testAttr2: { array: [1, 2, 3, 4, 5], testAttr3: 'kibanana' }, + }, }); }); }, checkForDuplicateTitle: jest.fn(), }); expect(await attributeService.unwrapAttributes(byReferenceInput)).toEqual({ - ...attributes, - testAttr2: { array: [1, 2, 3, 4, 5], testAttr3: 'kibanana' }, + attributes: { + ...attributes, + testAttr2: { array: [1, 2, 3, 4, 5], testAttr3: 'kibanana' }, + }, }); }); }); diff --git a/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx b/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx index 9eb743a3911c2..9a575a9446a01 100644 --- a/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx +++ b/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx @@ -29,13 +29,28 @@ import { */ export const ATTRIBUTE_SERVICE_KEY = 'attributes'; -export interface AttributeServiceOptions { +export interface GenericAttributes { + title: string; +} +export interface AttributeServiceUnwrapResult< + SavedObjectAttributes extends GenericAttributes, + MetaInfo extends unknown = unknown +> { + attributes: SavedObjectAttributes; + metaInfo?: MetaInfo; +} +export interface AttributeServiceOptions< + SavedObjectAttributes extends GenericAttributes, + MetaInfo extends unknown = unknown +> { saveMethod: ( - attributes: A, + attributes: SavedObjectAttributes, savedObjectId?: string ) => Promise<{ id?: string } | { error: Error }>; checkForDuplicateTitle: (props: OnSaveProps) => Promise; - unwrapMethod?: (savedObjectId: string) => Promise; + unwrapMethod?: ( + savedObjectId: string + ) => Promise>; } export class AttributeService< @@ -43,7 +58,8 @@ export class AttributeService< ValType extends EmbeddableInput & { [ATTRIBUTE_SERVICE_KEY]: SavedObjectAttributes; } = EmbeddableInput & { [ATTRIBUTE_SERVICE_KEY]: SavedObjectAttributes }, - RefType extends SavedObjectEmbeddableInput = SavedObjectEmbeddableInput + RefType extends SavedObjectEmbeddableInput = SavedObjectEmbeddableInput, + MetaInfo extends unknown = unknown > { constructor( private type: string, @@ -53,7 +69,7 @@ export class AttributeService< ) => void, private i18nContext: I18nStart['Context'], private toasts: NotificationsStart['toasts'], - private options: AttributeServiceOptions, + private options: AttributeServiceOptions, getEmbeddableFactory?: (embeddableFactoryId: string) => EmbeddableFactory ) { if (getEmbeddableFactory) { @@ -64,20 +80,21 @@ export class AttributeService< } } - private async defaultUnwrapMethod(input: RefType): Promise { - return new Promise((resolve) => { - // @ts-ignore - return resolve({ ...input }); - }); + private async defaultUnwrapMethod( + input: RefType + ): Promise> { + return Promise.resolve({ attributes: { ...(input as unknown as SavedObjectAttributes) } }); } - public async unwrapAttributes(input: RefType | ValType): Promise { + public async unwrapAttributes( + input: RefType | ValType + ): Promise> { if (this.inputIsRefType(input)) { return this.options.unwrapMethod ? await this.options.unwrapMethod(input.savedObjectId) : await this.defaultUnwrapMethod(input); } - return input[ATTRIBUTE_SERVICE_KEY]; + return { attributes: (input as ValType)[ATTRIBUTE_SERVICE_KEY] }; } public async wrapAttributes( @@ -124,14 +141,14 @@ export class AttributeService< getInputAsValueType = async (input: ValType | RefType): Promise => { if (!this.inputIsRefType(input)) { - return input; + return input as ValType; } - const attributes = await this.unwrapAttributes(input); + const { attributes } = await this.unwrapAttributes(input); + const { savedObjectId, ...originalInputToPropagate } = input; return { - ...input, - savedObjectId: undefined, + ...originalInputToPropagate, attributes, - }; + } as unknown as ValType; }; getInputAsRefType = async ( @@ -145,7 +162,7 @@ export class AttributeService< const onSave = async (props: OnSaveProps): Promise => { await this.options.checkForDuplicateTitle(props); try { - const newAttributes = { ...input[ATTRIBUTE_SERVICE_KEY] }; + const newAttributes = { ...(input as ValType)[ATTRIBUTE_SERVICE_KEY] }; newAttributes.title = props.newTitle; const wrappedInput = (await this.wrapAttributes(newAttributes, true)) as RefType; @@ -165,7 +182,11 @@ export class AttributeService< reject()} - title={get(saveOptions, 'saveModalTitle', input[ATTRIBUTE_SERVICE_KEY].title)} + title={get( + saveOptions, + 'saveModalTitle', + (input as ValType)[ATTRIBUTE_SERVICE_KEY].title + )} showCopyOnSave={false} objectType={this.type} showDescription={false} diff --git a/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.ts b/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.ts index 26d366bb8dabe..fe471ef853b23 100644 --- a/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.ts +++ b/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.ts @@ -29,15 +29,17 @@ export const EMBEDDABLE_STATE_TRANSFER_STORAGE_KEY = 'EMBEDDABLE_STATE_TRANSFER' export class EmbeddableStateTransfer { public isTransferInProgress: boolean; private storage: Storage; + private appList: ReadonlyMap | undefined; constructor( private navigateToApp: ApplicationStart['navigateToApp'], currentAppId$: ApplicationStart['currentAppId$'], - private appList?: ReadonlyMap | undefined, + appList?: ReadonlyMap | undefined, customStorage?: Storage ) { this.storage = customStorage ? customStorage : new Storage(sessionStorage); this.isTransferInProgress = false; + this.appList = appList; currentAppId$.subscribe(() => { this.isTransferInProgress = false; }); diff --git a/src/plugins/embeddable/public/plugin.tsx b/src/plugins/embeddable/public/plugin.tsx index 9043514fad317..465c5d741d5a9 100644 --- a/src/plugins/embeddable/public/plugin.tsx +++ b/src/plugins/embeddable/public/plugin.tsx @@ -91,11 +91,12 @@ export interface EmbeddableStart extends PersistableStateService( type: string, - options: AttributeServiceOptions - ) => AttributeService; + options: AttributeServiceOptions + ) => AttributeService; } export type EmbeddablePanelHOC = React.FC<{ diff --git a/src/plugins/expression_error/public/expression_renderers/__stories__/error_renderer.stories.tsx b/src/plugins/expression_error/public/expression_renderers/__stories__/error_renderer.stories.tsx index 9081a8512c11a..378e22f834e1d 100644 --- a/src/plugins/expression_error/public/expression_renderers/__stories__/error_renderer.stories.tsx +++ b/src/plugins/expression_error/public/expression_renderers/__stories__/error_renderer.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; -import { errorRenderer } from '../error_renderer'; +import { getErrorRenderer } from '../error_renderer'; import { Render } from '../../../../presentation_util/public/__stories__'; storiesOf('renderers/error', module).add('default', () => { @@ -16,5 +16,5 @@ storiesOf('renderers/error', module).add('default', () => { const config = { error: thrownError, }; - return ; + return ; }); diff --git a/src/plugins/expression_error/public/expression_renderers/debug_renderer.tsx b/src/plugins/expression_error/public/expression_renderers/debug_renderer.tsx index e3cf86b67148f..d4c74a9c646e7 100644 --- a/src/plugins/expression_error/public/expression_renderers/debug_renderer.tsx +++ b/src/plugins/expression_error/public/expression_renderers/debug_renderer.tsx @@ -8,9 +8,13 @@ import { render, unmountComponentAtNode } from 'react-dom'; import React from 'react'; +import { Observable } from 'rxjs'; +import { CoreTheme } from 'kibana/public'; import { ExpressionRenderDefinition } from 'src/plugins/expressions/common'; import { i18n } from '@kbn/i18n'; -import { withSuspense } from '../../../../../src/plugins/presentation_util/public'; +import { CoreSetup } from '../../../../core/public'; +import { KibanaThemeProvider } from '../../../kibana_react/public'; +import { withSuspense, defaultTheme$ } from '../../../../../src/plugins/presentation_util/public'; import { LazyDebugRenderComponent } from '../components'; import { JSON } from '../../common'; @@ -30,13 +34,22 @@ const strings = { }), }; -export const debugRenderer = (): ExpressionRenderDefinition => ({ - name: 'debug', - displayName: strings.getDisplayName(), - help: strings.getHelpDescription(), - reuseDomNode: true, - render(domNode, config, handlers) { - handlers.onDestroy(() => unmountComponentAtNode(domNode)); - render(, domNode); - }, -}); +export const getDebugRenderer = + (theme$: Observable = defaultTheme$) => + (): ExpressionRenderDefinition => ({ + name: 'debug', + displayName: strings.getDisplayName(), + help: strings.getHelpDescription(), + reuseDomNode: true, + render(domNode, config, handlers) { + handlers.onDestroy(() => unmountComponentAtNode(domNode)); + render( + + + , + domNode + ); + }, + }); + +export const debugRendererFactory = (core: CoreSetup) => getDebugRenderer(core.theme.theme$); diff --git a/src/plugins/expression_error/public/expression_renderers/error_renderer.tsx b/src/plugins/expression_error/public/expression_renderers/error_renderer.tsx index f0fbed22f38a0..65847a18d4e0a 100644 --- a/src/plugins/expression_error/public/expression_renderers/error_renderer.tsx +++ b/src/plugins/expression_error/public/expression_renderers/error_renderer.tsx @@ -5,12 +5,17 @@ * 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, unmountComponentAtNode } from 'react-dom'; +import { Observable } from 'rxjs'; +import { CoreTheme } from 'kibana/public'; import { I18nProvider } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { ExpressionRenderDefinition, IInterpreterRenderHandlers } from 'src/plugins/expressions'; -import { withSuspense } from '../../../presentation_util/public'; +import { CoreSetup } from '../../../../core/public'; +import { KibanaThemeProvider } from '../../../kibana_react/public'; +import { withSuspense, defaultTheme$ } from '../../../presentation_util/public'; import { ErrorRendererConfig } from '../../common/types'; import { LazyErrorRenderComponent } from '../components'; @@ -27,25 +32,31 @@ const errorStrings = { const ErrorComponent = withSuspense(LazyErrorRenderComponent); -export const errorRenderer = (): ExpressionRenderDefinition => ({ - name: 'error', - displayName: errorStrings.getDisplayName(), - help: errorStrings.getHelpDescription(), - reuseDomNode: true, - render: async ( - domNode: HTMLElement, - config: ErrorRendererConfig, - handlers: IInterpreterRenderHandlers - ) => { - handlers.onDestroy(() => { - unmountComponentAtNode(domNode); - }); +export const getErrorRenderer = + (theme$: Observable = defaultTheme$) => + (): ExpressionRenderDefinition => ({ + name: 'error', + displayName: errorStrings.getDisplayName(), + help: errorStrings.getHelpDescription(), + reuseDomNode: true, + render: async ( + domNode: HTMLElement, + config: ErrorRendererConfig, + handlers: IInterpreterRenderHandlers + ) => { + handlers.onDestroy(() => { + unmountComponentAtNode(domNode); + }); + + render( + + + + + , + domNode + ); + }, + }); - render( - - - , - domNode - ); - }, -}); +export const errorRendererFactory = (core: CoreSetup) => getErrorRenderer(core.theme.theme$); diff --git a/src/plugins/expression_error/public/expression_renderers/index.ts b/src/plugins/expression_error/public/expression_renderers/index.ts index 237ee5644cdc0..295e30fc1bffd 100644 --- a/src/plugins/expression_error/public/expression_renderers/index.ts +++ b/src/plugins/expression_error/public/expression_renderers/index.ts @@ -6,9 +6,5 @@ * Side Public License, v 1. */ -import { errorRenderer } from './error_renderer'; -import { debugRenderer } from './debug_renderer'; - -export const renderers = [errorRenderer, debugRenderer]; - -export { errorRenderer, debugRenderer }; +export { getErrorRenderer, errorRendererFactory } from './error_renderer'; +export { getDebugRenderer, debugRendererFactory } from './debug_renderer'; diff --git a/src/plugins/expression_error/public/index.ts b/src/plugins/expression_error/public/index.ts index be34980045395..acc5133f5b7d1 100755 --- a/src/plugins/expression_error/public/index.ts +++ b/src/plugins/expression_error/public/index.ts @@ -6,9 +6,6 @@ * Side Public License, v 1. */ -// TODO: https://github.com/elastic/kibana/issues/110893 -/* eslint-disable @kbn/eslint/no_export_all */ - import { ExpressionErrorPlugin } from './plugin'; export type { ExpressionErrorPluginSetup, ExpressionErrorPluginStart } from './plugin'; @@ -17,5 +14,11 @@ export function plugin() { return new ExpressionErrorPlugin(); } -export * from './expression_renderers'; +export { + getErrorRenderer, + getDebugRenderer, + errorRendererFactory, + debugRendererFactory, +} from './expression_renderers'; + export { LazyDebugComponent, LazyErrorComponent } from './components'; diff --git a/src/plugins/expression_error/public/plugin.ts b/src/plugins/expression_error/public/plugin.ts index 0b82ccf5d2dba..de3793b6a30ae 100755 --- a/src/plugins/expression_error/public/plugin.ts +++ b/src/plugins/expression_error/public/plugin.ts @@ -8,7 +8,7 @@ import { CoreSetup, CoreStart, Plugin } from '../../../core/public'; import { ExpressionsStart, ExpressionsSetup } from '../../expressions/public'; -import { errorRenderer, debugRenderer } from './expression_renderers'; +import { debugRendererFactory, errorRendererFactory } from './expression_renderers'; interface SetupDeps { expressions: ExpressionsSetup; @@ -25,8 +25,8 @@ export class ExpressionErrorPlugin implements Plugin { public setup(core: CoreSetup, { expressions }: SetupDeps): ExpressionErrorPluginSetup { - expressions.registerRenderer(errorRenderer); - expressions.registerRenderer(debugRenderer); + expressions.registerRenderer(errorRendererFactory(core)); + expressions.registerRenderer(debugRendererFactory(core)); } public start(core: CoreStart): ExpressionErrorPluginStart {} diff --git a/src/plugins/expression_metric/kibana.json b/src/plugins/expression_metric/kibana.json index 2aaef04e3bec3..3d844fa4de9fc 100755 --- a/src/plugins/expression_metric/kibana.json +++ b/src/plugins/expression_metric/kibana.json @@ -10,5 +10,6 @@ "server": true, "ui": true, "requiredPlugins": ["expressions", "presentationUtil"], - "optionalPlugins": [] + "optionalPlugins": [], + "requiredBundles": ["kibanaReact"] } diff --git a/src/plugins/expression_metric/public/expression_renderers/__stories__/metric_renderer.stories.tsx b/src/plugins/expression_metric/public/expression_renderers/__stories__/metric_renderer.stories.tsx index 0e04c32f52ba2..5835730e35f9b 100644 --- a/src/plugins/expression_metric/public/expression_renderers/__stories__/metric_renderer.stories.tsx +++ b/src/plugins/expression_metric/public/expression_renderers/__stories__/metric_renderer.stories.tsx @@ -9,7 +9,7 @@ import React, { CSSProperties } from 'react'; import { storiesOf } from '@storybook/react'; import { Style } from 'src/plugins/expressions'; -import { metricRenderer } from '../metric_renderer'; +import { getMetricRenderer } from '../metric_renderer'; import { Render } from '../../../../presentation_util/public/__stories__'; import { MetricRendererConfig } from '../../../common'; @@ -45,7 +45,7 @@ storiesOf('renderers/Metric', module) label: '', metricFormat: '', }; - return ; + return ; }) .add('with number metric', () => { const config: MetricRendererConfig = { @@ -55,7 +55,7 @@ storiesOf('renderers/Metric', module) label: '', metricFormat: '', }; - return ; + return ; }) .add('with string metric', () => { const config: MetricRendererConfig = { @@ -65,7 +65,7 @@ storiesOf('renderers/Metric', module) label: '', metricFormat: '', }; - return ; + return ; }) .add('with label', () => { const config: MetricRendererConfig = { @@ -75,7 +75,7 @@ storiesOf('renderers/Metric', module) label: 'Average price', metricFormat: '', }; - return ; + return ; }) .add('with number metric and a specified format', () => { const config: MetricRendererConfig = { @@ -85,7 +85,7 @@ storiesOf('renderers/Metric', module) label: 'Average price', metricFormat: '0.00%', }; - return ; + return ; }) .add('with formatted string metric and a specified format', () => { const config: MetricRendererConfig = { @@ -95,7 +95,7 @@ storiesOf('renderers/Metric', module) label: 'Total Revenue', metricFormat: '$0a', }; - return ; + return ; }) .add('with invalid metricFont', () => { const config: MetricRendererConfig = { @@ -105,5 +105,5 @@ storiesOf('renderers/Metric', module) label: 'Total Revenue', metricFormat: '$0a', }; - return ; + return ; }); diff --git a/src/plugins/expression_metric/public/expression_renderers/index.ts b/src/plugins/expression_metric/public/expression_renderers/index.ts index b77e0bb76f1fd..c8d6fa08147ea 100644 --- a/src/plugins/expression_metric/public/expression_renderers/index.ts +++ b/src/plugins/expression_metric/public/expression_renderers/index.ts @@ -6,8 +6,4 @@ * Side Public License, v 1. */ -import { metricRenderer } from './metric_renderer'; - -export const renderers = [metricRenderer]; - -export { metricRenderer }; +export { metricRendererFactory, getMetricRenderer } from './metric_renderer'; diff --git a/src/plugins/expression_metric/public/expression_renderers/metric_renderer.tsx b/src/plugins/expression_metric/public/expression_renderers/metric_renderer.tsx index 02c910640edeb..6a11910d4f26f 100644 --- a/src/plugins/expression_metric/public/expression_renderers/metric_renderer.tsx +++ b/src/plugins/expression_metric/public/expression_renderers/metric_renderer.tsx @@ -6,10 +6,14 @@ * Side Public License, v 1. */ import React, { CSSProperties, lazy } from 'react'; +import { Observable } from 'rxjs'; +import { CoreTheme } from 'kibana/public'; import { render, unmountComponentAtNode } from 'react-dom'; import { ExpressionRenderDefinition, IInterpreterRenderHandlers } from 'src/plugins/expressions'; import { i18n } from '@kbn/i18n'; -import { withSuspense } from '../../../presentation_util/public'; +import { CoreSetup } from '../../../../core/public'; +import { KibanaThemeProvider } from '../../../kibana_react/public'; +import { withSuspense, defaultTheme$ } from '../../../presentation_util/public'; import { MetricRendererConfig } from '../../common/types'; const strings = { @@ -26,30 +30,36 @@ const strings = { const LazyMetricComponent = lazy(() => import('../components/metric_component')); const MetricComponent = withSuspense(LazyMetricComponent); -export const metricRenderer = (): ExpressionRenderDefinition => ({ - name: 'metric', - displayName: strings.getDisplayName(), - help: strings.getHelpDescription(), - reuseDomNode: true, - render: async ( - domNode: HTMLElement, - config: MetricRendererConfig, - handlers: IInterpreterRenderHandlers - ) => { - handlers.onDestroy(() => { - unmountComponentAtNode(domNode); - }); +export const getMetricRenderer = + (theme$: Observable = defaultTheme$) => + (): ExpressionRenderDefinition => ({ + name: 'metric', + displayName: strings.getDisplayName(), + help: strings.getHelpDescription(), + reuseDomNode: true, + render: async ( + domNode: HTMLElement, + config: MetricRendererConfig, + handlers: IInterpreterRenderHandlers + ) => { + handlers.onDestroy(() => { + unmountComponentAtNode(domNode); + }); - render( - , - domNode, - () => handlers.done() - ); - }, -}); + render( + + + , + domNode, + () => handlers.done() + ); + }, + }); + +export const metricRendererFactory = (core: CoreSetup) => getMetricRenderer(core.theme.theme$); diff --git a/src/plugins/expression_metric/public/index.ts b/src/plugins/expression_metric/public/index.ts index 87499f279524d..8a23c2319a3c2 100755 --- a/src/plugins/expression_metric/public/index.ts +++ b/src/plugins/expression_metric/public/index.ts @@ -6,9 +6,6 @@ * Side Public License, v 1. */ -// TODO: https://github.com/elastic/kibana/issues/110893 -/* eslint-disable @kbn/eslint/no_export_all */ - import { ExpressionMetricPlugin } from './plugin'; export type { ExpressionMetricPluginSetup, ExpressionMetricPluginStart } from './plugin'; @@ -17,4 +14,4 @@ export function plugin() { return new ExpressionMetricPlugin(); } -export * from './expression_renderers'; +export { metricRendererFactory, getMetricRenderer } from './expression_renderers'; diff --git a/src/plugins/expression_metric/public/plugin.ts b/src/plugins/expression_metric/public/plugin.ts index 8711a824fb7b5..6830fd904751c 100755 --- a/src/plugins/expression_metric/public/plugin.ts +++ b/src/plugins/expression_metric/public/plugin.ts @@ -9,7 +9,7 @@ import { CoreSetup, CoreStart, Plugin } from '../../../core/public'; import { ExpressionsStart, ExpressionsSetup } from '../../expressions/public'; import { metricFunction } from '../common/expression_functions'; -import { metricRenderer } from './expression_renderers'; +import { metricRendererFactory } from './expression_renderers'; interface SetupDeps { expressions: ExpressionsSetup; @@ -27,7 +27,7 @@ export class ExpressionMetricPlugin { public setup(core: CoreSetup, { expressions }: SetupDeps): ExpressionMetricPluginSetup { expressions.registerFunction(metricFunction); - expressions.registerRenderer(metricRenderer); + expressions.registerRenderer(metricRendererFactory(core)); } public start(core: CoreStart): ExpressionMetricPluginStart {} diff --git a/src/plugins/expressions/common/execution/execution_contract.ts b/src/plugins/expressions/common/execution/execution_contract.ts index 14ab7bebbf057..69587c58f1045 100644 --- a/src/plugins/expressions/common/execution/execution_contract.ts +++ b/src/plugins/expressions/common/execution/execution_contract.ts @@ -24,7 +24,11 @@ export class ExecutionContract) {} + protected readonly execution: Execution; + + constructor(execution: Execution) { + this.execution = execution; + } /** * Cancel the execution of the expression. This will set abort signal diff --git a/src/plugins/expressions/common/expression_types/expression_type.ts b/src/plugins/expressions/common/expression_types/expression_type.ts index d179beeb76860..bf8a96a4ab1e6 100644 --- a/src/plugins/expressions/common/expression_types/expression_type.ts +++ b/src/plugins/expressions/common/expression_types/expression_type.ts @@ -30,8 +30,9 @@ export class ExpressionType { */ serialize?: (value: Serializable) => unknown; deserialize?: (serialized: unknown[]) => Serializable; + private readonly definition: AnyExpressionTypeDefinition; - constructor(private readonly definition: AnyExpressionTypeDefinition) { + constructor(definition: AnyExpressionTypeDefinition) { const { name, help, deserialize, serialize, validate } = definition; this.name = name; @@ -43,6 +44,7 @@ export class ExpressionType { this.serialize = serialize; this.deserialize = deserialize; + this.definition = definition; } getToFn = ( diff --git a/src/plugins/field_formats/common/field_formats_registry.ts b/src/plugins/field_formats/common/field_formats_registry.ts index 3d856e4686126..19af3a1f976ab 100644 --- a/src/plugins/field_formats/common/field_formats_registry.ts +++ b/src/plugins/field_formats/common/field_formats_registry.ts @@ -177,7 +177,7 @@ export class FieldFormatsRegistry { return new ConcreteFieldFormat(params, this.getConfig); }, - (formatId: FieldFormatId, params: FieldFormatParams) => + (formatId: FieldFormatId, params?: FieldFormatParams) => JSON.stringify({ formatId, ...params, @@ -212,10 +212,10 @@ export class FieldFormatsRegistry { * https://lodash.com/docs#memoize * * @param {KBN_FIELD_TYPES} fieldType - * @param {ES_FIELD_TYPES[]} esTypes + * @param {ES_FIELD_TYPES[] | undefined} esTypes * @return {String} */ - getDefaultInstanceCacheResolver(fieldType: KBN_FIELD_TYPES, esTypes: ES_FIELD_TYPES[]): string { + getDefaultInstanceCacheResolver(fieldType: KBN_FIELD_TYPES, esTypes?: ES_FIELD_TYPES[]): string { // @ts-ignore return Array.isArray(esTypes) && esTypes.indexOf(fieldType) === -1 ? [fieldType, ...esTypes].join('-') diff --git a/src/plugins/home/public/application/components/tutorial/instruction.js b/src/plugins/home/public/application/components/tutorial/instruction.js index ebe78b78f300d..68360c86d2ede 100644 --- a/src/plugins/home/public/application/components/tutorial/instruction.js +++ b/src/plugins/home/public/application/components/tutorial/instruction.js @@ -24,7 +24,7 @@ export function Instruction({ variantId, isCloudEnabled, }) { - const { tutorialService, http, uiSettings, getBasePath } = getServices(); + const { tutorialService, http, uiSettings, getBasePath, kibanaVersion } = getServices(); let pre; if (textPre) { @@ -82,6 +82,7 @@ export function Instruction({ http={http} variantId={variantId} isCloudEnabled={isCloudEnabled} + kibanaVersion={kibanaVersion} /> diff --git a/src/plugins/input_control_vis/public/components/vis/input_control_vis.tsx b/src/plugins/input_control_vis/public/components/vis/input_control_vis.tsx index 956a6c55b61ba..faeae649021df 100644 --- a/src/plugins/input_control_vis/public/components/vis/input_control_vis.tsx +++ b/src/plugins/input_control_vis/public/components/vis/input_control_vis.tsx @@ -25,6 +25,10 @@ function isRangeControl(control: RangeControl | ListControl): control is RangeCo return control.type === CONTROL_TYPES.RANGE; } +interface UnknownControl { + type: string; +} + interface InputControlVisProps { stageFilter: (controlIndex: number, newValue: any) => void; submitFilters: () => void; @@ -90,7 +94,7 @@ export class InputControlVis extends Component { /> ); } else { - throw new Error(`Unhandled control type ${control!.type}`); + throw new Error(`Unhandled control type ${(control as UnknownControl)!.type}`); } return ( diff --git a/src/plugins/kibana_overview/public/components/add_data/add_data.tsx b/src/plugins/kibana_overview/public/components/add_data/add_data.tsx index 81121a17080c2..1be7cd133bca2 100644 --- a/src/plugins/kibana_overview/public/components/add_data/add_data.tsx +++ b/src/plugins/kibana_overview/public/components/add_data/add_data.tsx @@ -12,7 +12,10 @@ import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiTitle } from ' import { FormattedMessage } from '@kbn/i18n-react'; import { CoreStart } from 'kibana/public'; import { RedirectAppLinks, useKibana } from '../../../../../../src/plugins/kibana_react/public'; -import { FeatureCatalogueEntry } from '../../../../../../src/plugins/home/public'; +import { + FeatureCatalogueEntry, + FeatureCatalogueCategory, +} from '../../../../../../src/plugins/home/public'; // @ts-expect-error untyped component import { Synopsis } from '../synopsis'; import { METRIC_TYPE, trackUiMetric } from '../../lib/ui_metric'; @@ -94,8 +97,8 @@ AddData.propTypes = { icon: PropTypes.string.isRequired, path: PropTypes.string.isRequired, showOnHomePage: PropTypes.bool.isRequired, - category: PropTypes.string.isRequired, - order: PropTypes.number, - }) - ), + category: PropTypes.oneOf(Object.values(FeatureCatalogueCategory)).isRequired, + order: PropTypes.number as PropTypes.Validator, + }).isRequired + ).isRequired, }; diff --git a/src/plugins/kibana_overview/public/components/manage_data/manage_data.tsx b/src/plugins/kibana_overview/public/components/manage_data/manage_data.tsx index fa9e33a2ba82c..85f354d8a81cb 100644 --- a/src/plugins/kibana_overview/public/components/manage_data/manage_data.tsx +++ b/src/plugins/kibana_overview/public/components/manage_data/manage_data.tsx @@ -12,7 +12,10 @@ import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, EuiSpacer, EuiTitle } fro import { FormattedMessage } from '@kbn/i18n-react'; import { CoreStart } from 'kibana/public'; import { RedirectAppLinks, useKibana } from '../../../../../../src/plugins/kibana_react/public'; -import { FeatureCatalogueEntry } from '../../../../../../src/plugins/home/public'; +import { + FeatureCatalogueEntry, + FeatureCatalogueCategory, +} from '../../../../../../src/plugins/home/public'; // @ts-expect-error untyped component import { Synopsis } from '../synopsis'; import { METRIC_TYPE, trackUiMetric } from '../../lib/ui_metric'; @@ -81,8 +84,8 @@ ManageData.propTypes = { icon: PropTypes.string.isRequired, path: PropTypes.string.isRequired, showOnHomePage: PropTypes.bool.isRequired, - category: PropTypes.string.isRequired, - order: PropTypes.number, - }) - ), + category: PropTypes.oneOf(Object.values(FeatureCatalogueCategory)).isRequired, + order: PropTypes.number as PropTypes.Validator, + }).isRequired + ).isRequired, }; 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 356aaf60b423c..c2a4f18218dd4 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts @@ -396,6 +396,10 @@ export const stackManagementSchema: MakeSchemaFrom = { type: 'boolean', _meta: { description: 'Non-default value of setting.' }, }, + 'visualization:visualize:legacyHeatmapChartsLibrary': { + type: 'boolean', + _meta: { description: 'Non-default value of setting.' }, + }, 'doc_table:legacy': { type: 'boolean', _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 69287d37dfa28..69ed647f0845a 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts @@ -28,6 +28,7 @@ export interface UsageStats { 'autocomplete:valueSuggestionMethod': string; 'search:timeout': number; 'visualization:visualize:legacyPieChartsLibrary': boolean; + 'visualization:visualize:legacyHeatmapChartsLibrary': boolean; 'doc_table:legacy': boolean; 'discover:modifyColumnsOnSwitch': boolean; 'discover:searchFieldsFromSource': boolean; diff --git a/src/plugins/presentation_util/common/lib/utils/default_theme.ts b/src/plugins/presentation_util/common/lib/utils/default_theme.ts new file mode 100644 index 0000000000000..c403937016ec8 --- /dev/null +++ b/src/plugins/presentation_util/common/lib/utils/default_theme.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 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 { CoreTheme } from 'kibana/public'; +import { Observable } from 'rxjs'; + +export const defaultTheme$: Observable = new Observable((subscriber) => + subscriber.next({ darkMode: false }) +); diff --git a/src/plugins/presentation_util/common/lib/utils/index.ts b/src/plugins/presentation_util/common/lib/utils/index.ts index 232ec09cf8b06..5fc7e31fdf9f5 100644 --- a/src/plugins/presentation_util/common/lib/utils/index.ts +++ b/src/plugins/presentation_util/common/lib/utils/index.ts @@ -10,6 +10,7 @@ export * from './dataurl'; export * from './httpurl'; export * from './resolve_dataurl'; export * from './url'; +export { defaultTheme$ } from './default_theme'; export async function getElasticLogo() { return await import('./elastic_logo'); diff --git a/src/plugins/presentation_util/public/components/controls/control_group/embeddable/control_group_container_factory.ts b/src/plugins/presentation_util/public/components/controls/control_group/embeddable/control_group_container_factory.ts index 33d0d079d26f8..5a71355da8bbe 100644 --- a/src/plugins/presentation_util/public/components/controls/control_group/embeddable/control_group_container_factory.ts +++ b/src/plugins/presentation_util/public/components/controls/control_group/embeddable/control_group_container_factory.ts @@ -26,7 +26,6 @@ import { export class ControlGroupContainerFactory implements EmbeddableFactoryDefinition { public readonly isContainerType = true; public readonly type = CONTROL_GROUP_TYPE; - public inject: EmbeddablePersistableStateService['inject']; public extract: EmbeddablePersistableStateService['extract']; diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index cd5d3818bcdec..31bf9c3f08e71 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -7742,6 +7742,12 @@ "description": "Non-default value of setting." } }, + "visualization:visualize:legacyHeatmapChartsLibrary": { + "type": "boolean", + "_meta": { + "description": "Non-default value of setting." + } + }, "doc_table:legacy": { "type": "boolean", "_meta": { diff --git a/src/plugins/vis_default_editor/public/components/options/color_schema.tsx b/src/plugins/vis_default_editor/public/components/options/color_schema.tsx index 4e6fec5c98558..3ce9e2ec72fa0 100644 --- a/src/plugins/vis_default_editor/public/components/options/color_schema.tsx +++ b/src/plugins/vis_default_editor/public/components/options/color_schema.tsx @@ -51,6 +51,7 @@ function ColorSchemaOptions({ { uiState.set('vis.colors', null); + uiState?.emit('reload'); setIsCustomColors(false); }} > diff --git a/src/plugins/vis_default_editor/public/components/options/percentage_mode.tsx b/src/plugins/vis_default_editor/public/components/options/percentage_mode.tsx index bfb6d2051452b..0a593dd753b53 100644 --- a/src/plugins/vis_default_editor/public/components/options/percentage_mode.tsx +++ b/src/plugins/vis_default_editor/public/components/options/percentage_mode.tsx @@ -22,6 +22,7 @@ export interface PercentageModeOptionProps { percentageMode: boolean; formatPattern?: string; 'data-test-subj'?: string; + disabled?: boolean; } function PercentageModeOption({ @@ -29,6 +30,7 @@ function PercentageModeOption({ setValue, percentageMode, formatPattern, + disabled, }: PercentageModeOptionProps) { const { services } = useKibana(); const defaultPattern = services.uiSettings?.get( @@ -45,6 +47,7 @@ function PercentageModeOption({ paramName="percentageMode" value={percentageMode} setValue={setValue} + disabled={disabled} /> ; diff --git a/src/plugins/vis_types/heatmap/jest.config.js b/src/plugins/vis_types/heatmap/jest.config.js new file mode 100644 index 0000000000000..6b9df821c48db --- /dev/null +++ b/src/plugins/vis_types/heatmap/jest.config.js @@ -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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/src/plugins/vis_types/heatmap'], + coverageDirectory: '/target/kibana-coverage/jest/src/plugins/vis_types/heatmap', + coverageReporters: ['text', 'html'], + collectCoverageFrom: [ + '/src/plugins/vis_types/heatmap/{common,public,server}/**/*.{ts,tsx}', + ], +}; diff --git a/src/plugins/vis_types/heatmap/kibana.json b/src/plugins/vis_types/heatmap/kibana.json new file mode 100644 index 0000000000000..c8df98e2b343a --- /dev/null +++ b/src/plugins/vis_types/heatmap/kibana.json @@ -0,0 +1,14 @@ +{ + "id": "visTypeHeatmap", + "version": "kibana", + "ui": true, + "server": true, + "requiredPlugins": ["charts", "data", "expressions", "visualizations", "usageCollection", "fieldFormats"], + "requiredBundles": ["visDefaultEditor"], + "extraPublicDirs": ["common/index"], + "owner": { + "name": "Vis Editors", + "githubTeam": "kibana-vis-editors" + }, + "description": "Contains the heatmap implementation using the elastic-charts library. The goal is to eventually deprecate the old implementation and keep only this. Until then, the library used is defined by the Legacy heatmap charts library advanced setting." + } diff --git a/src/plugins/vis_types/heatmap/public/__snapshots__/to_ast.test.ts.snap b/src/plugins/vis_types/heatmap/public/__snapshots__/to_ast.test.ts.snap new file mode 100644 index 0000000000000..f7a8299920212 --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/__snapshots__/to_ast.test.ts.snap @@ -0,0 +1,58 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`heatmap vis toExpressionAst function should match basic snapshot 1`] = ` +Object { + "addArgument": [Function], + "arguments": Object { + "gridConfig": Array [ + Object { + "toAst": [Function], + }, + ], + "highlightInHover": Array [ + false, + ], + "lastRangeIsRightOpen": Array [ + false, + ], + "legend": Array [ + Object { + "toAst": [Function], + }, + ], + "palette": Array [ + Object { + "toAst": [Function], + }, + ], + "percentageMode": Array [ + false, + ], + "showTooltip": Array [ + true, + ], + "valueAccessor": Array [ + Object { + "toAst": [Function], + }, + ], + "xAccessor": Array [ + Object { + "toAst": [Function], + }, + ], + "yAccessor": Array [ + Object { + "toAst": [Function], + }, + ], + }, + "getArgument": [Function], + "name": "heatmap", + "removeArgument": [Function], + "replaceArgument": [Function], + "toAst": [Function], + "toString": [Function], + "type": "expression_function_builder", +} +`; diff --git a/src/plugins/vis_types/heatmap/public/editor/collections.ts b/src/plugins/vis_types/heatmap/public/editor/collections.ts new file mode 100644 index 0000000000000..932a2c3205057 --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/editor/collections.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 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 { Position } from '@elastic/charts'; +import { ScaleType } from '../types'; + +export const legendPositions = [ + { + text: i18n.translate('visTypeHeatmap.legendPositions.topText', { + defaultMessage: 'Top', + }), + value: Position.Top, + }, + { + text: i18n.translate('visTypeHeatmap.legendPositions.leftText', { + defaultMessage: 'Left', + }), + value: Position.Left, + }, + { + text: i18n.translate('visTypeHeatmap.legendPositions.rightText', { + defaultMessage: 'Right', + }), + value: Position.Right, + }, + { + text: i18n.translate('visTypeHeatmap.legendPositions.bottomText', { + defaultMessage: 'Bottom', + }), + value: Position.Bottom, + }, +]; + +export const scaleTypes = [ + { + text: i18n.translate('visTypeHeatmap.scaleTypes.linearText', { + defaultMessage: 'Linear', + }), + value: ScaleType.Linear, + }, + { + text: i18n.translate('visTypeHeatmap.scaleTypes.logText', { + defaultMessage: 'Log', + }), + value: ScaleType.Log, + }, + { + text: i18n.translate('visTypeHeatmap.scaleTypes.squareRootText', { + defaultMessage: 'Square root', + }), + value: ScaleType.SquareRoot, + }, +]; diff --git a/src/plugins/vis_types/heatmap/public/editor/components/heatmap.test.tsx b/src/plugins/vis_types/heatmap/public/editor/components/heatmap.test.tsx new file mode 100644 index 0000000000000..5f57083072202 --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/editor/components/heatmap.test.tsx @@ -0,0 +1,205 @@ +/* + * Copyright 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 { mountWithIntl } from '@kbn/test/jest'; +import { ReactWrapper } from 'enzyme'; +import type { PersistedState } from '../../../../../visualizations/public'; +import HeatmapOptions, { HeatmapOptionsProps } from './heatmap'; +import { findTestSubject } from '@elastic/eui/lib/test'; +import { act } from 'react-dom/test-utils'; + +describe('PalettePicker', function () { + let props: HeatmapOptionsProps; + let component: ReactWrapper; + const mockState = new Map(); + const uiState = { + get: jest + .fn() + .mockImplementation((key, fallback) => (mockState.has(key) ? mockState.get(key) : fallback)), + set: jest.fn().mockImplementation((key, value) => mockState.set(key, value)), + emit: jest.fn(), + on: jest.fn(), + setSilent: jest.fn(), + } as unknown as PersistedState; + + beforeAll(() => { + props = { + showElasticChartsOptions: true, + uiState, + setValidity: jest.fn(), + vis: { + type: { + editorConfig: { + collections: { + legendPositions: [ + { + text: 'Top', + value: 'top', + }, + { + text: 'Left', + value: 'left', + }, + { + text: 'Right', + value: 'right', + }, + { + text: 'Bottom', + value: 'bottom', + }, + ], + }, + }, + }, + }, + stateParams: { + percentageMode: false, + addTooltip: true, + addLegend: true, + enableHover: false, + legendPosition: 'right', + colorsNumber: 8, + colorSchema: 'Blues', + setColorRange: false, + colorsRange: [], + invertColors: false, + truncateLegend: true, + maxLegendLines: 1, + 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, + overwriteColor: true, + }, + title: { + text: 'Count', + }, + }, + ], + }, + setValue: jest.fn(), + } as unknown as HeatmapOptionsProps; + }); + + it('renders the long legend options for the elastic charts implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapLongLegendsOptions').length).toBe(1); + }); + }); + + it('not renders the long legend options for the vislib implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapLongLegendsOptions').length).toBe(0); + }); + }); + + it('disables the highlight range switch for the elastic charts implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapHighlightRange').prop('disabled')).toBeTruthy(); + }); + }); + + it('enables the highlight range switch for the vislib implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapHighlightRange').prop('disabled')).toBeFalsy(); + }); + }); + + it('disables the color scale dropdown for the elastic charts implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapColorScale').prop('disabled')).toBeTruthy(); + }); + }); + + it('enables the color scale dropdown for the vislib implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapColorScale').prop('disabled')).toBeFalsy(); + }); + }); + + it('not renders the scale to data bounds switch for the elastic charts implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapScaleToDataBounds').length).toBe(0); + }); + }); + + it('renders the scale to data bounds for the vislib implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapScaleToDataBounds').length).toBe(1); + }); + }); + + it('disables the labels rotate for the elastic charts implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapLabelsRotate').prop('disabled')).toBeTruthy(); + }); + }); + + it('enables the labels rotate for the vislib implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapLabelsRotate').prop('disabled')).toBeFalsy(); + }); + }); + + it('disables the overwtite color switch for the elastic charts implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect( + findTestSubject(component, 'heatmapLabelsOverwriteColor').prop('disabled') + ).toBeTruthy(); + }); + }); + + it('enables the overwtite color switch for the vislib implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect( + findTestSubject(component, 'heatmapLabelsOverwriteColor').prop('disabled') + ).toBeFalsy(); + }); + }); + + it('disables the color picker for the elastic charts implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapLabelsColor').prop('disabled')).toBeTruthy(); + }); + }); + + it('enables the color picker for the vislib implementation', async () => { + component = mountWithIntl(); + await act(async () => { + expect(findTestSubject(component, 'heatmapLabelsColor').prop('disabled')).toBeFalsy(); + }); + }); +}); diff --git a/src/plugins/vis_types/vislib/public/editor/components/heatmap/index.tsx b/src/plugins/vis_types/heatmap/public/editor/components/heatmap.tsx similarity index 50% rename from src/plugins/vis_types/vislib/public/editor/components/heatmap/index.tsx rename to src/plugins/vis_types/heatmap/public/editor/components/heatmap.tsx index 4e5d43eb7089a..ca5f6d7c44b3c 100644 --- a/src/plugins/vis_types/vislib/public/editor/components/heatmap/index.tsx +++ b/src/plugins/vis_types/heatmap/public/editor/components/heatmap.tsx @@ -7,13 +7,10 @@ */ import React, { useCallback, useEffect, useState } from 'react'; - -import { EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui'; +import { EuiPanel, EuiTitle, EuiSpacer, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; -import { ValueAxis } from '../../../../../xy/public'; import { BasicOptions, SelectOption, @@ -24,16 +21,21 @@ import { ColorSchemaOptions, NumberInputOption, PercentageModeOption, -} from '../../../../../../vis_default_editor/public'; - -import { HeatmapVisParams } from '../../../heatmap'; + LongLegendOptions, +} from '../../../../../vis_default_editor/public'; +import { colorSchemas } from '../../../../../charts/public'; +import { VisEditorOptionsProps } from '../../../../../visualizations/public'; +import { HeatmapVisParams, HeatmapTypeProps, ValueAxis } from '../../types'; import { LabelsPanel } from './labels_panel'; -import { getHeatmapCollections } from './../../collections'; +import { legendPositions, scaleTypes } from '../collections'; -const heatmapCollections = getHeatmapCollections(); +export interface HeatmapOptionsProps + extends VisEditorOptionsProps, + HeatmapTypeProps {} -function HeatmapOptions(props: VisEditorOptionsProps) { - const { stateParams, uiState, setValue, setValidity, setTouched } = props; +const HeatmapOptions = (props: HeatmapOptionsProps) => { + const { stateParams, uiState, setValue, setValidity, setTouched, showElasticChartsOptions } = + props; const [valueAxis] = stateParams.valueAxes; const isColorsNumberInvalid = stateParams.colorsNumber < 2 || stateParams.colorsNumber > 10; const [isColorRangesValid, setIsColorRangesValid] = useState(false); @@ -56,32 +58,55 @@ function HeatmapOptions(props: VisEditorOptionsProps) { setValidity(stateParams.setColorRange ? isColorRangesValid : !isColorsNumberInvalid); }, [stateParams.setColorRange, isColorRangesValid, isColorsNumberInvalid, setValidity]); + useEffect(() => { + if (stateParams.setColorRange) { + stateParams.percentageMode = false; + } + }, [stateParams]); + return ( <>

- + + {showElasticChartsOptions && ( + + )}
@@ -91,7 +116,7 @@ function HeatmapOptions(props: VisEditorOptionsProps) {

@@ -100,35 +125,54 @@ function HeatmapOptions(props: VisEditorOptionsProps) { + + + + - - - + {!showElasticChartsOptions && ( + + )} @@ -138,7 +182,7 @@ function HeatmapOptions(props: VisEditorOptionsProps) { data-test-subj="heatmapColorsNumber" disabled={stateParams.setColorRange} isInvalid={isColorsNumberInvalid} - label={i18n.translate('visTypeVislib.controls.heatmapOptions.colorsNumberLabel', { + label={i18n.translate('visTypeHeatmap.controls.heatmapOptions.colorsNumberLabel', { defaultMessage: 'Number of colors', })} max={10} @@ -150,7 +194,7 @@ function HeatmapOptions(props: VisEditorOptionsProps) { ) { setValue={setValue} /> - {stateParams.setColorRange && ( + {stateParams.setColorRange && stateParams.colorsRange && ( ) { - + ); -} +}; // default export required for React.Lazy // eslint-disable-next-line import/no-default-export diff --git a/src/plugins/vis_types/heatmap/public/editor/components/index.tsx b/src/plugins/vis_types/heatmap/public/editor/components/index.tsx new file mode 100644 index 0000000000000..1313d335b06fe --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/editor/components/index.tsx @@ -0,0 +1,25 @@ +/* + * Copyright 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, { lazy } from 'react'; +import { VisEditorOptionsProps } from '../../../../../visualizations/public'; +import { HeatmapVisParams, HeatmapTypeProps } from '../../types'; + +const HeatmapOptionsLazy = lazy(() => import('./heatmap')); + +export const getHeatmapOptions = + ({ showElasticChartsOptions, palettes, trackUiMetric }: HeatmapTypeProps) => + (props: VisEditorOptionsProps) => + ( + + ); diff --git a/src/plugins/vis_types/vislib/public/editor/components/heatmap/labels_panel.tsx b/src/plugins/vis_types/heatmap/public/editor/components/labels_panel.tsx similarity index 62% rename from src/plugins/vis_types/vislib/public/editor/components/heatmap/labels_panel.tsx rename to src/plugins/vis_types/heatmap/public/editor/components/labels_panel.tsx index e5e41500e39e7..3bdfcb34eb13b 100644 --- a/src/plugins/vis_types/vislib/public/editor/components/heatmap/labels_panel.tsx +++ b/src/plugins/vis_types/heatmap/public/editor/components/labels_panel.tsx @@ -13,19 +13,18 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { VisEditorOptionsProps } from 'src/plugins/visualizations/public'; -import { SwitchOption } from '../../../../../../vis_default_editor/public'; -import { ValueAxis } from '../../../../../xy/public'; - -import { HeatmapVisParams } from '../../../heatmap'; +import { SwitchOption } from '../../../../../vis_default_editor/public'; +import { HeatmapVisParams, ValueAxis } from '../../types'; const VERTICAL_ROTATION = 270; interface LabelsPanelProps { valueAxis: ValueAxis; setValue: VisEditorOptionsProps['setValue']; + isNewLibrary?: boolean; } -function LabelsPanel({ valueAxis, setValue }: LabelsPanelProps) { +function LabelsPanel({ valueAxis, setValue, isNewLibrary }: LabelsPanelProps) { const rotateLabels = valueAxis.labels.rotate === VERTICAL_ROTATION; const setValueAxisLabels = useCallback( @@ -55,7 +54,7 @@ function LabelsPanel({ valueAxis, setValue }: LabelsPanelProps) {

@@ -63,48 +62,59 @@ function LabelsPanel({ valueAxis, setValue }: LabelsPanelProps) { diff --git a/src/plugins/vis_types/heatmap/public/index.ts b/src/plugins/vis_types/heatmap/public/index.ts new file mode 100644 index 0000000000000..34387430adbe0 --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/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. + */ + +import { VisTypeHeatmapPlugin } from './plugin'; + +export { heatmapVisType } from './vis_type'; + +export const plugin = () => new VisTypeHeatmapPlugin(); diff --git a/src/plugins/vis_types/heatmap/public/plugin.ts b/src/plugins/vis_types/heatmap/public/plugin.ts new file mode 100644 index 0000000000000..622f68ed707e5 --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/plugin.ts @@ -0,0 +1,54 @@ +/* + * Copyright 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 { CoreSetup } from 'src/core/public'; +import type { VisualizationsSetup } from '../../../visualizations/public'; +import type { ChartsPluginSetup } from '../../../charts/public'; +import type { FieldFormatsStart } from '../../../field_formats/public'; +import type { UsageCollectionSetup } from '../../../usage_collection/public'; +import type { DataPublicPluginStart } from '../../../data/public'; +import { LEGACY_HEATMAP_CHARTS_LIBRARY } from '../common'; +import { heatmapVisType } from './vis_type'; + +/** @internal */ +export interface VisTypeHeatmapSetupDependencies { + visualizations: VisualizationsSetup; + charts: ChartsPluginSetup; + usageCollection: UsageCollectionSetup; +} + +/** @internal */ +export interface VisTypeHeatmapPluginStartDependencies { + data: DataPublicPluginStart; + fieldFormats: FieldFormatsStart; +} + +export class VisTypeHeatmapPlugin { + setup( + core: CoreSetup, + { visualizations, charts, usageCollection }: VisTypeHeatmapSetupDependencies + ) { + if (!core.uiSettings.get(LEGACY_HEATMAP_CHARTS_LIBRARY)) { + const trackUiMetric = usageCollection?.reportUiCounter.bind( + usageCollection, + 'vis_type_heatmap' + ); + + visualizations.createBaseVisualization( + heatmapVisType({ + showElasticChartsOptions: true, + palettes: charts.palettes, + trackUiMetric, + }) + ); + } + return {}; + } + + start() {} +} diff --git a/src/plugins/vis_types/heatmap/public/sample_vis.test.mocks.ts b/src/plugins/vis_types/heatmap/public/sample_vis.test.mocks.ts new file mode 100644 index 0000000000000..a7e9f53e703ec --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/sample_vis.test.mocks.ts @@ -0,0 +1,1792 @@ +/* + * Copyright 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 sampleAreaVis = { + type: { + name: 'heatmap', + title: 'Heatmap', + description: 'Creates a heatmap viz', + icon: 'visHeatmap', + stage: 'production', + options: { + showTimePicker: true, + showQueryBar: true, + showFilterBar: true, + showIndexSelection: true, + hierarchicalData: false, + }, + visConfig: { + defaults: { + type: 'heatmap', + 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', + }, + }, + ], + percentageMode: false, + addTooltip: true, + addLegend: true, + enableHover: false, + legendPosition: 'right', + colorsNumber: 8, + colorSchema: 'Blues', + setColorRange: false, + colorsRange: [], + invertColors: false, + truncateLegend: true, + maxLegendLines: 1, + }, + }, + editorConfig: { + optionTabs: [ + { + name: 'advanced', + title: 'Metrics & axes', + }, + { + name: 'options', + title: 'Panel settings', + }, + ], + schemas: { + all: [ + { + group: 'metrics', + name: 'metric', + title: 'Y-axis', + aggFilter: ['!geo_centroid', '!geo_bounds'], + min: 1, + defaults: [ + { + schema: 'metric', + type: 'count', + }, + ], + max: null, + editor: false, + params: [], + }, + { + group: 'metrics', + name: 'radius', + title: 'Dot size', + min: 0, + max: 1, + aggFilter: ['count', 'avg', 'sum', 'min', 'max', 'cardinality'], + editor: false, + params: [], + }, + { + group: 'buckets', + name: 'segment', + title: 'X-axis', + min: 0, + max: 1, + aggFilter: ['!geohash_grid', '!geotile_grid', '!filter'], + editor: false, + params: [], + }, + { + group: 'buckets', + name: 'group', + title: 'Split series', + min: 0, + max: 3, + aggFilter: ['!geohash_grid', '!geotile_grid', '!filter'], + editor: false, + params: [], + }, + { + group: 'buckets', + name: 'split', + title: 'Split chart', + min: 0, + max: 1, + aggFilter: ['!geohash_grid', '!geotile_grid', '!filter'], + params: [ + { + name: 'row', + default: true, + }, + ], + editor: false, + }, + ], + buckets: [null, null, null], + metrics: [null, null], + }, + }, + hidden: false, + hierarchicalData: false, + }, + title: '[eCommerce] Sales by Category', + description: '', + params: { + type: 'heatmap', + 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: 'Sum of total_quantity', + }, + }, + ], + percentageMode: false, + addTooltip: true, + addLegend: true, + enableHover: false, + legendPosition: 'right', + colorsNumber: 8, + colorSchema: 'Blues', + setColorRange: false, + colorsRange: [], + invertColors: false, + truncateLegend: true, + maxLegendLines: 1, + dimensions: { + x: { + accessor: 0, + format: { + id: 'date', + params: { + pattern: 'YYYY-MM-DD HH:mm', + }, + }, + params: { + date: true, + interval: 43200000, + format: 'YYYY-MM-DD HH:mm', + bounds: { + min: '2020-09-30T12:41:13.795Z', + max: '2020-10-15T17:00:00.000Z', + }, + }, + label: 'order_date per 12 hours', + aggType: 'date_histogram', + }, + y: [ + { + accessor: 2, + format: { + id: 'number', + params: { + parsedUrl: { + origin: 'http://localhost:5801', + pathname: '/app/visualize', + basePath: '', + }, + }, + }, + params: {}, + label: 'Sum of total_quantity', + aggType: 'sum', + }, + ], + series: [ + { + accessor: 1, + format: { + id: 'terms', + params: { + id: 'string', + otherBucketLabel: 'Other', + missingBucketLabel: 'Missing', + }, + }, + params: {}, + label: 'category.keyword: Descending', + aggType: 'terms', + }, + ], + }, + }, + data: { + searchSource: { + id: 'data_source1', + requestStartHandlers: [], + inheritOptions: {}, + history: [], + fields: { + query: { + query: '', + language: 'kuery', + }, + filter: [], + index: { + id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f', + title: 'kibana_sample_data_ecommerce', + fieldFormatMap: { + taxful_total_price: { + id: 'number', + params: { + pattern: '$0,0.[00]', + }, + }, + }, + fields: [ + { + count: 0, + name: '_id', + type: 'string', + esTypes: ['_id'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: false, + }, + { + count: 0, + name: '_index', + type: 'string', + esTypes: ['_index'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: false, + }, + { + count: 0, + name: '_score', + type: 'number', + scripted: false, + searchable: false, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: '_source', + type: '_source', + esTypes: ['_source'], + scripted: false, + searchable: false, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: '_type', + type: 'string', + esTypes: ['_type'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: false, + }, + { + count: 0, + name: 'category', + type: 'string', + esTypes: ['text'], + scripted: false, + searchable: true, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: 'category.keyword', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: { + multi: { + parent: 'category', + }, + }, + }, + { + count: 0, + name: 'currency', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'customer_birth_date', + type: 'date', + esTypes: ['date'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'customer_first_name', + type: 'string', + esTypes: ['text'], + scripted: false, + searchable: true, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: 'customer_first_name.keyword', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: { + multi: { + parent: 'customer_first_name', + }, + }, + }, + { + count: 0, + name: 'customer_full_name', + type: 'string', + esTypes: ['text'], + scripted: false, + searchable: true, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: 'customer_full_name.keyword', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: { + multi: { + parent: 'customer_full_name', + }, + }, + }, + { + count: 0, + name: 'customer_gender', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'customer_id', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'customer_last_name', + type: 'string', + esTypes: ['text'], + scripted: false, + searchable: true, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: 'customer_last_name.keyword', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: { + multi: { + parent: 'customer_last_name', + }, + }, + }, + { + count: 0, + name: 'customer_phone', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'day_of_week', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'day_of_week_i', + type: 'number', + esTypes: ['integer'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'email', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'event.dataset', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'geoip.city_name', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'geoip.continent_name', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'geoip.country_iso_code', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'geoip.location', + type: 'geo_point', + esTypes: ['geo_point'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'geoip.region_name', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'manufacturer', + type: 'string', + esTypes: ['text'], + scripted: false, + searchable: true, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: 'manufacturer.keyword', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: { + multi: { + parent: 'manufacturer', + }, + }, + }, + { + count: 0, + name: 'order_date', + type: 'date', + esTypes: ['date'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'order_id', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products._id', + type: 'string', + esTypes: ['text'], + scripted: false, + searchable: true, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: 'products._id.keyword', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: { + multi: { + parent: 'products._id', + }, + }, + }, + { + count: 0, + name: 'products.base_price', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.base_unit_price', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.category', + type: 'string', + esTypes: ['text'], + scripted: false, + searchable: true, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: 'products.category.keyword', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: { + multi: { + parent: 'products.category', + }, + }, + }, + { + count: 0, + name: 'products.created_on', + type: 'date', + esTypes: ['date'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.discount_amount', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.discount_percentage', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.manufacturer', + type: 'string', + esTypes: ['text'], + scripted: false, + searchable: true, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: 'products.manufacturer.keyword', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: { + multi: { + parent: 'products.manufacturer', + }, + }, + }, + { + count: 0, + name: 'products.min_price', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.price', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.product_id', + type: 'number', + esTypes: ['long'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.product_name', + type: 'string', + esTypes: ['text'], + scripted: false, + searchable: true, + aggregatable: false, + readFromDocValues: false, + }, + { + count: 0, + name: 'products.product_name.keyword', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: { + multi: { + parent: 'products.product_name', + }, + }, + }, + { + count: 0, + name: 'products.quantity', + type: 'number', + esTypes: ['integer'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.sku', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.tax_amount', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.taxful_price', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.taxless_price', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'products.unit_discount_amount', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'sku', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'taxful_total_price', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'taxless_total_price', + type: 'number', + esTypes: ['half_float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'total_quantity', + type: 'number', + esTypes: ['integer'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'total_unique_products', + type: 'number', + esTypes: ['integer'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'type', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + { + count: 0, + name: 'user', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + }, + ], + timeFieldName: 'order_date', + metaFields: ['_source', '_id', '_type', '_index', '_score'], + version: 'WzEzLDFd', + originalSavedObjectBody: { + title: 'kibana_sample_data_ecommerce', + timeFieldName: 'order_date', + fields: + '[{"count":0,"name":"_id","type":"string","esTypes":["_id"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":false},{"count":0,"name":"_index","type":"string","esTypes":["_index"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":false},{"count":0,"name":"_score","type":"number","scripted":false,"searchable":false,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"_source","type":"_source","esTypes":["_source"],"scripted":false,"searchable":false,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"_type","type":"string","esTypes":["_type"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":false},{"count":0,"name":"category","type":"string","esTypes":["text"],"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"category.keyword","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":{"multi":{"parent":"category"}}},{"count":0,"name":"currency","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"customer_birth_date","type":"date","esTypes":["date"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"customer_first_name","type":"string","esTypes":["text"],"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"customer_first_name.keyword","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":{"multi":{"parent":"customer_first_name"}}},{"count":0,"name":"customer_full_name","type":"string","esTypes":["text"],"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"customer_full_name.keyword","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":{"multi":{"parent":"customer_full_name"}}},{"count":0,"name":"customer_gender","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"customer_id","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"customer_last_name","type":"string","esTypes":["text"],"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"customer_last_name.keyword","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":{"multi":{"parent":"customer_last_name"}}},{"count":0,"name":"customer_phone","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"day_of_week","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"day_of_week_i","type":"number","esTypes":["integer"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"email","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"event.dataset","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"geoip.city_name","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"geoip.continent_name","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"geoip.country_iso_code","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"geoip.location","type":"geo_point","esTypes":["geo_point"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"geoip.region_name","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"manufacturer","type":"string","esTypes":["text"],"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"manufacturer.keyword","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":{"multi":{"parent":"manufacturer"}}},{"count":0,"name":"order_date","type":"date","esTypes":["date"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"order_id","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products._id","type":"string","esTypes":["text"],"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"products._id.keyword","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":{"multi":{"parent":"products._id"}}},{"count":0,"name":"products.base_price","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.base_unit_price","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.category","type":"string","esTypes":["text"],"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"products.category.keyword","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":{"multi":{"parent":"products.category"}}},{"count":0,"name":"products.created_on","type":"date","esTypes":["date"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.discount_amount","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.discount_percentage","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.manufacturer","type":"string","esTypes":["text"],"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"products.manufacturer.keyword","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":{"multi":{"parent":"products.manufacturer"}}},{"count":0,"name":"products.min_price","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.price","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.product_id","type":"number","esTypes":["long"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.product_name","type":"string","esTypes":["text"],"scripted":false,"searchable":true,"aggregatable":false,"readFromDocValues":false},{"count":0,"name":"products.product_name.keyword","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true,"subType":{"multi":{"parent":"products.product_name"}}},{"count":0,"name":"products.quantity","type":"number","esTypes":["integer"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.sku","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.tax_amount","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.taxful_price","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.taxless_price","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"products.unit_discount_amount","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"sku","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"taxful_total_price","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"taxless_total_price","type":"number","esTypes":["half_float"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"total_quantity","type":"number","esTypes":["integer"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"total_unique_products","type":"number","esTypes":["integer"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"type","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true},{"count":0,"name":"user","type":"string","esTypes":["keyword"],"scripted":false,"searchable":true,"aggregatable":true,"readFromDocValues":true}]', + fieldFormatMap: + '{"taxful_total_price":{"id":"number","params":{"parsedUrl":{"origin":"http://localhost:5801","pathname":"/app/visualize","basePath":""},"pattern":"$0,0.[00]"}}}', + }, + shortDotsEnable: false, + fieldFormats: { + fieldFormats: {}, + defaultMap: { + ip: { + id: 'ip', + params: {}, + }, + date: { + id: 'date', + params: {}, + }, + date_nanos: { + id: 'date_nanos', + params: {}, + es: true, + }, + number: { + id: 'number', + params: {}, + }, + boolean: { + id: 'boolean', + params: {}, + }, + _source: { + id: '_source', + params: {}, + }, + _default_: { + id: 'string', + params: {}, + }, + }, + metaParamsOptions: {}, + }, + }, + }, + dependencies: { + legacy: { + loadingCount$: { + _isScalar: false, + observers: [ + { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: null, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + destination: { + closed: false, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + destination: { + closed: true, + }, + _context: {}, + }, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + count: 1, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + hasPrev: true, + prev: 0, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + parent: { + closed: true, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: true, + concurrent: 1, + hasCompleted: true, + buffer: [], + active: 1, + index: 2, + }, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + parent: { + closed: true, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: true, + concurrent: 1, + hasCompleted: true, + buffer: [ + { + _isScalar: false, + }, + ], + active: 1, + index: 1, + }, + }, + _subscriptions: [ + { + closed: false, + _subscriptions: [ + { + closed: false, + _subscriptions: null, + subject: { + _isScalar: false, + observers: [ + { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: null, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + destination: { + closed: false, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + _context: {}, + }, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + count: 13, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + hasPrev: true, + prev: 0, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + parent: { + closed: true, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: true, + concurrent: 1, + hasCompleted: true, + buffer: [], + active: 1, + index: 2, + }, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + parent: { + closed: true, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: true, + concurrent: 1, + hasCompleted: true, + buffer: [ + { + _isScalar: false, + }, + ], + active: 1, + index: 1, + }, + }, + _subscriptions: [ + null, + { + closed: false, + _subscriptions: [ + { + closed: false, + _subscriptions: [ + { + closed: false, + _subscriptions: null, + subject: { + _isScalar: false, + observers: [null], + closed: false, + isStopped: false, + hasError: false, + thrownError: null, + _value: 0, + }, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + hasKey: true, + key: 0, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + seenValue: false, + }, + _subscriptions: [ + { + closed: false, + _subscriptions: null, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + }, + { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: null, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + destination: { + closed: false, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + _context: {}, + }, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + count: 1, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + hasPrev: true, + prev: 0, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + parent: { + closed: true, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: true, + concurrent: 1, + hasCompleted: true, + buffer: [], + active: 1, + index: 2, + }, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + parent: { + closed: true, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: true, + concurrent: 1, + hasCompleted: true, + buffer: [ + { + _isScalar: false, + }, + ], + active: 1, + index: 1, + }, + }, + _subscriptions: [ + null, + { + closed: false, + _subscriptions: [ + { + closed: false, + _subscriptions: [ + { + closed: false, + _subscriptions: null, + subject: { + _isScalar: false, + observers: [null], + closed: false, + isStopped: false, + hasError: false, + thrownError: null, + _value: 0, + }, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + hasKey: true, + key: 0, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + seenValue: false, + }, + _subscriptions: [ + { + closed: false, + _subscriptions: null, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + }, + { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: null, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + destination: { + closed: false, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + _context: {}, + }, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + count: 1, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + hasPrev: true, + prev: 0, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + parent: { + closed: true, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: true, + concurrent: 1, + hasCompleted: true, + buffer: [], + active: 1, + index: 2, + }, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + parent: { + closed: true, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: true, + concurrent: 1, + hasCompleted: true, + buffer: [ + { + _isScalar: false, + }, + ], + active: 1, + index: 1, + }, + }, + _subscriptions: [ + null, + { + closed: false, + _subscriptions: [ + { + closed: false, + _subscriptions: [ + { + closed: false, + _subscriptions: null, + subject: { + _isScalar: false, + observers: [null], + closed: false, + isStopped: false, + hasError: false, + thrownError: null, + _value: 0, + }, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + hasKey: true, + key: 0, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + seenValue: false, + }, + _subscriptions: [ + { + closed: false, + _subscriptions: null, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + }, + { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: { + closed: false, + _parentOrParents: null, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + destination: { + closed: false, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + _context: {}, + }, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + count: 3, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: false, + hasPrev: true, + prev: 0, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + parent: { + closed: true, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: true, + isStopped: true, + concurrent: 1, + hasCompleted: true, + buffer: [], + active: 1, + index: 2, + }, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + parent: { + closed: true, + _parentOrParents: null, + _subscriptions: null, + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: true, + concurrent: 1, + hasCompleted: true, + buffer: [ + { + _isScalar: false, + }, + ], + active: 1, + index: 1, + }, + }, + _subscriptions: [ + null, + { + closed: false, + _subscriptions: [ + { + closed: false, + _subscriptions: [ + { + closed: false, + _subscriptions: null, + subject: { + _isScalar: false, + observers: [null], + closed: false, + isStopped: false, + hasError: false, + thrownError: null, + _value: 0, + }, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + hasKey: true, + key: 0, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + seenValue: false, + }, + _subscriptions: [ + { + closed: false, + _subscriptions: null, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + }, + null, + ], + closed: false, + isStopped: false, + hasError: false, + thrownError: null, + }, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + }, + null, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + seenValue: false, + }, + _subscriptions: [null], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + }, + _subscriptions: [ + { + closed: false, + _subscriptions: null, + }, + ], + syncErrorValue: null, + syncErrorThrown: false, + syncErrorThrowable: false, + isStopped: false, + hasKey: true, + key: 0, + }, + ], + closed: false, + isStopped: false, + hasError: false, + thrownError: null, + _value: 0, + }, + }, + }, + }, + aggs: { + typesRegistry: {}, + bySchemaName: () => [ + { + id: '1', + enabled: true, + type: 'sum', + params: { + field: 'total_quantity', + }, + schema: 'metric', + makeLabel: () => 'Total quantity', + toSerializedFieldFormat: () => ({ + id: 'number', + params: { + parsedUrl: { + origin: 'http://localhost:5801', + pathname: '/app/visualize', + basePath: '', + }, + }, + }), + }, + ], + getResponseAggs: () => [ + { + id: '1', + enabled: true, + type: 'sum', + params: { + field: 'total_quantity', + }, + schema: 'metric', + toSerializedFieldFormat: () => ({ + id: 'number', + params: { + parsedUrl: { + origin: 'http://localhost:5801', + pathname: '/app/visualize', + basePath: '', + }, + }, + }), + }, + { + id: '2', + enabled: true, + type: 'date_histogram', + params: { + field: 'order_date', + timeRange: { + from: '2020-09-30T12:41:13.795Z', + to: '2020-10-15T17:00:00.000Z', + }, + useNormalizedEsInterval: true, + scaleMetricValues: false, + interval: 'auto', + drop_partials: false, + min_doc_count: 1, + extended_bounds: {}, + }, + schema: 'segment', + toSerializedFieldFormat: () => ({ + id: 'date', + params: { pattern: 'HH:mm:ss.SSS' }, + }), + }, + { + id: '3', + enabled: true, + type: 'terms', + params: { + field: 'category.keyword', + orderBy: '1', + order: 'desc', + size: 5, + otherBucket: false, + otherBucketLabel: 'Other', + missingBucket: false, + missingBucketLabel: 'Missing', + }, + schema: 'group', + toSerializedFieldFormat: () => ({ + id: 'terms', + params: { + id: 'string', + otherBucketLabel: 'Other', + missingBucketLabel: 'Missing', + parsedUrl: { + origin: 'http://localhost:5801', + pathname: '/app/visualize', + basePath: '', + }, + }, + }), + }, + ], + }, + }, + isHierarchical: () => false, + uiState: {}, +}; diff --git a/src/plugins/vis_types/heatmap/public/to_ast.test.ts b/src/plugins/vis_types/heatmap/public/to_ast.test.ts new file mode 100644 index 0000000000000..ec6dfd92e5d6a --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/to_ast.test.ts @@ -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. + */ + +import { Vis } from 'src/plugins/visualizations/public'; +import { sampleAreaVis } from './sample_vis.test.mocks'; +import { buildExpression } from '../../../expressions/public'; + +import { toExpressionAst } from './to_ast'; +import { HeatmapVisParams } from './types'; + +jest.mock('../../../expressions/public', () => ({ + ...(jest.requireActual('../../../expressions/public') as any), + buildExpression: jest.fn().mockImplementation(() => ({ + toAst: () => ({ + type: 'expression', + chain: [], + }), + })), +})); + +jest.mock('./to_ast_esaggs', () => ({ + getEsaggsFn: jest.fn(), +})); + +describe('heatmap vis toExpressionAst function', () => { + let vis: Vis; + + const params = { + timefilter: {}, + timeRange: {}, + abortSignal: {}, + } as any; + + beforeEach(() => { + vis = sampleAreaVis as any; + }); + + it('should match basic snapshot', () => { + toExpressionAst(vis, params); + const [, builtExpression] = (buildExpression as jest.Mock).mock.calls.pop()[0]; + + expect(builtExpression).toMatchSnapshot(); + }); +}); diff --git a/src/plugins/vis_types/heatmap/public/to_ast.ts b/src/plugins/vis_types/heatmap/public/to_ast.ts new file mode 100644 index 0000000000000..d4fa5c8574dfe --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/to_ast.ts @@ -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. + */ + +import { VisToExpressionAst, getVisSchemas, SchemaConfig } from '../../../visualizations/public'; +import { buildExpression, buildExpressionFunction } from '../../../expressions/public'; +import { getStopsWithColorsFromRanges, getStopsWithColorsFromColorsNumber } from './utils/palette'; +import type { HeatmapVisParams } from './types'; +import { getEsaggsFn } from './to_ast_esaggs'; + +const DEFAULT_PERCENT_DECIMALS = 2; + +const prepareLegend = (params: HeatmapVisParams) => { + const legend = buildExpressionFunction('heatmap_legend', { + isVisible: params.addLegend, + position: params.legendPosition, + shouldTruncate: params.truncateLegend ?? true, + maxLines: params.maxLegendLines ?? 1, + }); + + return buildExpression([legend]); +}; + +const prepareDimension = (params: SchemaConfig) => { + const visdimension = buildExpressionFunction('visdimension', { accessor: params.accessor }); + + if (params.format) { + visdimension.addArgument('format', params.format.id); + visdimension.addArgument('formatParams', JSON.stringify(params.format.params)); + } + + return buildExpression([visdimension]); +}; + +const prepareGrid = (params: HeatmapVisParams) => { + const gridConfig = buildExpressionFunction('heatmap_grid', { + isCellLabelVisible: params.valueAxes?.[0].labels.show ?? false, + isXAxisLabelVisible: true, + }); + + return buildExpression([gridConfig]); +}; + +export const toExpressionAst: VisToExpressionAst = async (vis, params) => { + const schemas = getVisSchemas(vis, params); + + // fix formatter for percentage mode + if (vis.params.percentageMode === true) { + schemas.metric.forEach((metric: SchemaConfig) => { + metric.format = { + id: 'percent', + params: { + pattern: + vis.params.percentageFormatPattern ?? `0,0.[${'0'.repeat(DEFAULT_PERCENT_DECIMALS)}]%`, + }, + }; + }); + } + + const expressionArgs = { + showTooltip: vis.params.addTooltip, + highlightInHover: vis.params.enableHover, + lastRangeIsRightOpen: vis.params.lastRangeIsRightOpen ?? false, + percentageMode: vis.params.percentageMode, + legend: prepareLegend(vis.params), + gridConfig: prepareGrid(vis.params), + }; + + const visTypeHeatmap = buildExpressionFunction('heatmap', expressionArgs); + if (schemas.metric.length) { + visTypeHeatmap.addArgument('valueAccessor', prepareDimension(schemas.metric[0])); + } + if (schemas.segment && schemas.segment.length) { + visTypeHeatmap.addArgument('xAccessor', prepareDimension(schemas.segment[0])); + } + if (schemas.group && schemas.group.length) { + visTypeHeatmap.addArgument('yAccessor', prepareDimension(schemas.group[0])); + } + if (schemas.split_row && schemas.split_row.length) { + visTypeHeatmap.addArgument('splitRowAccessor', prepareDimension(schemas.split_row[0])); + } + if (schemas.split_column && schemas.split_column.length) { + visTypeHeatmap.addArgument('splitColumnAccessor', prepareDimension(schemas.split_column[0])); + } + let palette; + if (vis.params.setColorRange && vis.params.colorsRange && vis.params.colorsRange.length) { + const stopsWithColors = getStopsWithColorsFromRanges( + vis.params.colorsRange, + vis.params.colorSchema, + vis.params.invertColors + ); + // palette is type of number, if user gives specific ranges + palette = buildExpressionFunction('palette', { + ...stopsWithColors, + range: 'number', + continuity: 'none', + rangeMin: + vis.params.setColorRange && vis.params.colorsRange && vis.params.colorsRange.length + ? vis.params.colorsRange[0].from + : undefined, + rangeMax: + vis.params.setColorRange && vis.params.colorsRange && vis.params.colorsRange.length + ? vis.params.colorsRange[vis.params?.colorsRange.length - 1].to + : undefined, + }); + } else { + // palette is type of percent, if user wants dynamic calulated ranges + const stopsWithColors = getStopsWithColorsFromColorsNumber( + vis.params.colorsNumber, + vis.params.colorSchema, + vis.params.invertColors + ); + palette = buildExpressionFunction('palette', { + ...stopsWithColors, + range: 'percent', + continuity: 'none', + rangeMin: 0, + rangeMax: 100, + }); + } + visTypeHeatmap.addArgument('palette', buildExpression([palette])); + + const ast = buildExpression([getEsaggsFn(vis), visTypeHeatmap]); + + return ast.toAst(); +}; diff --git a/src/plugins/vis_types/heatmap/public/to_ast_esaggs.ts b/src/plugins/vis_types/heatmap/public/to_ast_esaggs.ts new file mode 100644 index 0000000000000..9b6e02928f7a9 --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/to_ast_esaggs.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 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 { Vis } from '../../../visualizations/public'; +import { buildExpression, buildExpressionFunction } from '../../../expressions/public'; +import { + EsaggsExpressionFunctionDefinition, + IndexPatternLoadExpressionFunctionDefinition, +} from '../../../data/public'; + +import { HeatmapVisParams } from './types'; + +/** + * Get esaggs expressions function + * @param vis + */ +export function getEsaggsFn(vis: Vis) { + return buildExpressionFunction('esaggs', { + index: buildExpression([ + buildExpressionFunction('indexPatternLoad', { + id: vis.data.indexPattern!.id!, + }), + ]), + metricsAtAllLevels: vis.isHierarchical(), + partialRows: false, + aggs: vis.data.aggs!.aggs.map((agg) => buildExpression(agg.toExpressionAst())), + }); +} diff --git a/src/plugins/vis_types/heatmap/public/types.ts b/src/plugins/vis_types/heatmap/public/types.ts new file mode 100644 index 0000000000000..b02dad8656c83 --- /dev/null +++ b/src/plugins/vis_types/heatmap/public/types.ts @@ -0,0 +1,80 @@ +/* + * Copyright 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 { UiCounterMetricType } from '@kbn/analytics'; +import type { Position } from '@elastic/charts'; +import type { ChartsPluginSetup, Style, Labels, ColorSchemas } from '../../../charts/public'; +import { Range } from '../../../expressions/public'; + +export interface HeatmapTypeProps { + showElasticChartsOptions?: boolean; + palettes?: ChartsPluginSetup['palettes']; + trackUiMetric?: (metricType: UiCounterMetricType, eventName: string | string[]) => void; +} + +export interface HeatmapVisParams { + addLegend: boolean; + addTooltip: boolean; + enableHover: boolean; + legendPosition: Position; + truncateLegend?: boolean; + maxLegendLines?: number; + lastRangeIsRightOpen: boolean; + percentageMode: boolean; + valueAxes: ValueAxis[]; + colorSchema: ColorSchemas; + invertColors: boolean; + colorsNumber: number | ''; + setColorRange: boolean; + colorsRange?: Range[]; + percentageFormatPattern?: string; +} + +// ToDo: move them to constants +export enum ScaleType { + Linear = 'linear', + Log = 'log', + SquareRoot = 'square root', +} + +export enum AxisType { + Category = 'category', + Value = 'value', +} +export enum AxisMode { + Normal = 'normal', + Percentage = 'percentage', + Wiggle = 'wiggle', + Silhouette = 'silhouette', +} + +export interface Scale { + boundsMargin?: number | ''; + defaultYExtents?: boolean; + max?: number | null; + min?: number | null; + mode?: AxisMode; + setYExtents?: boolean; + type: ScaleType; +} + +interface CategoryAxis { + id: string; + labels: Labels; + position: Position; + scale: Scale; + show: boolean; + title?: { + text?: string; + }; + type: AxisType; + style?: Partial