diff --git a/.ci/Jenkinsfile_flaky b/.ci/Jenkinsfile_flaky index befb8d259b5b6..425a5e71798b1 100644 --- a/.ci/Jenkinsfile_flaky +++ b/.ci/Jenkinsfile_flaky @@ -35,7 +35,7 @@ kibanaPipeline(timeoutMinutes: 180) { if (!IS_XPACK) { kibanaPipeline.buildOss() if (CI_GROUP == '1') { - runbld("./test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1") + runbld("./test/scripts/jenkins_build_kbn_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1") } } else { kibanaPipeline.buildXpack() diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f327206464090..da85fb986ae01 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -177,17 +177,23 @@ # Elasticsearch UI /src/plugins/console/ @elastic/es-ui /src/plugins/es_ui_shared/ @elastic/es-ui -/x-pack/plugins/console_extensions/ @elastic/es-ui /x-pack/legacy/plugins/cross_cluster_replication/ @elastic/es-ui /x-pack/legacy/plugins/index_lifecycle_management/ @elastic/es-ui /x-pack/legacy/plugins/index_management/ @elastic/es-ui /x-pack/legacy/plugins/license_management/ @elastic/es-ui -/x-pack/plugins/remote_clusters/ @elastic/es-ui /x-pack/legacy/plugins/rollup/ @elastic/es-ui -/x-pack/plugins/searchprofiler/ @elastic/es-ui -/x-pack/plugins/painless_lab/ @elastic/es-ui /x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui /x-pack/legacy/plugins/upgrade_assistant/ @elastic/es-ui +/x-pack/plugins/console_extensions/ @elastic/es-ui +/x-pack/plugins/es_ui_shared/ @elastic/es-ui +/x-pack/plugins/grokdebugger/ @elastic/es-ui +/x-pack/plugins/index_management/ @elastic/es-ui +/x-pack/plugins/license_management/ @elastic/es-ui +/x-pack/plugins/painless_lab/ @elastic/es-ui +/x-pack/plugins/remote_clusters/ @elastic/es-ui +/x-pack/plugins/rollup/ @elastic/es-ui +/x-pack/plugins/searchprofiler/ @elastic/es-ui +/x-pack/plugins/snapshot_restore/ @elastic/es-ui /x-pack/plugins/upgrade_assistant/ @elastic/es-ui /x-pack/plugins/watcher/ @elastic/es-ui diff --git a/docs/logs/images/logs-console.png b/docs/logs/images/logs-console.png index 8e94c31c6862a..ddd3346475da6 100644 Binary files a/docs/logs/images/logs-console.png and b/docs/logs/images/logs-console.png differ diff --git a/docs/logs/using.asciidoc b/docs/logs/using.asciidoc index 8074cc4a8026d..96e7c5fa4d312 100644 --- a/docs/logs/using.asciidoc +++ b/docs/logs/using.asciidoc @@ -38,7 +38,7 @@ Log entries for the specified time appear in the middle of the page. To quickly [[logs-customize]] === Customize your view Click *Customize* to customize the view. -Here, you can set the scale to use for the minimap timeline, choose whether to wrap long lines, and choose your preferred text size. +Here, you can choose whether to wrap long lines, and choose your preferred text size. [float] === Configuring the data to use for your logs diff --git a/docs/migration/migrate_8_0.asciidoc b/docs/migration/migrate_8_0.asciidoc index ce4c97391f1b5..4dc03222f057e 100644 --- a/docs/migration/migrate_8_0.asciidoc +++ b/docs/migration/migrate_8_0.asciidoc @@ -61,24 +61,53 @@ for example, `logstash-*`. *Impact:* Use `xpack.security.authc.providers` instead. [float] -==== `xpack.security.authc.saml.realm` is now mandatory when using the SAML authentication provider -*Details:* Previously Kibana was choosing the appropriate Elasticsearch SAML realm automatically using the `Assertion Consumer Service` -URL that it derived from the actual server address. Starting in 8.0.0, the Elasticsearch SAML realm name that Kibana will use should be -specified explicitly. +==== `xpack.security.authc.providers` has changed value format +*Details:* `xpack.security.authc.providers` setting in the `kibana.yml` has changed value format. -*Impact:* Always define `xpack.security.authc.saml.realm` when using the SAML authentication provider. +*Impact:* Array of provider types as a value is no longer supported, use extended object format instead. + +[float] +==== `xpack.security.authc.saml` is no longer valid +*Details:* The deprecated `xpack.security.authc.saml` setting in the `kibana.yml` file has been removed. + +*Impact:* Configure SAML authentication providers using `xpack.security.authc.providers.saml.{provider unique name}.*` settings instead. + +[float] +==== `xpack.security.authc.oidc` is no longer valid +*Details:* The deprecated `xpack.security.authc.oidc` setting in the `kibana.yml` file has been removed. + +*Impact:* Configure OpenID Connect authentication providers using `xpack.security.authc.providers.oidc.{provider unique name}.*` settings instead. [float] ==== `xpack.security.public` is no longer valid -*Details:* The deprecated `xpack.security.public` setting in the `kibana.yml` file has been removed. +*Details:* Previously Kibana was choosing the appropriate Elasticsearch SAML realm automatically using the `Assertion Consumer Service` +URL that it derived from the actual server address and `xpack.security.public` setting. Starting in 8.0.0, the deprecated `xpack.security.public` setting in the `kibana.yml` file has been removed and the Elasticsearch SAML realm name that Kibana will use should be specified explicitly. -*Impact:* Define `xpack.security.authc.saml.realm` when using the SAML authentication provider instead. +*Impact:* Define `xpack.security.authc.providers.saml.{provider unique name}.realm` when using the SAML authentication providers instead. [float] ==== `/api/security/v1/saml` endpoint is no longer supported *Details:* The deprecated `/api/security/v1/saml` endpoint is no longer supported. -*Impact:* Rely on `/api/security/saml/callback` endpoint when using SAML instead. This change should be reflected in Kibana `server.xsrf.whitelist` config as well as in Elasticsearch and Identity Provider SAML settings. +*Impact:* Rely on `/api/security/saml/callback` endpoint when using SAML instead. This change should be reflected in Elasticsearch and Identity Provider SAML settings. + +[float] +==== `/api/security/v1/oidc` endpoint is no longer supported +*Details:* The deprecated `/api/security/v1/oidc` endpoint is no longer supported. + +*Impact:* Rely on `/api/security/oidc/callback` endpoint when using OpenID Connect instead. This change should be reflected in Elasticsearch and OpenID Connect Provider settings. + +[float] +==== `/api/security/v1/oidc` endpoint is no longer supported for Third Party initiated login +*Details:* The deprecated `/api/security/v1/oidc` endpoint is no longer supported for Third Party initiated login. + +*Impact:* Rely on `/api/security/oidc/initiate_login` endpoint when using Third Party initiated OpenID Connect login instead. This change should be reflected in Elasticsearch and OpenID Connect Provider settings. + +[float] +==== `/api/security/v1/oidc/implicit` endpoint is no longer supported +*Details:* The deprecated `/api/security/v1/oidc/implicit` endpoint is no longer supported. + +*Impact:* Rely on `/api/security/oidc/implicit` endpoint when using OpenID Connect Implicit Flow instead. This change should be reflected in OpenID Connect Provider settings. [float] === `optimize` directory is now in the `data` folder diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index a72c15190840a..fb58456ecc2cd 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -410,9 +410,7 @@ all http requests to https over the port configured as `server.port`. supported protocols with versions. Valid protocols: `TLSv1`, `TLSv1.1`, `TLSv1.2` `server.xsrf.whitelist:`:: It is not recommended to disable protections for -arbitrary API endpoints. Instead, supply the `kbn-xsrf` header. There are some -scenarios where whitelisting is required, however, such as -<>. +arbitrary API endpoints. Instead, supply the `kbn-xsrf` header. The `server.xsrf.whitelist` setting requires the following format: [source,text] diff --git a/docs/user/security/authentication/index.asciidoc b/docs/user/security/authentication/index.asciidoc index 3906f15167bd0..4c0e863b05d31 100644 --- a/docs/user/security/authentication/index.asciidoc +++ b/docs/user/security/authentication/index.asciidoc @@ -13,21 +13,51 @@ - <> - <> - <> +- <> + +Enable multiple authentication mechanisms at the same time specifying a prioritized list of the authentication _providers_ (typically of various types) in the configuration. Providers are consulted in ascending order. Make sure each configured provider has a unique name (e.g. `basic1` or `saml1` in the configuration example) and `order` setting. In the event that two or more providers have the same name or `order`, {kib} will fail to start. + +When two or more providers are configured, you can choose the provider you want to use on the Login Selector UI. The order the providers appear is determined by the order setting. The appearance of the specific provider entry can be customized with the `description` setting. + +If you don't want a specific provider to show up at the Login Selector UI (e.g. to only support third-party initiated login) you can hide it with `showInSelector` setting set to `false`. However, in this case, the provider is presented in the provider chain and may be consulted during authentication based on its `order`. To disable the provider, use the `enabled` setting. + +TIP: The Login Selector UI can also be disabled or enabled with `xpack.security.authc.selector.enabled` setting. + +Here is how your `kibana.yml` can look like if you deal with multiple authentication providers: + +-------------------------------------------------------------------------------- +xpack.security.authc.providers: + basic.basic1: + order: 0 + saml.saml1: + order: 1 + realm: saml1 + description: "Log in with SSO" + saml.saml2: + order: 2 + realm: saml2 + showInSelector: false + kerberos.kerberos1: + order: 3 + enabled: false +-------------------------------------------------------------------------------- [[basic-authentication]] ==== Basic authentication -To successfully log in to {kib}, basic authentication requires a username and password. Basic authentication is enabled by default, and is based on the Native security realm or LDAP security realm that is provided by {es}. The basic authentication provider uses a {kib} provided login form, and supports authentication using the `Authorization` request header `Basic` scheme. +To successfully log in to {kib}, basic authentication requires a username and password. Basic authentication is enabled by default, and is based on the Native, LDAP, or Active Directory security realm that is provided by {es}. The basic authentication provider uses a {kib} provided login form, and supports authentication using the `Authorization` request header `Basic` scheme. The session cookies that are issued by the basic authentication provider are stateless. Therefore, logging out of {kib} when using the basic authentication provider clears the session cookies from the browser, but does not invalidate the session cookie for reuse. +NOTE: You can configure only one Basic provider per {kib} instance. + For more information about basic authentication and built-in users, see {ref}/setting-up-authentication.html[User authentication]. [[token-authentication]] ==== Token authentication -Token authentication allows users to login using the same {kib} provided login form as basic authentication, and is based on the Native security realm or LDAP security realm that is provided by {es}. The token authentication provider is built on {es} token APIs. The bearer tokens returned by {es}'s {ref}/security-api-get-token.html[get token API] can be used directly with {kib} using the `Authorization` request header with the `Bearer` scheme. +Token authentication allows users to log in using the same {kib} provided login form as basic authentication, and is based on the Native security realm or LDAP security realm that is provided by {es}. The token authentication provider is built on {es} token APIs. The session cookies that are issued by the token authentication provider are stateful, and logging out of {kib} invalidates the session cookies for reuse. @@ -35,18 +65,17 @@ Prior to configuring {kib}, ensure token support is enabled in {es}. See the {re To enable the token authentication provider in {kib}, set the following value in your `kibana.yml`: -[source,yaml] --------------------------------------------------------------------------------- -xpack.security.authc.providers: [token] --------------------------------------------------------------------------------- - -The token authentication provider can be used in conjunction with the basic authentication provider. The login form will continue to use the token authentication provider, while enabling applications like `curl` to use the `Authorization` request header with the `Basic` scheme. Set the following in your `kibana.yml`, maintaining the order of the auth providers: +NOTE: You can configure only one Token provider per {kib} instance. [source,yaml] -------------------------------------------------------------------------------- -xpack.security.authc.providers: [token, basic] +xpack.security.authc.providers: + token.token1: + order: 0 -------------------------------------------------------------------------------- +Switching to the token authentication provider from basic one will make {kib} to reject requests from applications like `curl` that usually use `Authorization` request header with the `Basic` scheme for authentication. If you still want to support such applications you'll have to either switch to using `Bearer` scheme with the tokens {ref}/security-api-get-token.html[created by {es} token API] or add `Basic` scheme to the list of supported schemes for the <>. + [[pki-authentication]] ==== Public key infrastructure (PKI) authentication @@ -61,21 +90,29 @@ Prior to configuring {kib}, ensure that the PKI realm is enabled in {es} and con To enable the PKI authentication provider in {kib}, you must first <>. You must also enable TLS client authentication and include the certificate authority (CA) used to sign client certificates into a list of CAs trusted by {kib} in your `kibana.yml`: +NOTE: You can configure only one PKI provider per {kib} instance. + [source,yaml] -------------------------------------------------------------------------------- server.ssl.certificateAuthorities: /path/to/your/cacert.pem server.ssl.clientAuthentication: required -xpack.security.authc.providers: [pki] +xpack.security.authc.providers: + pki.pki1: + order: 0 -------------------------------------------------------------------------------- NOTE: Trusted CAs can also be specified in a PKCS #12 keystore bundled with your {kib} server certificate/key using `server.ssl.keystore.path` or in a separate trust store using `server.ssl.truststore.path`. -PKI support in {kib} is designed to be the primary (or sole) authentication method for users of that {kib} instance. However, you can configure both PKI and Basic authentication for the same {kib} instance: +You can also configure both PKI and basic authentication for the same {kib} instance: [source,yaml] -------------------------------------------------------------------------------- -xpack.security.authc.providers: [pki, basic] +xpack.security.authc.providers: + pki.pki1: + order: 0 + basic.basic1: + order: 1 -------------------------------------------------------------------------------- Note that with `server.ssl.clientAuthentication` set to `required`, users are asked to provide a valid client certificate, even if they want to authenticate with username and password. Depending on the security policies, it may or may not be desired. If not, `server.ssl.clientAuthentication` can be set to `optional`. In this case, {kib} still requests a client certificate, but the client won't be required to present one. The `optional` client authentication mode might also be needed in other cases, for example, when PKI authentication is used in conjunction with Reporting. @@ -85,44 +122,52 @@ Note that with `server.ssl.clientAuthentication` set to `required`, users are as SAML authentication allows users to log in to {kib} with an external Identity Provider, such as Okta or Auth0. Make sure that SAML is enabled and configured in {es} before setting it up in {kib}. See {ref}/saml-guide.html[Configuring SAML single sign-on on the Elastic Stack]. -Set the configuration values in `kibana.yml` as follows: +Enable the SAML authentication specifying which SAML realm in {es} should be used: -. Enable the SAML authentication: -+ [source,yaml] -------------------------------------------------------------------------------- -xpack.security.authc.providers: [saml] +xpack.security.authc.providers: + saml.saml1: + order: 0 + realm: saml1 -------------------------------------------------------------------------------- -. {kib} needs to specify which SAML realm in {es} should be used: -+ -[source,yaml] --------------------------------------------------------------------------------- -xpack.security.authc.saml.realm: realm-name --------------------------------------------------------------------------------- +You can log in to {kib} via SAML Single Sign-On by navigating directly to the {kib} URL. If you aren't authenticated, you are redirected to the Identity Provider for login. Most Identity Providers maintain a long-lived session. If you log in to a different application using the same Identity Provider in the same browser, you are automatically authenticated. An exception is if {es} or the Identity Provider is configured to force you to re-authenticate. This login scenario is called _Service Provider initiated login_. + +It's also possible to configure multiple SAML authentication providers at the same time. In this case, you will need to choose which provider to use for login at the Login Selector UI: -. The Identify Provider sends authentication requests to the `Assertion Consumer Service` endpoint that {kib} exposes through a "non-safe" `POST` HTTP method. This does not include CSRF protection HTTP headers specific to {kib}. You must disable the CSRF check for this endpoint. -+ [source,yaml] -------------------------------------------------------------------------------- -server.xsrf.whitelist: [/api/security/saml/callback] +xpack.security.authc.providers: + saml.saml1: + order: 0 + realm: saml1 + description: "Log in with Elastic" + saml.saml2: + order: 1 + realm: saml2 + description: "Log in with Auth0" -------------------------------------------------------------------------------- -Users will be able to log in to {kib} via SAML Single Sign-On by navigating directly to the {kib} URL. Users who aren't authenticated are redirected to the Identity Provider for login. Most Identity Providers maintain a long-lived session—users who logged in to a different application using the same Identity Provider in the same browser are automatically authenticated. An exception is if {es} or the Identity Provider is configured to force user to re-authenticate. This login scenario is called _Service Provider initiated login_. - [float] ===== SAML and basic authentication -SAML support in {kib} is designed to be the primary (or sole) authentication method for users of that {kib} instance. However, you can configure both SAML and Basic authentication for the same {kib} instance: +You can also configure both SAML and basic authentication for the same {kib} instance. This might be the case for {kib} or {es} admins whose accounts aren't linked to the Single Sign-On users database: [source,yaml] -------------------------------------------------------------------------------- -xpack.security.authc.providers: [saml, basic] +xpack.security.authc.providers: + saml.saml1: + order: 0 + realm: saml1 + description: "Log in with Elastic" + basic.basic1: + order: 1 -------------------------------------------------------------------------------- -The order of `saml` and `basic` is important. Users who open {kib} will go through the SAML Single Sign-On process unless the direct Basic authentication `/login` link is used. This might be the case for {kib} or {es} admins whose accounts aren't linked to the Single Sign-On users database. Or, when the `Authorization: Basic base64(username:password)` HTTP header is included in the request (for example, by reverse proxy). +Basic authentication is supported _only_ if the `basic` authentication provider is explicitly declared in `xpack.security.authc.providers` setting, in addition to `saml`. -Basic authentication is supported _only_ if `basic` authentication provider is explicitly declared in `xpack.security.authc.providers` setting in addition to `saml`. +To support basic authentication for the applications like `curl` or when the `Authorization: Basic base64(username:password)` HTTP header is included in the request (for example, by reverse proxy), add `Basic` scheme to the list of supported schemes for the <>. [float] ===== SAML and long URLs @@ -136,7 +181,11 @@ size of the URL that {kib} is allowed to store during the SAML handshake. The de [source,yaml] -------------------------------------------------------------------------------- -xpack.security.authc.saml.maxRedirectURLSize: 1kb +xpack.security.authc.providers: + saml.saml1: + order: 0 + realm: saml1 + maxRedirectURLSize: 1kb -------------------------------------------------------------------------------- [[oidc]] @@ -145,43 +194,52 @@ xpack.security.authc.saml.maxRedirectURLSize: 1kb Similar to SAML, authentication with OpenID Connect allows users to log in to {kib} using an OpenID Connect Provider such as Google, or Okta. OpenID Connect should also be configured in {es}. For more details, see {ref}/oidc-guide.html[Configuring single sign-on to the {stack} using OpenID Connect]. -Set the configuration values in `kibana.yml` as follows: +Enable the OpenID Connect authentication specifying which OpenID Connect realm in {es} should be used: -. Enable the OpenID Connect authentication: -+ [source,yaml] -------------------------------------------------------------------------------- -xpack.security.authc.providers: [oidc] +xpack.security.authc.providers: + oidc.oidc1: + order: 0 + realm: oidc1 -------------------------------------------------------------------------------- -. {kib} needs to specify which OpenID Connect realm in {es} should be used, in case there are more than one configured there. -+ -[source,yaml] --------------------------------------------------------------------------------- -xpack.security.authc.oidc.realm: oidc1 --------------------------------------------------------------------------------- +If you want to use Third Party initiated Single Sign-On, configure your OpenID Provider to use `/api/security/oidc/initiate_login` as `Initiate Login URI`. + +It's also possible to configure multiple OpenID Connect authentication providers at the same time. In this case, you need to choose which provider to use for login at the Login Selector UI: -. {kib} supports Third Party initiated Single Sign On, which might start with an external application instructing the user's -browser to perform a "non-safe" `POST` HTTP method. This request will not include CSRF protection HTTP headers that are -required by {kib}. If you want to use Third Party initiated SSO , then you must disable the CSRF check for this endpoint. -+ [source,yaml] -------------------------------------------------------------------------------- -server.xsrf.whitelist: [/api/security/oidc/initiate_login] +xpack.security.authc.providers: + oidc.oidc1: + order: 0 + realm: oidc1 + description: "Log in with Elastic" + oidc.oidc2: + order: 1 + realm: oidc2 + description: "Log in with Auth0" -------------------------------------------------------------------------------- [float] ===== OpenID Connect and basic authentication -Similar to SAML, OpenID Connect support in {kib} is designed to be the primary (or sole) authentication method for users -of that {kib} instance. However, you can configure both OpenID Connect and Basic authentication for the same {kib} instance: +You can also configure both OpenID Connect and basic authentication for the same {kib} instance. This might be the case for {kib} or {es} admins whose accounts aren't linked to the Single Sign-On users database: [source,yaml] -------------------------------------------------------------------------------- -xpack.security.authc.providers: [oidc, basic] +xpack.security.authc.providers: + oidc.oidc1: + order: 0 + realm: oidc1 + description: "Log in with Elastic" + basic.basic1: + order: 1 -------------------------------------------------------------------------------- -Users will be able to access the login page and use Basic authentication by navigating to the `/login` URL. +Basic authentication is supported _only_ if the `basic` authentication provider is explicitly declared in `xpack.security.authc.providers` setting, in addition to `oidc`. + +To support basic authentication for the applications like `curl` or when the `Authorization: Basic base64(username:password)` HTTP header is included in the request (for example, by reverse proxy), add `Basic` scheme to the list of supported schemes for the <>. [float] ==== Single sign-on provider details @@ -223,18 +281,48 @@ As with the previous SSOs, make sure that you have configured {es} first accordi Next, to enable Kerberos in {kib}, you will need to enable the Kerberos authentication provider in the `kibana.yml` configuration file, as follows: +NOTE: You can configure only one Kerberos provider per {kib} instance. + [source,yaml] ----------------------------------------------- -xpack.security.authc.providers: [kerberos] +xpack.security.authc.providers: + kerberos.kerberos1: + order: 0 ----------------------------------------------- You may want to be able to authenticate with the basic authentication provider as a secondary mechanism or while you are setting up Kerberos for the stack: [source,yaml] ----------------------------------------------- -xpack.security.authc.providers: [kerberos, basic] +xpack.security.authc.providers: + kerberos.kerberos1: + order: 0 + description: "Log in with Kerberos" + basic.basic1: + order: 1 ----------------------------------------------- -As a reminder, the order is important as it determines the order in which each authentication provider is attempted. - Kibana uses SPNEGO, which wraps the Kerberos protocol for use with HTTP, extending it to web applications. At the end of the Kerberos handshake, Kibana will forward the service ticket to Elasticsearch. Elasticsearch will unpack it and it will respond with an access and refresh token which are then used for subsequent authentication. + +[[http-authentication]] +==== HTTP authentication + +[IMPORTANT] +============================================================================ +Be very careful when you modify HTTP authentication settings as it may indirectly affect other important {kib} features that implicitly rely on HTTP authentication (e.g. Reporting). +============================================================================ + +HTTP protocol provides a simple authentication framework that can be used by a client to provide authentication information. It uses a case-insensitive token as a means to identify the authentication scheme, followed by additional information necessary for achieving authentication via that scheme. + +This type of authentication is usually useful for machine-to-machine interaction that requires authentication and where human intervention is not desired or just infeasible. There are a number of use cases when HTTP authentication support comes in handy for {kib} users as well. + +By default {kib} supports <> authentication scheme _and_ any scheme supported by the currently enabled authentication provider. For example, `Basic` authentication scheme is automatically supported when basic authentication provider is enabled, or `Bearer` scheme when any of the token based authentication providers is enabled (Token, SAML, OpenID Connect, PKI or Kerberos). But it's also possible to add support for any other authentication scheme in the `kibana.yml` configuration file, as follows: + +NOTE: Don't forget to explicitly specify default `apikey` scheme when you just want to add a new one to the list. + +[source,yaml] +-------------------------------------------------------------------------------- +xpack.security.authc.http.schemes: [apikey, basic, something-custom] +-------------------------------------------------------------------------------- + +With this configuration, you can send requests to {kib} with the `Authorization` header using `ApiKey`, `Basic` or `Something-Custom` HTTP schemes (case insensitive). Under the hood, {kib} relays this header to {es}, then {es} authenticates the request using the credentials in the header. \ No newline at end of file diff --git a/package.json b/package.json index c2763f098b984..cdc41a2d8a3f0 100644 --- a/package.json +++ b/package.json @@ -119,8 +119,8 @@ "@babel/register": "^7.9.0", "@elastic/apm-rum": "^4.6.0", "@elastic/charts": "^18.1.1", - "@elastic/datemath": "5.0.2", - "@elastic/ems-client": "7.7.1", + "@elastic/datemath": "5.0.3", + "@elastic/ems-client": "7.8.0", "@elastic/eui": "21.0.1", "@elastic/filesaver": "1.1.2", "@elastic/good": "8.1.1-kibana2", @@ -302,7 +302,7 @@ "@kbn/utility-types": "1.0.0", "@microsoft/api-documenter": "7.7.2", "@microsoft/api-extractor": "7.7.0", - "@percy/agent": "^0.11.0", + "@percy/agent": "^0.26.0", "@testing-library/react": "^9.3.2", "@testing-library/react-hooks": "^3.2.1", "@types/angular": "^1.6.56", @@ -395,7 +395,7 @@ "babel-eslint": "^10.0.3", "babel-jest": "^24.9.0", "babel-plugin-istanbul": "^5.2.0", - "backport": "4.9.0", + "backport": "5.1.2", "chai": "3.5.0", "chance": "1.0.18", "cheerio": "0.22.0", diff --git a/packages/elastic-datemath/.npmignore b/packages/elastic-datemath/.npmignore index 915a694e9066c..a56a2f3ff793e 100644 --- a/packages/elastic-datemath/.npmignore +++ b/packages/elastic-datemath/.npmignore @@ -2,3 +2,5 @@ /test /tsconfig.json /.babelrc +/yarn.lock +/__tests__ diff --git a/packages/elastic-datemath/README.md b/packages/elastic-datemath/README.md new file mode 100644 index 0000000000000..a8dcd9f6721cb --- /dev/null +++ b/packages/elastic-datemath/README.md @@ -0,0 +1,5 @@ +# datemath + +Datemath string parser used in Kibana. This is published to NPM for use in a limited number of locations outside of Kibana, but is not regularly updated and may get seriously out of date. + +If you file an issue in elastic/kibana we can probably update it for you if needed, though you probably shouldn't depend on this package for anything important. diff --git a/packages/elastic-datemath/package.json b/packages/elastic-datemath/package.json index 8c7c93834adc6..331b5494581cd 100644 --- a/packages/elastic-datemath/package.json +++ b/packages/elastic-datemath/package.json @@ -1,6 +1,6 @@ { "name": "@elastic/datemath", - "version": "5.0.2", + "version": "5.0.3", "description": "elasticsearch datemath parser, used in kibana", "license": "Apache-2.0", "main": "target/index.js", diff --git a/packages/elastic-datemath/readme.md b/packages/elastic-datemath/readme.md deleted file mode 100644 index f7de9627e6d69..0000000000000 --- a/packages/elastic-datemath/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# datemath - -Datemath string parser used in Kibana diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index f7aee155c9b1d..0cc1ad6326671 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__(703); +/* harmony import */ var _production__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(704); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["buildProductionProjects"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareExternalProjectDependencies", function() { return _production__WEBPACK_IMPORTED_MODULE_1__["prepareExternalProjectDependencies"]; }); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(499); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(500); /* 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__(514); +/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(515); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Project", function() { return _utils_project__WEBPACK_IMPORTED_MODULE_3__["Project"]; }); -/* harmony import */ var _utils_workspaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(576); +/* harmony import */ var _utils_workspaces__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(577); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "copyWorkspacePackages", function() { return _utils_workspaces__WEBPACK_IMPORTED_MODULE_4__["copyWorkspacePackages"]; }); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(577); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(578); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getProjectPaths", function() { return _config__WEBPACK_IMPORTED_MODULE_5__["getProjectPaths"]; }); /* @@ -152,7 +152,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _commands__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(687); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(688); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34); /* * Licensed to Elasticsearch B.V. under one or more contributor @@ -2506,9 +2506,9 @@ module.exports = require("path"); __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__(18); -/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(584); -/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(684); -/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(685); +/* harmony import */ var _clean__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(585); +/* harmony import */ var _run__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(685); +/* harmony import */ var _watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(686); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -2549,10 +2549,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _utils_link_project_executables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(34); -/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(498); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(499); -/* harmony import */ var _utils_project_checksums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(578); -/* harmony import */ var _utils_bootstrap_cache_file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(583); +/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(499); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(500); +/* harmony import */ var _utils_project_checksums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(579); +/* harmony import */ var _utils_bootstrap_cache_file__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(584); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -4516,7 +4516,7 @@ var repo_root_1 = __webpack_require__(421); exports.REPO_ROOT = repo_root_1.REPO_ROOT; var kbn_client_1 = __webpack_require__(449); exports.KbnClient = kbn_client_1.KbnClient; -tslib_1.__exportStar(__webpack_require__(491), exports); +tslib_1.__exportStar(__webpack_require__(492), exports); /***/ }), @@ -39996,11 +39996,11 @@ exports.uriencode = kbn_client_requester_1.uriencode; */ Object.defineProperty(exports, "__esModule", { value: true }); const kbn_client_requester_1 = __webpack_require__(451); -const kbn_client_status_1 = __webpack_require__(493); -const kbn_client_plugins_1 = __webpack_require__(494); -const kbn_client_version_1 = __webpack_require__(495); -const kbn_client_saved_objects_1 = __webpack_require__(496); -const kbn_client_ui_settings_1 = __webpack_require__(497); +const kbn_client_status_1 = __webpack_require__(494); +const kbn_client_plugins_1 = __webpack_require__(495); +const kbn_client_version_1 = __webpack_require__(496); +const kbn_client_saved_objects_1 = __webpack_require__(497); +const kbn_client_ui_settings_1 = __webpack_require__(498); class KbnClient { /** * Basic Kibana server client that implements common behaviors for talking @@ -40065,7 +40065,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = __webpack_require__(36); const url_1 = tslib_1.__importDefault(__webpack_require__(452)); const axios_1 = tslib_1.__importDefault(__webpack_require__(453)); -const axios_2 = __webpack_require__(491); +const axios_2 = __webpack_require__(492); const isConcliftOnGetError = (error) => { return (axios_2.isAxiosResponseError(error) && error.config.method === 'GET' && error.response.status === 409); }; @@ -40170,7 +40170,8 @@ module.exports = __webpack_require__(454); var utils = __webpack_require__(455); var bind = __webpack_require__(456); var Axios = __webpack_require__(458); -var defaults = __webpack_require__(459); +var mergeConfig = __webpack_require__(488); +var defaults = __webpack_require__(464); /** * Create an instance of Axios @@ -40199,19 +40200,19 @@ axios.Axios = Axios; // Factory for creating new instances axios.create = function create(instanceConfig) { - return createInstance(utils.merge(defaults, instanceConfig)); + return createInstance(mergeConfig(axios.defaults, instanceConfig)); }; // Expose Cancel & CancelToken -axios.Cancel = __webpack_require__(488); -axios.CancelToken = __webpack_require__(489); -axios.isCancel = __webpack_require__(485); +axios.Cancel = __webpack_require__(489); +axios.CancelToken = __webpack_require__(490); +axios.isCancel = __webpack_require__(463); // Expose all/spread axios.all = function all(promises) { return Promise.all(promises); }; -axios.spread = __webpack_require__(490); +axios.spread = __webpack_require__(491); module.exports = axios; @@ -40403,9 +40404,13 @@ function trim(str) { * * react-native: * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' */ function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { + if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || + navigator.product === 'NativeScript' || + navigator.product === 'NS')) { return false; } return ( @@ -40486,6 +40491,32 @@ function merge(/* obj1, obj2, obj3, ... */) { return result; } +/** + * Function equal to merge with the difference being that no reference + * to original objects is kept. + * + * @see merge + * @param {Object} obj1 Object to merge + * @returns {Object} Result of all merge properties + */ +function deepMerge(/* obj1, obj2, obj3, ... */) { + var result = {}; + function assignValue(val, key) { + if (typeof result[key] === 'object' && typeof val === 'object') { + result[key] = deepMerge(result[key], val); + } else if (typeof val === 'object') { + result[key] = deepMerge({}, val); + } else { + result[key] = val; + } + } + + for (var i = 0, l = arguments.length; i < l; i++) { + forEach(arguments[i], assignValue); + } + return result; +} + /** * Extends object a by mutably adding to it the properties of object b. * @@ -40524,6 +40555,7 @@ module.exports = { isStandardBrowserEnv: isStandardBrowserEnv, forEach: forEach, merge: merge, + deepMerge: deepMerge, extend: extend, trim: trim }; @@ -40571,10 +40603,11 @@ module.exports = function isBuffer (obj) { "use strict"; -var defaults = __webpack_require__(459); var utils = __webpack_require__(455); -var InterceptorManager = __webpack_require__(482); -var dispatchRequest = __webpack_require__(483); +var buildURL = __webpack_require__(459); +var InterceptorManager = __webpack_require__(460); +var dispatchRequest = __webpack_require__(461); +var mergeConfig = __webpack_require__(488); /** * Create a new instance of Axios @@ -40598,13 +40631,14 @@ Axios.prototype.request = function request(config) { /*eslint no-param-reassign:0*/ // Allow for axios('example/url'[, config]) a la fetch API if (typeof config === 'string') { - config = utils.merge({ - url: arguments[0] - }, arguments[1]); + config = arguments[1] || {}; + config.url = arguments[0]; + } else { + config = config || {}; } - config = utils.merge(defaults, {method: 'get'}, this.defaults, config); - config.method = config.method.toLowerCase(); + config = mergeConfig(this.defaults, config); + config.method = config.method ? config.method.toLowerCase() : 'get'; // Hook up interceptors middleware var chain = [dispatchRequest, undefined]; @@ -40625,6 +40659,11 @@ Axios.prototype.request = function request(config) { return promise; }; +Axios.prototype.getUri = function getUri(config) { + config = mergeConfig(this.defaults, config); + return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); +}; + // Provide aliases for supported request methods utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ @@ -40658,7 +40697,276 @@ module.exports = Axios; var utils = __webpack_require__(455); -var normalizeHeaderName = __webpack_require__(460); + +function encode(val) { + return encodeURIComponent(val). + replace(/%40/gi, '@'). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ +module.exports = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } else { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = JSON.stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + var hashmarkIndex = url.indexOf('#'); + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +}; + + +/***/ }), +/* 460 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(455); + +function InterceptorManager() { + this.handlers = []; +} + +/** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ +InterceptorManager.prototype.use = function use(fulfilled, rejected) { + this.handlers.push({ + fulfilled: fulfilled, + rejected: rejected + }); + return this.handlers.length - 1; +}; + +/** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + */ +InterceptorManager.prototype.eject = function eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } +}; + +/** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + */ +InterceptorManager.prototype.forEach = function forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); +}; + +module.exports = InterceptorManager; + + +/***/ }), +/* 461 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(455); +var transformData = __webpack_require__(462); +var isCancel = __webpack_require__(463); +var defaults = __webpack_require__(464); +var isAbsoluteURL = __webpack_require__(486); +var combineURLs = __webpack_require__(487); + +/** + * Throws a `Cancel` if cancellation has been requested. + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * @returns {Promise} The Promise to be fulfilled + */ +module.exports = function dispatchRequest(config) { + throwIfCancellationRequested(config); + + // Support baseURL config + if (config.baseURL && !isAbsoluteURL(config.url)) { + config.url = combineURLs(config.baseURL, config.url); + } + + // Ensure headers exist + config.headers = config.headers || {}; + + // Transform request data + config.data = transformData( + config.data, + config.headers, + config.transformRequest + ); + + // Flatten headers + config.headers = utils.merge( + config.headers.common || {}, + config.headers[config.method] || {}, + config.headers || {} + ); + + utils.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + function cleanHeaderConfig(method) { + delete config.headers[method]; + } + ); + + var adapter = config.adapter || defaults.adapter; + + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = transformData( + response.data, + response.headers, + config.transformResponse + ); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData( + reason.response.data, + reason.response.headers, + config.transformResponse + ); + } + } + + return Promise.reject(reason); + }); +}; + + +/***/ }), +/* 462 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(455); + +/** + * Transform the data for a request or a response + * + * @param {Object|String} data The data to be transformed + * @param {Array} headers The headers for the request or response + * @param {Array|Function} fns A single function or Array of functions + * @returns {*} The resulting transformed data + */ +module.exports = function transformData(data, headers, fns) { + /*eslint no-param-reassign:0*/ + utils.forEach(fns, function transform(fn) { + data = fn(data, headers); + }); + + return data; +}; + + +/***/ }), +/* 463 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); +}; + + +/***/ }), +/* 464 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(455); +var normalizeHeaderName = __webpack_require__(465); var DEFAULT_CONTENT_TYPE = { 'Content-Type': 'application/x-www-form-urlencoded' @@ -40672,12 +40980,13 @@ function setContentTypeIfUnset(headers, value) { function getDefaultAdapter() { var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = __webpack_require__(461); - } else if (typeof process !== 'undefined') { + // Only Node.JS has a process variable that is of [[Class]] process + if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { // For node use HTTP adapter - adapter = __webpack_require__(469); + adapter = __webpack_require__(466); + } else if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = __webpack_require__(482); } return adapter; } @@ -40686,6 +40995,7 @@ var defaults = { adapter: getDefaultAdapter(), transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Accept'); normalizeHeaderName(headers, 'Content-Type'); if (utils.isFormData(data) || utils.isArrayBuffer(data) || @@ -40754,7 +41064,7 @@ module.exports = defaults; /***/ }), -/* 460 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40772,334 +41082,6 @@ module.exports = function normalizeHeaderName(headers, normalizedName) { }; -/***/ }), -/* 461 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(455); -var settle = __webpack_require__(462); -var buildURL = __webpack_require__(465); -var parseHeaders = __webpack_require__(466); -var isURLSameOrigin = __webpack_require__(467); -var createError = __webpack_require__(463); - -module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password || ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - // Listen for ready state - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - var cookies = __webpack_require__(468); - - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (config.withCredentials) { - request.withCredentials = true; - } - - // Add responseType to request if needed - if (config.responseType) { - try { - request.responseType = config.responseType; - } catch (e) { - // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. - // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. - if (config.responseType !== 'json') { - throw e; - } - } - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (!request) { - return; - } - - request.abort(); - reject(cancel); - // Clean up request - request = null; - }); - } - - if (requestData === undefined) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); -}; - - -/***/ }), -/* 462 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var createError = __webpack_require__(463); - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ -module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - // Note: status is not exposed by XDomainRequest - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(createError( - 'Request failed with status code ' + response.status, - response.config, - null, - response.request, - response - )); - } -}; - - -/***/ }), -/* 463 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var enhanceError = __webpack_require__(464); - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ -module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); -}; - - -/***/ }), -/* 464 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Update an Error with the specified config, error code, and response. - * - * @param {Error} error The error to update. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The error. - */ -module.exports = function enhanceError(error, config, code, request, response) { - error.config = config; - if (code) { - error.code = code; - } - error.request = request; - error.response = response; - return error; -}; - - -/***/ }), -/* 465 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(455); - -function encode(val) { - return encodeURIComponent(val). - replace(/%40/gi, '@'). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ -module.exports = function buildURL(url, params, paramsSerializer) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - var serializedParams; - if (paramsSerializer) { - serializedParams = paramsSerializer(params); - } else if (utils.isURLSearchParams(params)) { - serializedParams = params.toString(); - } else { - var parts = []; - - utils.forEach(params, function serialize(val, key) { - if (val === null || typeof val === 'undefined') { - return; - } - - if (utils.isArray(val)) { - key = key + '[]'; - } else { - val = [val]; - } - - utils.forEach(val, function parseValue(v) { - if (utils.isDate(v)) { - v = v.toISOString(); - } else if (utils.isObject(v)) { - v = JSON.stringify(v); - } - parts.push(encode(key) + '=' + encode(v)); - }); - }); - - serializedParams = parts.join('&'); - } - - if (serializedParams) { - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -}; - - /***/ }), /* 466 */ /***/ (function(module, exports, __webpack_require__) { @@ -41108,203 +41090,8 @@ module.exports = function buildURL(url, params, paramsSerializer) { var utils = __webpack_require__(455); - -// Headers whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]; - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ -module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; -}; - - -/***/ }), -/* 467 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(455); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() -); - - -/***/ }), -/* 468 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(455); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() -); - - -/***/ }), -/* 469 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(455); -var settle = __webpack_require__(462); -var buildURL = __webpack_require__(465); +var settle = __webpack_require__(467); +var buildURL = __webpack_require__(459); var http = __webpack_require__(470); var https = __webpack_require__(471); var httpFollow = __webpack_require__(472).http; @@ -41312,15 +41099,25 @@ var httpsFollow = __webpack_require__(472).https; var url = __webpack_require__(452); var zlib = __webpack_require__(480); var pkg = __webpack_require__(481); -var createError = __webpack_require__(463); -var enhanceError = __webpack_require__(464); +var createError = __webpack_require__(468); +var enhanceError = __webpack_require__(469); + +var isHttps = /https:?/; /*eslint consistent-return:0*/ module.exports = function httpAdapter(config) { - return new Promise(function dispatchHttpRequest(resolve, reject) { + return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { + var timer; + var resolve = function resolve(value) { + clearTimeout(timer); + resolvePromise(value); + }; + var reject = function reject(value) { + clearTimeout(timer); + rejectPromise(value); + }; var data = config.data; var headers = config.headers; - var timer; // Set User-Agent (required by some servers) // Only set header if it hasn't been set in config @@ -41333,9 +41130,9 @@ module.exports = function httpAdapter(config) { if (Buffer.isBuffer(data)) { // Nothing to do... } else if (utils.isArrayBuffer(data)) { - data = new Buffer(new Uint8Array(data)); + data = Buffer.from(new Uint8Array(data)); } else if (utils.isString(data)) { - data = new Buffer(data, 'utf-8'); + data = Buffer.from(data, 'utf-8'); } else { return reject(createError( 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', @@ -41370,12 +41167,12 @@ module.exports = function httpAdapter(config) { delete headers.Authorization; } - var isHttps = protocol === 'https:'; - var agent = isHttps ? config.httpsAgent : config.httpAgent; + var isHttpsRequest = isHttps.test(protocol); + var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; var options = { path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''), - method: config.method, + method: config.method.toUpperCase(), headers: headers, agent: agent, auth: auth @@ -41394,17 +41191,45 @@ module.exports = function httpAdapter(config) { var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; if (proxyUrl) { var parsedProxyUrl = url.parse(proxyUrl); - proxy = { - host: parsedProxyUrl.hostname, - port: parsedProxyUrl.port - }; + var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; + var shouldProxy = true; + + if (noProxyEnv) { + var noProxy = noProxyEnv.split(',').map(function trim(s) { + return s.trim(); + }); + + shouldProxy = !noProxy.some(function proxyMatch(proxyElement) { + if (!proxyElement) { + return false; + } + if (proxyElement === '*') { + return true; + } + if (proxyElement[0] === '.' && + parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement && + proxyElement.match(/\./g).length === parsed.hostname.match(/\./g).length) { + return true; + } + + return parsed.hostname === proxyElement; + }); + } - if (parsedProxyUrl.auth) { - var proxyUrlAuth = parsedProxyUrl.auth.split(':'); - proxy.auth = { - username: proxyUrlAuth[0], - password: proxyUrlAuth[1] + + if (shouldProxy) { + proxy = { + host: parsedProxyUrl.hostname, + port: parsedProxyUrl.port }; + + if (parsedProxyUrl.auth) { + var proxyUrlAuth = parsedProxyUrl.auth.split(':'); + proxy.auth = { + username: proxyUrlAuth[0], + password: proxyUrlAuth[1] + }; + } } } } @@ -41418,21 +41243,22 @@ module.exports = function httpAdapter(config) { // Basic proxy authorization if (proxy.auth) { - var base64 = new Buffer(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); + var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); options.headers['Proxy-Authorization'] = 'Basic ' + base64; } } var transport; + var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true); if (config.transport) { transport = config.transport; } else if (config.maxRedirects === 0) { - transport = isHttps ? https : http; + transport = isHttpsProxy ? https : http; } else { if (config.maxRedirects) { options.maxRedirects = config.maxRedirects; } - transport = isHttps ? httpsFollow : httpFollow; + transport = isHttpsProxy ? httpsFollow : httpFollow; } if (config.maxContentLength && config.maxContentLength > -1) { @@ -41443,10 +41269,6 @@ module.exports = function httpAdapter(config) { var req = transport.request(options, function handleResponse(res) { if (req.aborted) return; - // Response has been received so kill timer that handles request timeout - clearTimeout(timer); - timer = null; - // uncompress the response body transparently if required var stream = res; switch (res.headers['content-encoding']) { @@ -41455,7 +41277,7 @@ module.exports = function httpAdapter(config) { case 'compress': case 'deflate': // add the unzipper to the body stream processing pipeline - stream = stream.pipe(zlib.createUnzip()); + stream = (res.statusCode === 204) ? stream : stream.pipe(zlib.createUnzip()); // remove the content-encoding in order to not confuse downstream operations delete res.headers['content-encoding']; @@ -41497,7 +41319,7 @@ module.exports = function httpAdapter(config) { stream.on('end', function handleStreamEnd() { var responseData = Buffer.concat(responseBuffer); if (config.responseType !== 'arraybuffer') { - responseData = responseData.toString('utf8'); + responseData = responseData.toString(config.responseEncoding); } response.data = responseData; @@ -41513,7 +41335,7 @@ module.exports = function httpAdapter(config) { }); // Handle request timeout - if (config.timeout && !timer) { + if (config.timeout) { timer = setTimeout(function handleRequestTimeout() { req.abort(); reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req)); @@ -41532,7 +41354,9 @@ module.exports = function httpAdapter(config) { // Send the request if (utils.isStream(data)) { - data.pipe(req); + data.on('error', function handleStreamError(err) { + reject(enhanceError(err, config, null, req)); + }).pipe(req); } else { req.end(data); } @@ -41541,36 +41365,142 @@ module.exports = function httpAdapter(config) { /***/ }), -/* 470 */ -/***/ (function(module, exports) { - -module.exports = require("http"); - -/***/ }), -/* 471 */ -/***/ (function(module, exports) { - -module.exports = require("https"); - -/***/ }), -/* 472 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { -var url = __webpack_require__(452); -var http = __webpack_require__(470); -var https = __webpack_require__(471); -var assert = __webpack_require__(30); -var Writable = __webpack_require__(27).Writable; -var debug = __webpack_require__(473)("follow-redirects"); +"use strict"; -// RFC7231§4.2.1: Of the request methods defined by this specification, -// the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe. -var SAFE_METHODS = { GET: true, HEAD: true, OPTIONS: true, TRACE: true }; -// Create handlers that pass events from native requests -var eventHandlers = Object.create(null); -["abort", "aborted", "error", "socket", "timeout"].forEach(function (event) { - eventHandlers[event] = function (arg) { +var createError = __webpack_require__(468); + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + */ +module.exports = function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + if (!validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(createError( + 'Request failed with status code ' + response.status, + response.config, + null, + response.request, + response + )); + } +}; + + +/***/ }), +/* 468 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var enhanceError = __webpack_require__(469); + +/** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The created error. + */ +module.exports = function createError(message, config, code, request, response) { + var error = new Error(message); + return enhanceError(error, config, code, request, response); +}; + + +/***/ }), +/* 469 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Update an Error with the specified config, error code, and response. + * + * @param {Error} error The error to update. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The error. + */ +module.exports = function enhanceError(error, config, code, request, response) { + error.config = config; + if (code) { + error.code = code; + } + + error.request = request; + error.response = response; + error.isAxiosError = true; + + error.toJSON = function() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: this.config, + code: this.code + }; + }; + return error; +}; + + +/***/ }), +/* 470 */ +/***/ (function(module, exports) { + +module.exports = require("http"); + +/***/ }), +/* 471 */ +/***/ (function(module, exports) { + +module.exports = require("https"); + +/***/ }), +/* 472 */ +/***/ (function(module, exports, __webpack_require__) { + +var url = __webpack_require__(452); +var http = __webpack_require__(470); +var https = __webpack_require__(471); +var assert = __webpack_require__(30); +var Writable = __webpack_require__(27).Writable; +var debug = __webpack_require__(473)("follow-redirects"); + +// RFC7231§4.2.1: Of the request methods defined by this specification, +// the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe. +var SAFE_METHODS = { GET: true, HEAD: true, OPTIONS: true, TRACE: true }; + +// Create handlers that pass events from native requests +var eventHandlers = Object.create(null); +["abort", "aborted", "error", "socket", "timeout"].forEach(function (event) { + eventHandlers[event] = function (arg) { this._redirectable.emit(event, arg); }; }); @@ -42839,7 +42769,7 @@ module.exports = require("zlib"); /* 481 */ /***/ (function(module) { -module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.18.1\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test && bundlesize\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://github.com/axios/axios\",\"devDependencies\":{\"bundlesize\":\"^0.5.7\",\"coveralls\":\"^2.11.9\",\"es6-promise\":\"^4.0.5\",\"grunt\":\"^1.0.1\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.0.0\",\"grunt-contrib-nodeunit\":\"^1.0.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^19.0.0\",\"grunt-karma\":\"^2.0.0\",\"grunt-ts\":\"^6.0.0-beta.3\",\"grunt-webpack\":\"^1.0.18\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^1.3.0\",\"karma-chrome-launcher\":\"^2.0.0\",\"karma-coverage\":\"^1.0.0\",\"karma-firefox-launcher\":\"^1.0.0\",\"karma-jasmine\":\"^1.0.2\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-opera-launcher\":\"^1.0.0\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^1.1.0\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.7\",\"karma-webpack\":\"^1.7.0\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"sinon\":\"^1.17.4\",\"webpack\":\"^1.13.1\",\"webpack-dev-server\":\"^1.14.1\",\"url-search-params\":\"^0.6.1\",\"typescript\":\"^2.0.3\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"1.5.10\",\"is-buffer\":\"^2.0.2\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}]}"); +module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.19.0\",\"description\":\"Promise based HTTP client for the browser and node.js\",\"main\":\"index.js\",\"scripts\":{\"test\":\"grunt test && bundlesize\",\"start\":\"node ./sandbox/server.js\",\"build\":\"NODE_ENV=production grunt build\",\"preversion\":\"npm test\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\",\"postversion\":\"git push && git push --tags\",\"examples\":\"node ./examples/server.js\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"fix\":\"eslint --fix lib/**/*.js\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/axios/axios.git\"},\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"author\":\"Matt Zabriskie\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"homepage\":\"https://github.com/axios/axios\",\"devDependencies\":{\"bundlesize\":\"^0.17.0\",\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.0.2\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^20.1.0\",\"grunt-karma\":\"^2.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^1.0.18\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^1.3.0\",\"karma-chrome-launcher\":\"^2.2.0\",\"karma-coverage\":\"^1.1.1\",\"karma-firefox-launcher\":\"^1.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-opera-launcher\":\"^1.0.0\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^1.2.0\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.7\",\"karma-webpack\":\"^1.7.0\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^5.2.0\",\"sinon\":\"^4.5.0\",\"typescript\":\"^2.8.1\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^1.13.1\",\"webpack-dev-server\":\"^1.14.1\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"typings\":\"./index.d.ts\",\"dependencies\":{\"follow-redirects\":\"1.5.10\",\"is-buffer\":\"^2.0.2\"},\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}]}"); /***/ }), /* 482 */ @@ -42849,152 +42779,181 @@ module.exports = JSON.parse("{\"name\":\"axios\",\"version\":\"0.18.1\",\"descri var utils = __webpack_require__(455); +var settle = __webpack_require__(467); +var buildURL = __webpack_require__(459); +var parseHeaders = __webpack_require__(483); +var isURLSameOrigin = __webpack_require__(484); +var createError = __webpack_require__(468); -function InterceptorManager() { - this.handlers = []; -} +module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; -/** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ -InterceptorManager.prototype.use = function use(fulfilled, rejected) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected - }); - return this.handlers.length - 1; -}; + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } -/** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ -InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } -}; + var request = new XMLHttpRequest(); -/** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ -InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); } - }); -}; -module.exports = InterceptorManager; + request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); + // Set the request timeout in MS + request.timeout = config.timeout; -/***/ }), -/* 483 */ -/***/ (function(module, exports, __webpack_require__) { + // Listen for ready state + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } -"use strict"; + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config, + request: request + }; -var utils = __webpack_require__(455); -var transformData = __webpack_require__(484); -var isCancel = __webpack_require__(485); -var defaults = __webpack_require__(459); -var isAbsoluteURL = __webpack_require__(486); -var combineURLs = __webpack_require__(487); + settle(resolve, reject, response); -/** - * Throws a `Cancel` if cancellation has been requested. - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } -} + // Clean up request + request = null; + }; -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ -module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } - // Support baseURL config - if (config.baseURL && !isAbsoluteURL(config.url)) { - config.url = combineURLs(config.baseURL, config.url); - } + reject(createError('Request aborted', config, 'ECONNABORTED', request)); - // Ensure headers exist - config.headers = config.headers || {}; + // Clean up request + request = null; + }; - // Transform request data - config.data = transformData( - config.data, - config.headers, - config.transformRequest - ); + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers || {} - ); + // Clean up request + request = null; + }; - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); + // Handle timeout + request.ontimeout = function handleTimeout() { + reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', + request)); - var adapter = config.adapter || defaults.adapter; + // Clean up request + request = null; + }; - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + var cookies = __webpack_require__(485); - // Transform response data - response.data = transformData( - response.data, - response.headers, - config.transformResponse - ); + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? + cookies.read(config.xsrfCookieName) : + undefined; - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData( - reason.response.data, - reason.response.headers, - config.transformResponse - ); + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (config.withCredentials) { + request.withCredentials = true; + } + + // Add responseType to request if needed + if (config.responseType) { + try { + request.responseType = config.responseType; + } catch (e) { + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { + throw e; + } } } - return Promise.reject(reason); + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (!request) { + return; + } + + request.abort(); + reject(cancel); + // Clean up request + request = null; + }); + } + + if (requestData === undefined) { + requestData = null; + } + + // Send the request + request.send(requestData); }); }; /***/ }), -/* 484 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43002,24 +42961,132 @@ module.exports = function dispatchRequest(config) { var utils = __webpack_require__(455); +// Headers whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +var ignoreDuplicateOf = [ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]; + /** - * Transform the data for a request or a response + * Parse headers into an object * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object */ -module.exports = function transformData(data, headers, fns) { - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn(data, headers); +module.exports = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { return parsed; } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { + return; + } + if (key === 'set-cookie') { + parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + } }); - return data; + return parsed; }; +/***/ }), +/* 484 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(455); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + var href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })() +); + + /***/ }), /* 485 */ /***/ (function(module, exports, __webpack_require__) { @@ -43027,9 +43094,57 @@ module.exports = function transformData(data, headers, fns) { "use strict"; -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; +var utils = __webpack_require__(455); + +module.exports = ( + utils.isStandardBrowserEnv() ? + + // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); + + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); + } + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : + + // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() +); /***/ }), @@ -43081,6 +43196,64 @@ module.exports = function combineURLs(baseURL, relativeURL) { "use strict"; +var utils = __webpack_require__(455); + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * @returns {Object} New object resulting from merging config2 to config1 + */ +module.exports = function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + var config = {}; + + utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) { + if (typeof config2[prop] !== 'undefined') { + config[prop] = config2[prop]; + } + }); + + utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) { + if (utils.isObject(config2[prop])) { + config[prop] = utils.deepMerge(config1[prop], config2[prop]); + } else if (typeof config2[prop] !== 'undefined') { + config[prop] = config2[prop]; + } else if (utils.isObject(config1[prop])) { + config[prop] = utils.deepMerge(config1[prop]); + } else if (typeof config1[prop] !== 'undefined') { + config[prop] = config1[prop]; + } + }); + + utils.forEach([ + 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', + 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', + 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', + 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken', + 'socketPath' + ], function defaultToConfig2(prop) { + if (typeof config2[prop] !== 'undefined') { + config[prop] = config2[prop]; + } else if (typeof config1[prop] !== 'undefined') { + config[prop] = config1[prop]; + } + }); + + return config; +}; + + +/***/ }), +/* 489 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + /** * A `Cancel` is an object that is thrown when an operation is canceled. * @@ -43101,13 +43274,13 @@ module.exports = Cancel; /***/ }), -/* 489 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Cancel = __webpack_require__(488); +var Cancel = __webpack_require__(489); /** * A `CancelToken` is an object that can be used to request cancellation of an operation. @@ -43165,7 +43338,7 @@ module.exports = CancelToken; /***/ }), -/* 490 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43199,7 +43372,7 @@ module.exports = function spread(callback) { /***/ }), -/* 491 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43224,11 +43397,11 @@ module.exports = function spread(callback) { */ Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = __webpack_require__(36); -tslib_1.__exportStar(__webpack_require__(492), exports); +tslib_1.__exportStar(__webpack_require__(493), exports); /***/ }), -/* 492 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43261,7 +43434,7 @@ exports.isAxiosResponseError = (error) => { /***/ }), -/* 493 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43310,7 +43483,7 @@ exports.KbnClientStatus = KbnClientStatus; /***/ }), -/* 494 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43360,7 +43533,7 @@ exports.KbnClientPlugins = KbnClientPlugins; /***/ }), -/* 495 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43401,7 +43574,7 @@ exports.KbnClientVersion = KbnClientVersion; /***/ }), -/* 496 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43510,7 +43683,7 @@ exports.KbnClientSavedObjects = KbnClientSavedObjects; /***/ }), -/* 497 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43610,7 +43783,7 @@ exports.KbnClientUiSettings = KbnClientUiSettings; /***/ }), -/* 498 */ +/* 499 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -43676,7 +43849,7 @@ async function parallelize(items, fn, concurrency = 4) { } /***/ }), -/* 499 */ +/* 500 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -43685,15 +43858,15 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildProjectGraph", function() { return buildProjectGraph; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "topologicallyBatchProjects", function() { return topologicallyBatchProjects; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "includeTransitiveProjects", function() { return includeTransitiveProjects; }); -/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(500); +/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(501); /* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(glob__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); /* 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__(29); /* 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__(513); -/* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(514); -/* harmony import */ var _workspaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(576); +/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(514); +/* harmony import */ var _project__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(515); +/* harmony import */ var _workspaces__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(577); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -43892,7 +44065,7 @@ function includeTransitiveProjects(subsetOfProjects, allProjects, { } /***/ }), -/* 500 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { // Approach: @@ -43938,21 +44111,21 @@ function includeTransitiveProjects(subsetOfProjects, allProjects, { module.exports = glob var fs = __webpack_require__(23) -var rp = __webpack_require__(501) -var minimatch = __webpack_require__(503) +var rp = __webpack_require__(502) +var minimatch = __webpack_require__(504) var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__(507) +var inherits = __webpack_require__(508) var EE = __webpack_require__(379).EventEmitter var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(509) -var globSync = __webpack_require__(510) -var common = __webpack_require__(511) +var isAbsolute = __webpack_require__(510) +var globSync = __webpack_require__(511) +var common = __webpack_require__(512) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp -var inflight = __webpack_require__(512) +var inflight = __webpack_require__(513) var util = __webpack_require__(29) var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored @@ -44688,7 +44861,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { /***/ }), -/* 501 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { module.exports = realpath @@ -44704,7 +44877,7 @@ var origRealpathSync = fs.realpathSync var version = process.version var ok = /^v[0-5]\./.test(version) -var old = __webpack_require__(502) +var old = __webpack_require__(503) function newError (er) { return er && er.syscall === 'realpath' && ( @@ -44760,7 +44933,7 @@ function unmonkeypatch () { /***/ }), -/* 502 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -45069,7 +45242,7 @@ exports.realpath = function realpath(p, cache, cb) { /***/ }), -/* 503 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { module.exports = minimatch @@ -45081,7 +45254,7 @@ try { } catch (er) {} var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __webpack_require__(504) +var expand = __webpack_require__(505) var plTypes = { '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, @@ -45998,11 +46171,11 @@ function regExpEscape (s) { /***/ }), -/* 504 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { -var concatMap = __webpack_require__(505); -var balanced = __webpack_require__(506); +var concatMap = __webpack_require__(506); +var balanced = __webpack_require__(507); module.exports = expandTop; @@ -46205,7 +46378,7 @@ function expand(str, isTop) { /***/ }), -/* 505 */ +/* 506 */ /***/ (function(module, exports) { module.exports = function (xs, fn) { @@ -46224,7 +46397,7 @@ var isArray = Array.isArray || function (xs) { /***/ }), -/* 506 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -46290,7 +46463,7 @@ function range(a, b, str) { /***/ }), -/* 507 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { try { @@ -46300,12 +46473,12 @@ try { module.exports = util.inherits; } catch (e) { /* istanbul ignore next */ - module.exports = __webpack_require__(508); + module.exports = __webpack_require__(509); } /***/ }), -/* 508 */ +/* 509 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { @@ -46338,7 +46511,7 @@ if (typeof Object.create === 'function') { /***/ }), -/* 509 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -46365,22 +46538,22 @@ module.exports.win32 = win32; /***/ }), -/* 510 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { module.exports = globSync globSync.GlobSync = GlobSync var fs = __webpack_require__(23) -var rp = __webpack_require__(501) -var minimatch = __webpack_require__(503) +var rp = __webpack_require__(502) +var minimatch = __webpack_require__(504) var Minimatch = minimatch.Minimatch -var Glob = __webpack_require__(500).Glob +var Glob = __webpack_require__(501).Glob var util = __webpack_require__(29) var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(509) -var common = __webpack_require__(511) +var isAbsolute = __webpack_require__(510) +var common = __webpack_require__(512) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts @@ -46857,7 +47030,7 @@ GlobSync.prototype._makeAbs = function (f) { /***/ }), -/* 511 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { exports.alphasort = alphasort @@ -46875,8 +47048,8 @@ function ownProp (obj, field) { } var path = __webpack_require__(16) -var minimatch = __webpack_require__(503) -var isAbsolute = __webpack_require__(509) +var minimatch = __webpack_require__(504) +var isAbsolute = __webpack_require__(510) var Minimatch = minimatch.Minimatch function alphasorti (a, b) { @@ -47103,7 +47276,7 @@ function childrenIgnored (self, path) { /***/ }), -/* 512 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { var wrappy = __webpack_require__(385) @@ -47163,7 +47336,7 @@ function slice (args) { /***/ }), -/* 513 */ +/* 514 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -47196,7 +47369,7 @@ class CliError extends Error { } /***/ }), -/* 514 */ +/* 515 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -47210,10 +47383,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(513); +/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(514); /* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(34); -/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(515); -/* harmony import */ var _scripts__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(561); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(516); +/* harmony import */ var _scripts__WEBPACK_IMPORTED_MODULE_7__ = __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; } @@ -47444,7 +47617,7 @@ function normalizePath(path) { } /***/ }), -/* 515 */ +/* 516 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -47452,9 +47625,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readPackageJson", function() { return readPackageJson; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "writePackageJson", function() { return writePackageJson; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLinkDependency", function() { return isLinkDependency; }); -/* harmony import */ var read_pkg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(516); +/* harmony import */ var read_pkg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(517); /* 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__(542); +/* harmony import */ var write_pkg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(543); /* harmony import */ var write_pkg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(write_pkg__WEBPACK_IMPORTED_MODULE_1__); /* * Licensed to Elasticsearch B.V. under one or more contributor @@ -47488,7 +47661,7 @@ function writePackageJson(path, json) { const isLinkDependency = depVersion => depVersion.startsWith('link:'); /***/ }), -/* 516 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47496,7 +47669,7 @@ const isLinkDependency = depVersion => depVersion.startsWith('link:'); const {promisify} = __webpack_require__(29); const fs = __webpack_require__(23); const path = __webpack_require__(16); -const parseJson = __webpack_require__(517); +const parseJson = __webpack_require__(518); const readFileAsync = promisify(fs.readFile); @@ -47511,7 +47684,7 @@ module.exports = async options => { const json = parseJson(await readFileAsync(filePath, 'utf8')); if (options.normalize) { - __webpack_require__(518)(json); + __webpack_require__(519)(json); } return json; @@ -47528,7 +47701,7 @@ module.exports.sync = options => { const json = parseJson(fs.readFileSync(filePath, 'utf8')); if (options.normalize) { - __webpack_require__(518)(json); + __webpack_require__(519)(json); } return json; @@ -47536,7 +47709,7 @@ module.exports.sync = options => { /***/ }), -/* 517 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -47593,15 +47766,15 @@ module.exports = (string, reviver, filename) => { /***/ }), -/* 518 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { module.exports = normalize -var fixer = __webpack_require__(519) +var fixer = __webpack_require__(520) normalize.fixer = fixer -var makeWarning = __webpack_require__(540) +var makeWarning = __webpack_require__(541) var fieldsToFix = ['name','version','description','repository','modules','scripts' ,'files','bin','man','bugs','keywords','readme','homepage','license'] @@ -47638,17 +47811,17 @@ function ucFirst (string) { /***/ }), -/* 519 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { -var semver = __webpack_require__(520) -var validateLicense = __webpack_require__(521); -var hostedGitInfo = __webpack_require__(526) -var isBuiltinModule = __webpack_require__(529).isCore +var semver = __webpack_require__(521) +var validateLicense = __webpack_require__(522); +var hostedGitInfo = __webpack_require__(527) +var isBuiltinModule = __webpack_require__(530).isCore var depTypes = ["dependencies","devDependencies","optionalDependencies"] -var extractDescription = __webpack_require__(538) +var extractDescription = __webpack_require__(539) var url = __webpack_require__(452) -var typos = __webpack_require__(539) +var typos = __webpack_require__(540) var fixer = module.exports = { // default warning function @@ -48062,7 +48235,7 @@ function bugsTypos(bugs, warn) { /***/ }), -/* 520 */ +/* 521 */ /***/ (function(module, exports) { exports = module.exports = SemVer @@ -49551,11 +49724,11 @@ function coerce (version) { /***/ }), -/* 521 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { -var parse = __webpack_require__(522); -var correct = __webpack_require__(524); +var parse = __webpack_require__(523); +var correct = __webpack_require__(525); var genericWarning = ( 'license should be ' + @@ -49641,10 +49814,10 @@ module.exports = function(argument) { /***/ }), -/* 522 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { -var parser = __webpack_require__(523).parser +var parser = __webpack_require__(524).parser module.exports = function (argument) { return parser.parse(argument) @@ -49652,7 +49825,7 @@ module.exports = function (argument) { /***/ }), -/* 523 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {/* parser generated by jison 0.4.17 */ @@ -51016,10 +51189,10 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)(module))) /***/ }), -/* 524 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { -var licenseIDs = __webpack_require__(525); +var licenseIDs = __webpack_require__(526); function valid(string) { return licenseIDs.indexOf(string) > -1; @@ -51259,20 +51432,20 @@ module.exports = function(identifier) { /***/ }), -/* 525 */ +/* 526 */ /***/ (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\"]"); /***/ }), -/* 526 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var url = __webpack_require__(452) -var gitHosts = __webpack_require__(527) -var GitHost = module.exports = __webpack_require__(528) +var gitHosts = __webpack_require__(528) +var GitHost = module.exports = __webpack_require__(529) var protocolToRepresentationMap = { 'git+ssh': 'sshurl', @@ -51393,7 +51566,7 @@ function parseGitUrl (giturl) { /***/ }), -/* 527 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51468,12 +51641,12 @@ Object.keys(gitHosts).forEach(function (name) { /***/ }), -/* 528 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var gitHosts = __webpack_require__(527) +var gitHosts = __webpack_require__(528) var extend = Object.assign || __webpack_require__(29)._extend var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) { @@ -51589,21 +51762,21 @@ GitHost.prototype.toString = function (opts) { /***/ }), -/* 529 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(530); -var async = __webpack_require__(532); +var core = __webpack_require__(531); +var async = __webpack_require__(533); async.core = core; async.isCore = function isCore(x) { return core[x]; }; -async.sync = __webpack_require__(537); +async.sync = __webpack_require__(538); exports = async; module.exports = async; /***/ }), -/* 530 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; @@ -51650,7 +51823,7 @@ function versionIncluded(specifierValue) { return matchesRange(specifierValue); } -var data = __webpack_require__(531); +var data = __webpack_require__(532); var core = {}; for (var mod in data) { // eslint-disable-line no-restricted-syntax @@ -51662,21 +51835,21 @@ module.exports = core; /***/ }), -/* 531 */ +/* 532 */ /***/ (function(module) { module.exports = JSON.parse("{\"assert\":true,\"async_hooks\":\">= 8\",\"buffer_ieee754\":\"< 0.9.7\",\"buffer\":true,\"child_process\":true,\"cluster\":true,\"console\":true,\"constants\":true,\"crypto\":true,\"_debugger\":\"< 8\",\"dgram\":true,\"dns\":true,\"domain\":true,\"events\":true,\"freelist\":\"< 6\",\"fs\":true,\"fs/promises\":\">= 10 && < 10.1\",\"_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\",\"node-inspect/lib/internal/inspect_client\":\">= 7.6.0\",\"node-inspect/lib/internal/inspect_repl\":\">= 7.6.0\",\"os\":true,\"path\":true,\"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,\"string_decoder\":true,\"sys\":true,\"timers\":true,\"_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,\"v8/tools/arguments\":\">= 10\",\"v8/tools/codemap\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8/tools/consarray\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8/tools/csvparser\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8/tools/logreader\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8/tools/profile_view\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8/tools/splaytree\":[\">= 4.4.0 && < 5\",\">= 5.2.0\"],\"v8\":\">= 1\",\"vm\":true,\"worker_threads\":\">= 11.7\",\"zlib\":true}"); /***/ }), -/* 532 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(530); +var core = __webpack_require__(531); var fs = __webpack_require__(23); var path = __webpack_require__(16); -var caller = __webpack_require__(533); -var nodeModulesPaths = __webpack_require__(534); -var normalizeOptions = __webpack_require__(536); +var caller = __webpack_require__(534); +var nodeModulesPaths = __webpack_require__(535); +var normalizeOptions = __webpack_require__(537); var defaultIsFile = function isFile(file, cb) { fs.stat(file, function (err, stat) { @@ -51903,7 +52076,7 @@ module.exports = function resolve(x, options, callback) { /***/ }), -/* 533 */ +/* 534 */ /***/ (function(module, exports) { module.exports = function () { @@ -51917,11 +52090,11 @@ module.exports = function () { /***/ }), -/* 534 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { var path = __webpack_require__(16); -var parse = path.parse || __webpack_require__(535); +var parse = path.parse || __webpack_require__(536); var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { var prefix = '/'; @@ -51965,7 +52138,7 @@ module.exports = function nodeModulesPaths(start, opts, request) { /***/ }), -/* 535 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52065,7 +52238,7 @@ module.exports.win32 = win32.parse; /***/ }), -/* 536 */ +/* 537 */ /***/ (function(module, exports) { module.exports = function (x, opts) { @@ -52081,15 +52254,15 @@ module.exports = function (x, opts) { /***/ }), -/* 537 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { -var core = __webpack_require__(530); +var core = __webpack_require__(531); var fs = __webpack_require__(23); var path = __webpack_require__(16); -var caller = __webpack_require__(533); -var nodeModulesPaths = __webpack_require__(534); -var normalizeOptions = __webpack_require__(536); +var caller = __webpack_require__(534); +var nodeModulesPaths = __webpack_require__(535); +var normalizeOptions = __webpack_require__(537); var defaultIsFile = function isFile(file) { try { @@ -52241,7 +52414,7 @@ module.exports = function (x, options) { /***/ }), -/* 538 */ +/* 539 */ /***/ (function(module, exports) { module.exports = extractDescription @@ -52261,17 +52434,17 @@ function extractDescription (d) { /***/ }), -/* 539 */ +/* 540 */ /***/ (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\"}}"); /***/ }), -/* 540 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(29) -var messages = __webpack_require__(541) +var messages = __webpack_require__(542) module.exports = function() { var args = Array.prototype.slice.call(arguments, 0) @@ -52296,20 +52469,20 @@ function makeTypoWarning (providedName, probableName, field) { /***/ }), -/* 541 */ +/* 542 */ /***/ (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.\"}"); /***/ }), -/* 542 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const writeJsonFile = __webpack_require__(543); -const sortKeys = __webpack_require__(555); +const writeJsonFile = __webpack_require__(544); +const sortKeys = __webpack_require__(556); const dependencyKeys = new Set([ 'dependencies', @@ -52374,18 +52547,18 @@ module.exports.sync = (filePath, data, options) => { /***/ }), -/* 543 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const fs = __webpack_require__(544); -const writeFileAtomic = __webpack_require__(548); -const sortKeys = __webpack_require__(555); -const makeDir = __webpack_require__(557); -const pify = __webpack_require__(559); -const detectIndent = __webpack_require__(560); +const fs = __webpack_require__(545); +const writeFileAtomic = __webpack_require__(549); +const sortKeys = __webpack_require__(556); +const makeDir = __webpack_require__(558); +const pify = __webpack_require__(560); +const detectIndent = __webpack_require__(561); const init = (fn, filePath, data, options) => { if (!filePath) { @@ -52457,13 +52630,13 @@ module.exports.sync = (filePath, data, options) => { /***/ }), -/* 544 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { var fs = __webpack_require__(23) -var polyfills = __webpack_require__(545) -var legacy = __webpack_require__(546) -var clone = __webpack_require__(547) +var polyfills = __webpack_require__(546) +var legacy = __webpack_require__(547) +var clone = __webpack_require__(548) var queue = [] @@ -52742,7 +52915,7 @@ function retry () { /***/ }), -/* 545 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { var constants = __webpack_require__(25) @@ -53077,7 +53250,7 @@ function patch (fs) { /***/ }), -/* 546 */ +/* 547 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(27).Stream @@ -53201,7 +53374,7 @@ function legacy (fs) { /***/ }), -/* 547 */ +/* 548 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53227,7 +53400,7 @@ function clone (obj) { /***/ }), -/* 548 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53237,8 +53410,8 @@ module.exports.sync = writeFileSync module.exports._getTmpname = getTmpname // for testing module.exports._cleanupOnExit = cleanupOnExit -var fs = __webpack_require__(549) -var MurmurHash3 = __webpack_require__(553) +var fs = __webpack_require__(550) +var MurmurHash3 = __webpack_require__(554) var onExit = __webpack_require__(377) var path = __webpack_require__(16) var activeFiles = {} @@ -53247,7 +53420,7 @@ var activeFiles = {} /* istanbul ignore next */ var threadId = (function getId () { try { - var workerThreads = __webpack_require__(554) + var workerThreads = __webpack_require__(555) /// if we are in main thread, this is set to `0` return workerThreads.threadId @@ -53472,12 +53645,12 @@ function writeFileSync (filename, data, options) { /***/ }), -/* 549 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { var fs = __webpack_require__(23) -var polyfills = __webpack_require__(550) -var legacy = __webpack_require__(552) +var polyfills = __webpack_require__(551) +var legacy = __webpack_require__(553) var queue = [] var util = __webpack_require__(29) @@ -53501,7 +53674,7 @@ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { }) } -module.exports = patch(__webpack_require__(551)) +module.exports = patch(__webpack_require__(552)) if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { module.exports = patch(fs) } @@ -53740,10 +53913,10 @@ function retry () { /***/ }), -/* 550 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { -var fs = __webpack_require__(551) +var fs = __webpack_require__(552) var constants = __webpack_require__(25) var origCwd = process.cwd @@ -54076,7 +54249,7 @@ function chownErOk (er) { /***/ }), -/* 551 */ +/* 552 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54104,7 +54277,7 @@ function clone (obj) { /***/ }), -/* 552 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(27).Stream @@ -54228,7 +54401,7 @@ function legacy (fs) { /***/ }), -/* 553 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54370,18 +54543,18 @@ function legacy (fs) { /***/ }), -/* 554 */ +/* 555 */ /***/ (function(module, exports) { module.exports = require(undefined); /***/ }), -/* 555 */ +/* 556 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const isPlainObj = __webpack_require__(556); +const isPlainObj = __webpack_require__(557); module.exports = (obj, opts) => { if (!isPlainObj(obj)) { @@ -54438,7 +54611,7 @@ module.exports = (obj, opts) => { /***/ }), -/* 556 */ +/* 557 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54452,15 +54625,15 @@ module.exports = function (x) { /***/ }), -/* 557 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); const path = __webpack_require__(16); -const pify = __webpack_require__(558); -const semver = __webpack_require__(520); +const pify = __webpack_require__(559); +const semver = __webpack_require__(521); const defaults = { mode: 0o777 & (~process.umask()), @@ -54598,7 +54771,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 558 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54673,7 +54846,7 @@ module.exports = (input, options) => { /***/ }), -/* 559 */ +/* 560 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54748,7 +54921,7 @@ module.exports = (input, options) => { /***/ }), -/* 560 */ +/* 561 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54877,7 +55050,7 @@ module.exports = str => { /***/ }), -/* 561 */ +/* 562 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54886,7 +55059,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runScriptInPackage", function() { return runScriptInPackage; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runScriptInPackageStreaming", function() { return runScriptInPackageStreaming; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yarnWorkspacesInfo", function() { return yarnWorkspacesInfo; }); -/* harmony import */ var _child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(562); +/* harmony import */ var _child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(563); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -54956,7 +55129,7 @@ async function yarnWorkspacesInfo(directory) { } /***/ }), -/* 562 */ +/* 563 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -54967,9 +55140,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(351); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(execa__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(563); +/* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(564); /* harmony import */ var log_symbols__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(log_symbols__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(568); +/* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(569); /* harmony import */ var strong_log_transformer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(strong_log_transformer__WEBPACK_IMPORTED_MODULE_3__); 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; } @@ -55035,12 +55208,12 @@ function spawnStreaming(command, args, opts, { } /***/ }), -/* 563 */ +/* 564 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const chalk = __webpack_require__(564); +const chalk = __webpack_require__(565); const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color'; @@ -55062,16 +55235,16 @@ module.exports = isSupported ? main : fallbacks; /***/ }), -/* 564 */ +/* 565 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const escapeStringRegexp = __webpack_require__(3); -const ansiStyles = __webpack_require__(565); -const stdoutColor = __webpack_require__(566).stdout; +const ansiStyles = __webpack_require__(566); +const stdoutColor = __webpack_require__(567).stdout; -const template = __webpack_require__(567); +const template = __webpack_require__(568); const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); @@ -55297,7 +55470,7 @@ module.exports.default = module.exports; // For TypeScript /***/ }), -/* 565 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55470,7 +55643,7 @@ Object.defineProperty(module, 'exports', { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)(module))) /***/ }), -/* 566 */ +/* 567 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55612,7 +55785,7 @@ module.exports = { /***/ }), -/* 567 */ +/* 568 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55747,7 +55920,7 @@ module.exports = (chalk, tmp) => { /***/ }), -/* 568 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { // Copyright IBM Corp. 2014,2018. All Rights Reserved. @@ -55755,12 +55928,12 @@ module.exports = (chalk, tmp) => { // This file is licensed under the Apache License 2.0. // License text available at https://opensource.org/licenses/Apache-2.0 -module.exports = __webpack_require__(569); -module.exports.cli = __webpack_require__(573); +module.exports = __webpack_require__(570); +module.exports.cli = __webpack_require__(574); /***/ }), -/* 569 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55775,9 +55948,9 @@ var stream = __webpack_require__(27); var util = __webpack_require__(29); var fs = __webpack_require__(23); -var through = __webpack_require__(570); -var duplexer = __webpack_require__(571); -var StringDecoder = __webpack_require__(572).StringDecoder; +var through = __webpack_require__(571); +var duplexer = __webpack_require__(572); +var StringDecoder = __webpack_require__(573).StringDecoder; module.exports = Logger; @@ -55966,7 +56139,7 @@ function lineMerger(host) { /***/ }), -/* 570 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(27) @@ -56080,7 +56253,7 @@ function through (write, end, opts) { /***/ }), -/* 571 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { var Stream = __webpack_require__(27) @@ -56173,13 +56346,13 @@ function duplex(writer, reader) { /***/ }), -/* 572 */ +/* 573 */ /***/ (function(module, exports) { module.exports = require("string_decoder"); /***/ }), -/* 573 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56190,11 +56363,11 @@ module.exports = require("string_decoder"); -var minimist = __webpack_require__(574); +var minimist = __webpack_require__(575); var path = __webpack_require__(16); -var Logger = __webpack_require__(569); -var pkg = __webpack_require__(575); +var Logger = __webpack_require__(570); +var pkg = __webpack_require__(576); module.exports = cli; @@ -56248,7 +56421,7 @@ function usage($0, p) { /***/ }), -/* 574 */ +/* 575 */ /***/ (function(module, exports) { module.exports = function (args, opts) { @@ -56490,29 +56663,29 @@ function isNumber (x) { /***/ }), -/* 575 */ +/* 576 */ /***/ (function(module) { module.exports = JSON.parse("{\"name\":\"strong-log-transformer\",\"version\":\"2.1.0\",\"description\":\"Stream transformer that prefixes lines with timestamps and other things.\",\"author\":\"Ryan Graham \",\"license\":\"Apache-2.0\",\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/strongloop/strong-log-transformer\"},\"keywords\":[\"logging\",\"streams\"],\"bugs\":{\"url\":\"https://github.com/strongloop/strong-log-transformer/issues\"},\"homepage\":\"https://github.com/strongloop/strong-log-transformer\",\"directories\":{\"test\":\"test\"},\"bin\":{\"sl-log-transformer\":\"bin/sl-log-transformer.js\"},\"main\":\"index.js\",\"scripts\":{\"test\":\"tap --100 test/test-*\"},\"dependencies\":{\"duplexer\":\"^0.1.1\",\"minimist\":\"^1.2.0\",\"through\":\"^2.3.4\"},\"devDependencies\":{\"tap\":\"^12.0.1\"},\"engines\":{\"node\":\">=4\"}}"); /***/ }), -/* 576 */ +/* 577 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "workspacePackagePaths", function() { return workspacePackagePaths; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyWorkspacePackages", function() { return copyWorkspacePackages; }); -/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(500); +/* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(501); /* harmony import */ var glob__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(glob__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); /* 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__(29); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(577); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(578); /* harmony import */ var _fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20); -/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(515); -/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(499); +/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(516); +/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(500); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -56604,7 +56777,7 @@ function packagesFromGlobPattern({ } /***/ }), -/* 577 */ +/* 578 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56674,7 +56847,7 @@ function getProjectPaths({ } /***/ }), -/* 578 */ +/* 579 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -56682,13 +56855,13 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAllChecksums", function() { return getAllChecksums; }); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23); /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(579); +/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(580); /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29); /* harmony import */ var util__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(351); /* harmony import */ var execa__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(execa__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(580); +/* harmony import */ var _yarn_lock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(581); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -56914,19 +57087,19 @@ async function getAllChecksums(kbn, log) { } /***/ }), -/* 579 */ +/* 580 */ /***/ (function(module, exports) { module.exports = require("crypto"); /***/ }), -/* 580 */ +/* 581 */ /***/ (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 import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(581); +/* harmony import */ var _yarnpkg_lockfile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(582); /* 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__(20); /* @@ -56970,7 +57143,7 @@ async function readYarnLock(kbn) { } /***/ }), -/* 581 */ +/* 582 */ /***/ (function(module, exports, __webpack_require__) { module.exports = @@ -58529,7 +58702,7 @@ module.exports = invariant; /* 9 */ /***/ (function(module, exports) { -module.exports = __webpack_require__(579); +module.exports = __webpack_require__(580); /***/ }), /* 10 */, @@ -60853,7 +61026,7 @@ function onceStrict (fn) { /* 63 */ /***/ (function(module, exports) { -module.exports = __webpack_require__(582); +module.exports = __webpack_require__(583); /***/ }), /* 64 */, @@ -67248,13 +67421,13 @@ module.exports = process && support(supportLevel); /******/ ]); /***/ }), -/* 582 */ +/* 583 */ /***/ (function(module, exports) { module.exports = require("buffer"); /***/ }), -/* 583 */ +/* 584 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67351,7 +67524,7 @@ class BootstrapCacheFile { } /***/ }), -/* 584 */ +/* 585 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -67359,9 +67532,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CleanCommand", function() { return CleanCommand; }); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(585); +/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(586); /* 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__(673); +/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(674); /* 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__(16); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); @@ -67460,21 +67633,21 @@ const CleanCommand = { }; /***/ }), -/* 585 */ +/* 586 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const {promisify} = __webpack_require__(29); const path = __webpack_require__(16); -const globby = __webpack_require__(586); -const isGlob = __webpack_require__(603); -const slash = __webpack_require__(664); +const globby = __webpack_require__(587); +const isGlob = __webpack_require__(604); +const slash = __webpack_require__(665); const gracefulFs = __webpack_require__(22); -const isPathCwd = __webpack_require__(666); -const isPathInside = __webpack_require__(667); -const rimraf = __webpack_require__(668); -const pMap = __webpack_require__(669); +const isPathCwd = __webpack_require__(667); +const isPathInside = __webpack_require__(668); +const rimraf = __webpack_require__(669); +const pMap = __webpack_require__(670); const rimrafP = promisify(rimraf); @@ -67588,19 +67761,19 @@ module.exports.sync = (patterns, {force, dryRun, cwd = process.cwd(), ...options /***/ }), -/* 586 */ +/* 587 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); -const arrayUnion = __webpack_require__(587); -const merge2 = __webpack_require__(588); -const glob = __webpack_require__(589); -const fastGlob = __webpack_require__(594); -const dirGlob = __webpack_require__(660); -const gitignore = __webpack_require__(662); -const {FilterStream, UniqueStream} = __webpack_require__(665); +const arrayUnion = __webpack_require__(588); +const merge2 = __webpack_require__(589); +const glob = __webpack_require__(590); +const fastGlob = __webpack_require__(595); +const dirGlob = __webpack_require__(661); +const gitignore = __webpack_require__(663); +const {FilterStream, UniqueStream} = __webpack_require__(666); const DEFAULT_FILTER = () => false; @@ -67773,7 +67946,7 @@ module.exports.gitignore = gitignore; /***/ }), -/* 587 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67785,7 +67958,7 @@ module.exports = (...arguments_) => { /***/ }), -/* 588 */ +/* 589 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -67899,7 +68072,7 @@ function pauseStreams (streams, options) { /***/ }), -/* 589 */ +/* 590 */ /***/ (function(module, exports, __webpack_require__) { // Approach: @@ -67945,21 +68118,21 @@ function pauseStreams (streams, options) { module.exports = glob var fs = __webpack_require__(23) -var rp = __webpack_require__(501) -var minimatch = __webpack_require__(503) +var rp = __webpack_require__(502) +var minimatch = __webpack_require__(504) var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__(590) +var inherits = __webpack_require__(591) var EE = __webpack_require__(379).EventEmitter var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(509) -var globSync = __webpack_require__(592) -var common = __webpack_require__(593) +var isAbsolute = __webpack_require__(510) +var globSync = __webpack_require__(593) +var common = __webpack_require__(594) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp -var inflight = __webpack_require__(512) +var inflight = __webpack_require__(513) var util = __webpack_require__(29) var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored @@ -68695,7 +68868,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { /***/ }), -/* 590 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { try { @@ -68705,12 +68878,12 @@ try { module.exports = util.inherits; } catch (e) { /* istanbul ignore next */ - module.exports = __webpack_require__(591); + module.exports = __webpack_require__(592); } /***/ }), -/* 591 */ +/* 592 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { @@ -68743,22 +68916,22 @@ if (typeof Object.create === 'function') { /***/ }), -/* 592 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { module.exports = globSync globSync.GlobSync = GlobSync var fs = __webpack_require__(23) -var rp = __webpack_require__(501) -var minimatch = __webpack_require__(503) +var rp = __webpack_require__(502) +var minimatch = __webpack_require__(504) var Minimatch = minimatch.Minimatch -var Glob = __webpack_require__(589).Glob +var Glob = __webpack_require__(590).Glob var util = __webpack_require__(29) var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(509) -var common = __webpack_require__(593) +var isAbsolute = __webpack_require__(510) +var common = __webpack_require__(594) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts @@ -69235,7 +69408,7 @@ GlobSync.prototype._makeAbs = function (f) { /***/ }), -/* 593 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { exports.alphasort = alphasort @@ -69253,8 +69426,8 @@ function ownProp (obj, field) { } var path = __webpack_require__(16) -var minimatch = __webpack_require__(503) -var isAbsolute = __webpack_require__(509) +var minimatch = __webpack_require__(504) +var isAbsolute = __webpack_require__(510) var Minimatch = minimatch.Minimatch function alphasorti (a, b) { @@ -69481,17 +69654,17 @@ function childrenIgnored (self, path) { /***/ }), -/* 594 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const taskManager = __webpack_require__(595); -const async_1 = __webpack_require__(623); -const stream_1 = __webpack_require__(656); -const sync_1 = __webpack_require__(657); -const settings_1 = __webpack_require__(659); -const utils = __webpack_require__(596); +const taskManager = __webpack_require__(596); +const async_1 = __webpack_require__(624); +const stream_1 = __webpack_require__(657); +const sync_1 = __webpack_require__(658); +const settings_1 = __webpack_require__(660); +const utils = __webpack_require__(597); function FastGlob(source, options) { try { assertPatternsInput(source); @@ -69549,13 +69722,13 @@ module.exports = FastGlob; /***/ }), -/* 595 */ +/* 596 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(596); +const utils = __webpack_require__(597); function generate(patterns, settings) { const positivePatterns = getPositivePatterns(patterns); const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore); @@ -69623,28 +69796,28 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ }), -/* 596 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const array = __webpack_require__(597); +const array = __webpack_require__(598); exports.array = array; -const errno = __webpack_require__(598); +const errno = __webpack_require__(599); exports.errno = errno; -const fs = __webpack_require__(599); +const fs = __webpack_require__(600); exports.fs = fs; -const path = __webpack_require__(600); +const path = __webpack_require__(601); exports.path = path; -const pattern = __webpack_require__(601); +const pattern = __webpack_require__(602); exports.pattern = pattern; -const stream = __webpack_require__(622); +const stream = __webpack_require__(623); exports.stream = stream; /***/ }), -/* 597 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69657,7 +69830,7 @@ exports.flatten = flatten; /***/ }), -/* 598 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69670,7 +69843,7 @@ exports.isEnoentCodeError = isEnoentCodeError; /***/ }), -/* 599 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69695,7 +69868,7 @@ exports.createDirentFromStats = createDirentFromStats; /***/ }), -/* 600 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -69716,16 +69889,16 @@ exports.makeAbsolute = makeAbsolute; /***/ }), -/* 601 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(16); -const globParent = __webpack_require__(602); -const isGlob = __webpack_require__(603); -const micromatch = __webpack_require__(605); +const globParent = __webpack_require__(603); +const isGlob = __webpack_require__(604); +const micromatch = __webpack_require__(606); const GLOBSTAR = '**'; function isStaticPattern(pattern) { return !isDynamicPattern(pattern); @@ -69814,13 +69987,13 @@ exports.matchAny = matchAny; /***/ }), -/* 602 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isGlob = __webpack_require__(603); +var isGlob = __webpack_require__(604); var pathPosixDirname = __webpack_require__(16).posix.dirname; var isWin32 = __webpack_require__(11).platform() === 'win32'; @@ -69855,7 +70028,7 @@ module.exports = function globParent(str) { /***/ }), -/* 603 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -69865,7 +70038,7 @@ module.exports = function globParent(str) { * Released under the MIT License. */ -var isExtglob = __webpack_require__(604); +var isExtglob = __webpack_require__(605); var chars = { '{': '}', '(': ')', '[': ']'}; var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/; @@ -69909,7 +70082,7 @@ module.exports = function isGlob(str, options) { /***/ }), -/* 604 */ +/* 605 */ /***/ (function(module, exports) { /*! @@ -69935,16 +70108,16 @@ module.exports = function isExtglob(str) { /***/ }), -/* 605 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const util = __webpack_require__(29); -const braces = __webpack_require__(606); -const picomatch = __webpack_require__(616); -const utils = __webpack_require__(619); +const braces = __webpack_require__(607); +const picomatch = __webpack_require__(617); +const utils = __webpack_require__(620); const isEmptyString = val => typeof val === 'string' && (val === '' || val === './'); /** @@ -70409,16 +70582,16 @@ module.exports = micromatch; /***/ }), -/* 606 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const stringify = __webpack_require__(607); -const compile = __webpack_require__(609); -const expand = __webpack_require__(613); -const parse = __webpack_require__(614); +const stringify = __webpack_require__(608); +const compile = __webpack_require__(610); +const expand = __webpack_require__(614); +const parse = __webpack_require__(615); /** * Expand the given pattern or create a regex-compatible string. @@ -70586,13 +70759,13 @@ module.exports = braces; /***/ }), -/* 607 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const utils = __webpack_require__(608); +const utils = __webpack_require__(609); module.exports = (ast, options = {}) => { let stringify = (node, parent = {}) => { @@ -70625,7 +70798,7 @@ module.exports = (ast, options = {}) => { /***/ }), -/* 608 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70744,14 +70917,14 @@ exports.flatten = (...args) => { /***/ }), -/* 609 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const fill = __webpack_require__(610); -const utils = __webpack_require__(608); +const fill = __webpack_require__(611); +const utils = __webpack_require__(609); const compile = (ast, options = {}) => { let walk = (node, parent = {}) => { @@ -70808,7 +70981,7 @@ module.exports = compile; /***/ }), -/* 610 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -70822,7 +70995,7 @@ module.exports = compile; const util = __webpack_require__(29); -const toRegexRange = __webpack_require__(611); +const toRegexRange = __webpack_require__(612); const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); @@ -71064,7 +71237,7 @@ module.exports = fill; /***/ }), -/* 611 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71077,7 +71250,7 @@ module.exports = fill; -const isNumber = __webpack_require__(612); +const isNumber = __webpack_require__(613); const toRegexRange = (min, max, options) => { if (isNumber(min) === false) { @@ -71359,7 +71532,7 @@ module.exports = toRegexRange; /***/ }), -/* 612 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71384,15 +71557,15 @@ module.exports = function(num) { /***/ }), -/* 613 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const fill = __webpack_require__(610); -const stringify = __webpack_require__(607); -const utils = __webpack_require__(608); +const fill = __webpack_require__(611); +const stringify = __webpack_require__(608); +const utils = __webpack_require__(609); const append = (queue = '', stash = '', enclose = false) => { let result = []; @@ -71504,13 +71677,13 @@ module.exports = expand; /***/ }), -/* 614 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const stringify = __webpack_require__(607); +const stringify = __webpack_require__(608); /** * Constants @@ -71532,7 +71705,7 @@ const { CHAR_SINGLE_QUOTE, /* ' */ CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE -} = __webpack_require__(615); +} = __webpack_require__(616); /** * parse @@ -71844,7 +72017,7 @@ module.exports = parse; /***/ }), -/* 615 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71908,26 +72081,26 @@ module.exports = { /***/ }), -/* 616 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = __webpack_require__(617); +module.exports = __webpack_require__(618); /***/ }), -/* 617 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const scan = __webpack_require__(618); -const parse = __webpack_require__(621); -const utils = __webpack_require__(619); +const scan = __webpack_require__(619); +const parse = __webpack_require__(622); +const utils = __webpack_require__(620); /** * Creates a matcher function from one or more glob patterns. The @@ -72230,7 +72403,7 @@ picomatch.toRegex = (source, options) => { * @return {Object} */ -picomatch.constants = __webpack_require__(620); +picomatch.constants = __webpack_require__(621); /** * Expose "picomatch" @@ -72240,13 +72413,13 @@ module.exports = picomatch; /***/ }), -/* 618 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const utils = __webpack_require__(619); +const utils = __webpack_require__(620); const { CHAR_ASTERISK, /* * */ @@ -72264,7 +72437,7 @@ const { CHAR_RIGHT_CURLY_BRACE, /* } */ CHAR_RIGHT_PARENTHESES, /* ) */ CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = __webpack_require__(620); +} = __webpack_require__(621); const isPathSeparator = code => { return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; @@ -72466,7 +72639,7 @@ module.exports = (input, options) => { /***/ }), -/* 619 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72478,7 +72651,7 @@ const { REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL, REGEX_REMOVE_BACKSLASH -} = __webpack_require__(620); +} = __webpack_require__(621); exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); @@ -72516,7 +72689,7 @@ exports.escapeLast = (input, char, lastIdx) => { /***/ }), -/* 620 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -72702,14 +72875,14 @@ module.exports = { /***/ }), -/* 621 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const utils = __webpack_require__(619); -const constants = __webpack_require__(620); +const utils = __webpack_require__(620); +const constants = __webpack_require__(621); /** * Constants @@ -73720,13 +73893,13 @@ module.exports = parse; /***/ }), -/* 622 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const merge2 = __webpack_require__(588); +const merge2 = __webpack_require__(589); function merge(streams) { const mergedStream = merge2(streams); streams.forEach((stream) => { @@ -73738,14 +73911,14 @@ exports.merge = merge; /***/ }), -/* 623 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const stream_1 = __webpack_require__(624); -const provider_1 = __webpack_require__(651); +const stream_1 = __webpack_require__(625); +const provider_1 = __webpack_require__(652); class ProviderAsync extends provider_1.default { constructor() { super(...arguments); @@ -73773,16 +73946,16 @@ exports.default = ProviderAsync; /***/ }), -/* 624 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const stream_1 = __webpack_require__(27); -const fsStat = __webpack_require__(625); -const fsWalk = __webpack_require__(630); -const reader_1 = __webpack_require__(650); +const fsStat = __webpack_require__(626); +const fsWalk = __webpack_require__(631); +const reader_1 = __webpack_require__(651); class ReaderStream extends reader_1.default { constructor() { super(...arguments); @@ -73835,15 +74008,15 @@ exports.default = ReaderStream; /***/ }), -/* 625 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async = __webpack_require__(626); -const sync = __webpack_require__(627); -const settings_1 = __webpack_require__(628); +const async = __webpack_require__(627); +const sync = __webpack_require__(628); +const settings_1 = __webpack_require__(629); exports.Settings = settings_1.default; function stat(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { @@ -73866,7 +74039,7 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/* 626 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73904,7 +74077,7 @@ function callSuccessCallback(callback, result) { /***/ }), -/* 627 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73933,13 +74106,13 @@ exports.read = read; /***/ }), -/* 628 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__(629); +const fs = __webpack_require__(630); class Settings { constructor(_options = {}) { this._options = _options; @@ -73956,7 +74129,7 @@ exports.default = Settings; /***/ }), -/* 629 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -73979,16 +74152,16 @@ exports.createFileSystemAdapter = createFileSystemAdapter; /***/ }), -/* 630 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async_1 = __webpack_require__(631); -const stream_1 = __webpack_require__(646); -const sync_1 = __webpack_require__(647); -const settings_1 = __webpack_require__(649); +const async_1 = __webpack_require__(632); +const stream_1 = __webpack_require__(647); +const sync_1 = __webpack_require__(648); +const settings_1 = __webpack_require__(650); exports.Settings = settings_1.default; function walk(dir, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { @@ -74018,13 +74191,13 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/* 631 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async_1 = __webpack_require__(632); +const async_1 = __webpack_require__(633); class AsyncProvider { constructor(_root, _settings) { this._root = _root; @@ -74055,17 +74228,17 @@ function callSuccessCallback(callback, entries) { /***/ }), -/* 632 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const events_1 = __webpack_require__(379); -const fsScandir = __webpack_require__(633); -const fastq = __webpack_require__(642); -const common = __webpack_require__(644); -const reader_1 = __webpack_require__(645); +const fsScandir = __webpack_require__(634); +const fastq = __webpack_require__(643); +const common = __webpack_require__(645); +const reader_1 = __webpack_require__(646); class AsyncReader extends reader_1.default { constructor(_root, _settings) { super(_root, _settings); @@ -74155,15 +74328,15 @@ exports.default = AsyncReader; /***/ }), -/* 633 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const async = __webpack_require__(634); -const sync = __webpack_require__(639); -const settings_1 = __webpack_require__(640); +const async = __webpack_require__(635); +const sync = __webpack_require__(640); +const settings_1 = __webpack_require__(641); exports.Settings = settings_1.default; function scandir(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { @@ -74186,16 +74359,16 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/* 634 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__(625); -const rpl = __webpack_require__(635); -const constants_1 = __webpack_require__(636); -const utils = __webpack_require__(637); +const fsStat = __webpack_require__(626); +const rpl = __webpack_require__(636); +const constants_1 = __webpack_require__(637); +const utils = __webpack_require__(638); function read(dir, settings, callback) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(dir, settings, callback); @@ -74284,7 +74457,7 @@ function callSuccessCallback(callback, result) { /***/ }), -/* 635 */ +/* 636 */ /***/ (function(module, exports) { module.exports = runParallel @@ -74338,7 +74511,7 @@ function runParallel (tasks, cb) { /***/ }), -/* 636 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74354,18 +74527,18 @@ exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = MAJOR_VERSION > 10 || (MAJOR_VERSIO /***/ }), -/* 637 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fs = __webpack_require__(638); +const fs = __webpack_require__(639); exports.fs = fs; /***/ }), -/* 638 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74390,15 +74563,15 @@ exports.createDirentFromStats = createDirentFromStats; /***/ }), -/* 639 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__(625); -const constants_1 = __webpack_require__(636); -const utils = __webpack_require__(637); +const fsStat = __webpack_require__(626); +const constants_1 = __webpack_require__(637); +const utils = __webpack_require__(638); function read(dir, settings) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(dir, settings); @@ -74449,15 +74622,15 @@ exports.readdir = readdir; /***/ }), -/* 640 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(16); -const fsStat = __webpack_require__(625); -const fs = __webpack_require__(641); +const fsStat = __webpack_require__(626); +const fs = __webpack_require__(642); class Settings { constructor(_options = {}) { this._options = _options; @@ -74480,7 +74653,7 @@ exports.default = Settings; /***/ }), -/* 641 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74505,13 +74678,13 @@ exports.createFileSystemAdapter = createFileSystemAdapter; /***/ }), -/* 642 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var reusify = __webpack_require__(643) +var reusify = __webpack_require__(644) function fastqueue (context, worker, concurrency) { if (typeof context === 'function') { @@ -74685,7 +74858,7 @@ module.exports = fastqueue /***/ }), -/* 643 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74725,7 +74898,7 @@ module.exports = reusify /***/ }), -/* 644 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74756,13 +74929,13 @@ exports.joinPathSegments = joinPathSegments; /***/ }), -/* 645 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const common = __webpack_require__(644); +const common = __webpack_require__(645); class Reader { constructor(_root, _settings) { this._root = _root; @@ -74774,14 +74947,14 @@ exports.default = Reader; /***/ }), -/* 646 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const stream_1 = __webpack_require__(27); -const async_1 = __webpack_require__(632); +const async_1 = __webpack_require__(633); class StreamProvider { constructor(_root, _settings) { this._root = _root; @@ -74811,13 +74984,13 @@ exports.default = StreamProvider; /***/ }), -/* 647 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const sync_1 = __webpack_require__(648); +const sync_1 = __webpack_require__(649); class SyncProvider { constructor(_root, _settings) { this._root = _root; @@ -74832,15 +75005,15 @@ exports.default = SyncProvider; /***/ }), -/* 648 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsScandir = __webpack_require__(633); -const common = __webpack_require__(644); -const reader_1 = __webpack_require__(645); +const fsScandir = __webpack_require__(634); +const common = __webpack_require__(645); +const reader_1 = __webpack_require__(646); class SyncReader extends reader_1.default { constructor() { super(...arguments); @@ -74898,14 +75071,14 @@ exports.default = SyncReader; /***/ }), -/* 649 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(16); -const fsScandir = __webpack_require__(633); +const fsScandir = __webpack_require__(634); class Settings { constructor(_options = {}) { this._options = _options; @@ -74931,15 +75104,15 @@ exports.default = Settings; /***/ }), -/* 650 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(16); -const fsStat = __webpack_require__(625); -const utils = __webpack_require__(596); +const fsStat = __webpack_require__(626); +const utils = __webpack_require__(597); class Reader { constructor(_settings) { this._settings = _settings; @@ -74971,17 +75144,17 @@ exports.default = Reader; /***/ }), -/* 651 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = __webpack_require__(16); -const deep_1 = __webpack_require__(652); -const entry_1 = __webpack_require__(653); -const error_1 = __webpack_require__(654); -const entry_2 = __webpack_require__(655); +const deep_1 = __webpack_require__(653); +const entry_1 = __webpack_require__(654); +const error_1 = __webpack_require__(655); +const entry_2 = __webpack_require__(656); class Provider { constructor(_settings) { this._settings = _settings; @@ -75026,13 +75199,13 @@ exports.default = Provider; /***/ }), -/* 652 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(596); +const utils = __webpack_require__(597); class DeepFilter { constructor(_settings, _micromatchOptions) { this._settings = _settings; @@ -75092,13 +75265,13 @@ exports.default = DeepFilter; /***/ }), -/* 653 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(596); +const utils = __webpack_require__(597); class EntryFilter { constructor(_settings, _micromatchOptions) { this._settings = _settings; @@ -75153,13 +75326,13 @@ exports.default = EntryFilter; /***/ }), -/* 654 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(596); +const utils = __webpack_require__(597); class ErrorFilter { constructor(_settings) { this._settings = _settings; @@ -75175,13 +75348,13 @@ exports.default = ErrorFilter; /***/ }), -/* 655 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const utils = __webpack_require__(596); +const utils = __webpack_require__(597); class EntryTransformer { constructor(_settings) { this._settings = _settings; @@ -75208,15 +75381,15 @@ exports.default = EntryTransformer; /***/ }), -/* 656 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const stream_1 = __webpack_require__(27); -const stream_2 = __webpack_require__(624); -const provider_1 = __webpack_require__(651); +const stream_2 = __webpack_require__(625); +const provider_1 = __webpack_require__(652); class ProviderStream extends provider_1.default { constructor() { super(...arguments); @@ -75244,14 +75417,14 @@ exports.default = ProviderStream; /***/ }), -/* 657 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const sync_1 = __webpack_require__(658); -const provider_1 = __webpack_require__(651); +const sync_1 = __webpack_require__(659); +const provider_1 = __webpack_require__(652); class ProviderSync extends provider_1.default { constructor() { super(...arguments); @@ -75274,15 +75447,15 @@ exports.default = ProviderSync; /***/ }), -/* 658 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsStat = __webpack_require__(625); -const fsWalk = __webpack_require__(630); -const reader_1 = __webpack_require__(650); +const fsStat = __webpack_require__(626); +const fsWalk = __webpack_require__(631); +const reader_1 = __webpack_require__(651); class ReaderSync extends reader_1.default { constructor() { super(...arguments); @@ -75324,7 +75497,7 @@ exports.default = ReaderSync; /***/ }), -/* 659 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75384,13 +75557,13 @@ exports.default = Settings; /***/ }), -/* 660 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const pathType = __webpack_require__(661); +const pathType = __webpack_require__(662); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; @@ -75466,7 +75639,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 661 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75516,7 +75689,7 @@ exports.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink'); /***/ }), -/* 662 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -75524,9 +75697,9 @@ exports.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink'); const {promisify} = __webpack_require__(29); const fs = __webpack_require__(23); const path = __webpack_require__(16); -const fastGlob = __webpack_require__(594); -const gitIgnore = __webpack_require__(663); -const slash = __webpack_require__(664); +const fastGlob = __webpack_require__(595); +const gitIgnore = __webpack_require__(664); +const slash = __webpack_require__(665); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -75640,7 +75813,7 @@ module.exports.sync = options => { /***/ }), -/* 663 */ +/* 664 */ /***/ (function(module, exports) { // A simple implementation of make-array @@ -76231,7 +76404,7 @@ if ( /***/ }), -/* 664 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76249,7 +76422,7 @@ module.exports = path => { /***/ }), -/* 665 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76302,7 +76475,7 @@ module.exports = { /***/ }), -/* 666 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76324,7 +76497,7 @@ module.exports = path_ => { /***/ }), -/* 667 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76352,7 +76525,7 @@ module.exports = (childPath, parentPath) => { /***/ }), -/* 668 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { const assert = __webpack_require__(30) @@ -76360,7 +76533,7 @@ const path = __webpack_require__(16) const fs = __webpack_require__(23) let glob = undefined try { - glob = __webpack_require__(589) + glob = __webpack_require__(590) } catch (_err) { // treat glob as optional. } @@ -76726,12 +76899,12 @@ rimraf.sync = rimrafSync /***/ }), -/* 669 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const AggregateError = __webpack_require__(670); +const AggregateError = __webpack_require__(671); module.exports = async ( iterable, @@ -76814,13 +76987,13 @@ module.exports = async ( /***/ }), -/* 670 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const indentString = __webpack_require__(671); -const cleanStack = __webpack_require__(672); +const indentString = __webpack_require__(672); +const cleanStack = __webpack_require__(673); const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); @@ -76868,7 +77041,7 @@ module.exports = AggregateError; /***/ }), -/* 671 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76910,7 +77083,7 @@ module.exports = (string, count = 1, options) => { /***/ }), -/* 672 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -76957,15 +77130,15 @@ module.exports = (stack, options) => { /***/ }), -/* 673 */ +/* 674 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const chalk = __webpack_require__(674); -const cliCursor = __webpack_require__(678); -const cliSpinners = __webpack_require__(682); -const logSymbols = __webpack_require__(563); +const chalk = __webpack_require__(675); +const cliCursor = __webpack_require__(679); +const cliSpinners = __webpack_require__(683); +const logSymbols = __webpack_require__(564); class Ora { constructor(options) { @@ -77112,16 +77285,16 @@ module.exports.promise = (action, options) => { /***/ }), -/* 674 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const escapeStringRegexp = __webpack_require__(3); -const ansiStyles = __webpack_require__(675); -const stdoutColor = __webpack_require__(676).stdout; +const ansiStyles = __webpack_require__(676); +const stdoutColor = __webpack_require__(677).stdout; -const template = __webpack_require__(677); +const template = __webpack_require__(678); const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); @@ -77347,7 +77520,7 @@ module.exports.default = module.exports; // For TypeScript /***/ }), -/* 675 */ +/* 676 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77520,7 +77693,7 @@ Object.defineProperty(module, 'exports', { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5)(module))) /***/ }), -/* 676 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77662,7 +77835,7 @@ module.exports = { /***/ }), -/* 677 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77797,12 +77970,12 @@ module.exports = (chalk, tmp) => { /***/ }), -/* 678 */ +/* 679 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const restoreCursor = __webpack_require__(679); +const restoreCursor = __webpack_require__(680); let hidden = false; @@ -77843,12 +78016,12 @@ exports.toggle = (force, stream) => { /***/ }), -/* 679 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const onetime = __webpack_require__(680); +const onetime = __webpack_require__(681); const signalExit = __webpack_require__(377); module.exports = onetime(() => { @@ -77859,12 +78032,12 @@ module.exports = onetime(() => { /***/ }), -/* 680 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const mimicFn = __webpack_require__(681); +const mimicFn = __webpack_require__(682); module.exports = (fn, opts) => { // TODO: Remove this in v3 @@ -77905,7 +78078,7 @@ module.exports = (fn, opts) => { /***/ }), -/* 681 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77921,22 +78094,22 @@ module.exports = (to, from) => { /***/ }), -/* 682 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = __webpack_require__(683); +module.exports = __webpack_require__(684); /***/ }), -/* 683 */ +/* 684 */ /***/ (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\":[\"⢀⠀\",\"⡀⠀\",\"⠄⠀\",\"⢂⠀\",\"⡂⠀\",\"⠅⠀\",\"⢃⠀\",\"⡃⠀\",\"⠍⠀\",\"⢋⠀\",\"⡋⠀\",\"⠍⠁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⢈⠩\",\"⡀⢙\",\"⠄⡙\",\"⢂⠩\",\"⡂⢘\",\"⠅⡘\",\"⢃⠨\",\"⡃⢐\",\"⠍⡐\",\"⢋⠠\",\"⡋⢀\",\"⠍⡁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⠈⠩\",\"⠀⢙\",\"⠀⡙\",\"⠀⠩\",\"⠀⢘\",\"⠀⡘\",\"⠀⠨\",\"⠀⢐\",\"⠀⡐\",\"⠀⠠\",\"⠀⢀\",\"⠀⡀\"]},\"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\":[\"🌍 \",\"🌎 \",\"🌏 \"]},\"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\":[\"🌲\",\"🎄\"]}}"); /***/ }), -/* 684 */ +/* 685 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -77945,8 +78118,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34); -/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(498); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(499); +/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(499); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(500); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -77996,7 +78169,7 @@ const RunCommand = { }; /***/ }), -/* 685 */ +/* 686 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78005,9 +78178,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34); -/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(498); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(499); -/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(686); +/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(499); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(500); +/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(687); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -78091,7 +78264,7 @@ const WatchCommand = { }; /***/ }), -/* 686 */ +/* 687 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78165,7 +78338,7 @@ function waitUntilWatchIsReady(stream, opts = {}) { } /***/ }), -/* 687 */ +/* 688 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78173,15 +78346,15 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runCommand", function() { return runCommand; }); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var indent_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(688); +/* harmony import */ var indent_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(689); /* harmony import */ var indent_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(indent_string__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var wrap_ansi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(689); +/* harmony import */ var wrap_ansi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(690); /* harmony import */ var wrap_ansi__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(wrap_ansi__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(513); +/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(514); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(499); -/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(696); -/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(697); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(500); +/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(697); +/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(698); 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; } @@ -78269,7 +78442,7 @@ function toArray(value) { } /***/ }), -/* 688 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78303,13 +78476,13 @@ module.exports = (str, count, opts) => { /***/ }), -/* 689 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const stringWidth = __webpack_require__(690); -const stripAnsi = __webpack_require__(694); +const stringWidth = __webpack_require__(691); +const stripAnsi = __webpack_require__(695); const ESCAPES = new Set([ '\u001B', @@ -78503,13 +78676,13 @@ module.exports = (str, cols, opts) => { /***/ }), -/* 690 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const stripAnsi = __webpack_require__(691); -const isFullwidthCodePoint = __webpack_require__(693); +const stripAnsi = __webpack_require__(692); +const isFullwidthCodePoint = __webpack_require__(694); module.exports = str => { if (typeof str !== 'string' || str.length === 0) { @@ -78546,18 +78719,18 @@ module.exports = str => { /***/ }), -/* 691 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const ansiRegex = __webpack_require__(692); +const ansiRegex = __webpack_require__(693); module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; /***/ }), -/* 692 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78574,7 +78747,7 @@ module.exports = () => { /***/ }), -/* 693 */ +/* 694 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78627,18 +78800,18 @@ module.exports = x => { /***/ }), -/* 694 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const ansiRegex = __webpack_require__(695); +const ansiRegex = __webpack_require__(696); module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; /***/ }), -/* 695 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78655,7 +78828,7 @@ module.exports = () => { /***/ }), -/* 696 */ +/* 697 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78808,7 +78981,7 @@ function addProjectToTree(tree, pathParts, project) { } /***/ }), -/* 697 */ +/* 698 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -78816,12 +78989,12 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kibana", function() { return Kibana; }); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16); /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(698); +/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(699); /* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(multimatch__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(702); +/* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(703); /* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(is_path_inside__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(499); -/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(577); +/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(500); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(578); 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; } @@ -78962,15 +79135,15 @@ class Kibana { } /***/ }), -/* 698 */ +/* 699 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const minimatch = __webpack_require__(503); -const arrayUnion = __webpack_require__(699); -const arrayDiffer = __webpack_require__(700); -const arrify = __webpack_require__(701); +const minimatch = __webpack_require__(504); +const arrayUnion = __webpack_require__(700); +const arrayDiffer = __webpack_require__(701); +const arrify = __webpack_require__(702); module.exports = (list, patterns, options = {}) => { list = arrify(list); @@ -78994,7 +79167,7 @@ module.exports = (list, patterns, options = {}) => { /***/ }), -/* 699 */ +/* 700 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79006,7 +79179,7 @@ module.exports = (...arguments_) => { /***/ }), -/* 700 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79021,7 +79194,7 @@ module.exports = arrayDiffer; /***/ }), -/* 701 */ +/* 702 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79051,7 +79224,7 @@ module.exports = arrify; /***/ }), -/* 702 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79079,15 +79252,15 @@ module.exports = (childPath, parentPath) => { /***/ }), -/* 703 */ +/* 704 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _build_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(704); +/* harmony import */ var _build_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(705); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return _build_production_projects__WEBPACK_IMPORTED_MODULE_0__["buildProductionProjects"]; }); -/* harmony import */ var _prepare_project_dependencies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(922); +/* harmony import */ var _prepare_project_dependencies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareExternalProjectDependencies", function() { return _prepare_project_dependencies__WEBPACK_IMPORTED_MODULE_1__["prepareExternalProjectDependencies"]; }); /* @@ -79112,23 +79285,23 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 704 */ +/* 705 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return buildProductionProjects; }); -/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(705); +/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(706); /* 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__(585); +/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(586); /* 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__(16); /* 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__(577); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(578); /* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(20); /* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(34); -/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(515); -/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(499); +/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(516); +/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(500); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -79260,7 +79433,7 @@ async function copyToBuild(project, kibanaRoot, buildRoot) { } /***/ }), -/* 705 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79268,13 +79441,13 @@ async function copyToBuild(project, kibanaRoot, buildRoot) { const EventEmitter = __webpack_require__(379); const path = __webpack_require__(16); const os = __webpack_require__(11); -const pAll = __webpack_require__(706); -const arrify = __webpack_require__(708); -const globby = __webpack_require__(709); -const isGlob = __webpack_require__(603); -const cpFile = __webpack_require__(907); -const junk = __webpack_require__(919); -const CpyError = __webpack_require__(920); +const pAll = __webpack_require__(707); +const arrify = __webpack_require__(709); +const globby = __webpack_require__(710); +const isGlob = __webpack_require__(604); +const cpFile = __webpack_require__(913); +const junk = __webpack_require__(925); +const CpyError = __webpack_require__(926); const defaultOptions = { ignoreJunk: true @@ -79393,12 +79566,12 @@ module.exports = (source, destination, { /***/ }), -/* 706 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pMap = __webpack_require__(707); +const pMap = __webpack_require__(708); module.exports = (iterable, options) => pMap(iterable, element => element(), options); // TODO: Remove this for the next major release @@ -79406,7 +79579,7 @@ module.exports.default = module.exports; /***/ }), -/* 707 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79485,7 +79658,7 @@ module.exports.default = pMap; /***/ }), -/* 708 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79515,17 +79688,17 @@ module.exports = arrify; /***/ }), -/* 709 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); -const arrayUnion = __webpack_require__(710); -const glob = __webpack_require__(712); -const fastGlob = __webpack_require__(717); -const dirGlob = __webpack_require__(900); -const gitignore = __webpack_require__(903); +const arrayUnion = __webpack_require__(711); +const glob = __webpack_require__(713); +const fastGlob = __webpack_require__(718); +const dirGlob = __webpack_require__(906); +const gitignore = __webpack_require__(909); const DEFAULT_FILTER = () => false; @@ -79670,12 +79843,12 @@ module.exports.gitignore = gitignore; /***/ }), -/* 710 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var arrayUniq = __webpack_require__(711); +var arrayUniq = __webpack_require__(712); module.exports = function () { return arrayUniq([].concat.apply([], arguments)); @@ -79683,7 +79856,7 @@ module.exports = function () { /***/ }), -/* 711 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79752,7 +79925,7 @@ if ('Set' in global) { /***/ }), -/* 712 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { // Approach: @@ -79798,21 +79971,21 @@ if ('Set' in global) { module.exports = glob var fs = __webpack_require__(23) -var rp = __webpack_require__(501) -var minimatch = __webpack_require__(503) +var rp = __webpack_require__(502) +var minimatch = __webpack_require__(504) var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__(713) +var inherits = __webpack_require__(714) var EE = __webpack_require__(379).EventEmitter var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(509) -var globSync = __webpack_require__(715) -var common = __webpack_require__(716) +var isAbsolute = __webpack_require__(510) +var globSync = __webpack_require__(716) +var common = __webpack_require__(717) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp -var inflight = __webpack_require__(512) +var inflight = __webpack_require__(513) var util = __webpack_require__(29) var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored @@ -80548,7 +80721,7 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { /***/ }), -/* 713 */ +/* 714 */ /***/ (function(module, exports, __webpack_require__) { try { @@ -80558,12 +80731,12 @@ try { module.exports = util.inherits; } catch (e) { /* istanbul ignore next */ - module.exports = __webpack_require__(714); + module.exports = __webpack_require__(715); } /***/ }), -/* 714 */ +/* 715 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { @@ -80596,22 +80769,22 @@ if (typeof Object.create === 'function') { /***/ }), -/* 715 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { module.exports = globSync globSync.GlobSync = GlobSync var fs = __webpack_require__(23) -var rp = __webpack_require__(501) -var minimatch = __webpack_require__(503) +var rp = __webpack_require__(502) +var minimatch = __webpack_require__(504) var Minimatch = minimatch.Minimatch -var Glob = __webpack_require__(712).Glob +var Glob = __webpack_require__(713).Glob var util = __webpack_require__(29) var path = __webpack_require__(16) var assert = __webpack_require__(30) -var isAbsolute = __webpack_require__(509) -var common = __webpack_require__(716) +var isAbsolute = __webpack_require__(510) +var common = __webpack_require__(717) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts @@ -81088,7 +81261,7 @@ GlobSync.prototype._makeAbs = function (f) { /***/ }), -/* 716 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { exports.alphasort = alphasort @@ -81106,8 +81279,8 @@ function ownProp (obj, field) { } var path = __webpack_require__(16) -var minimatch = __webpack_require__(503) -var isAbsolute = __webpack_require__(509) +var minimatch = __webpack_require__(504) +var isAbsolute = __webpack_require__(510) var Minimatch = minimatch.Minimatch function alphasorti (a, b) { @@ -81334,10 +81507,10 @@ function childrenIgnored (self, path) { /***/ }), -/* 717 */ +/* 718 */ /***/ (function(module, exports, __webpack_require__) { -const pkg = __webpack_require__(718); +const pkg = __webpack_require__(719); module.exports = pkg.async; module.exports.default = pkg.async; @@ -81350,19 +81523,19 @@ module.exports.generateTasks = pkg.generateTasks; /***/ }), -/* 718 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var optionsManager = __webpack_require__(719); -var taskManager = __webpack_require__(720); -var reader_async_1 = __webpack_require__(871); -var reader_stream_1 = __webpack_require__(895); -var reader_sync_1 = __webpack_require__(896); -var arrayUtils = __webpack_require__(898); -var streamUtils = __webpack_require__(899); +var optionsManager = __webpack_require__(720); +var taskManager = __webpack_require__(721); +var reader_async_1 = __webpack_require__(877); +var reader_stream_1 = __webpack_require__(901); +var reader_sync_1 = __webpack_require__(902); +var arrayUtils = __webpack_require__(904); +var streamUtils = __webpack_require__(905); /** * Synchronous API. */ @@ -81428,7 +81601,7 @@ function isString(source) { /***/ }), -/* 719 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81466,13 +81639,13 @@ exports.prepare = prepare; /***/ }), -/* 720 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var patternUtils = __webpack_require__(721); +var patternUtils = __webpack_require__(722); /** * Generate tasks based on parent directory of each pattern. */ @@ -81563,16 +81736,16 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ }), -/* 721 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(16); -var globParent = __webpack_require__(722); -var isGlob = __webpack_require__(725); -var micromatch = __webpack_require__(726); +var globParent = __webpack_require__(723); +var isGlob = __webpack_require__(726); +var micromatch = __webpack_require__(727); var GLOBSTAR = '**'; /** * Return true for static pattern. @@ -81718,15 +81891,15 @@ exports.matchAny = matchAny; /***/ }), -/* 722 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var path = __webpack_require__(16); -var isglob = __webpack_require__(723); -var pathDirname = __webpack_require__(724); +var isglob = __webpack_require__(724); +var pathDirname = __webpack_require__(725); var isWin32 = __webpack_require__(11).platform() === 'win32'; module.exports = function globParent(str) { @@ -81749,7 +81922,7 @@ module.exports = function globParent(str) { /***/ }), -/* 723 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -81759,7 +81932,7 @@ module.exports = function globParent(str) { * Licensed under the MIT License. */ -var isExtglob = __webpack_require__(604); +var isExtglob = __webpack_require__(605); module.exports = function isGlob(str) { if (typeof str !== 'string' || str === '') { @@ -81780,7 +81953,7 @@ module.exports = function isGlob(str) { /***/ }), -/* 724 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81930,7 +82103,7 @@ module.exports.win32 = win32; /***/ }), -/* 725 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { /*! @@ -81940,7 +82113,7 @@ module.exports.win32 = win32; * Released under the MIT License. */ -var isExtglob = __webpack_require__(604); +var isExtglob = __webpack_require__(605); var chars = { '{': '}', '(': ')', '[': ']'}; module.exports = function isGlob(str, options) { @@ -81982,7 +82155,7 @@ module.exports = function isGlob(str, options) { /***/ }), -/* 726 */ +/* 727 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -81993,18 +82166,18 @@ module.exports = function isGlob(str, options) { */ var util = __webpack_require__(29); -var braces = __webpack_require__(727); -var toRegex = __webpack_require__(829); -var extend = __webpack_require__(837); +var braces = __webpack_require__(728); +var toRegex = __webpack_require__(830); +var extend = __webpack_require__(838); /** * Local dependencies */ -var compilers = __webpack_require__(840); -var parsers = __webpack_require__(867); -var cache = __webpack_require__(868); -var utils = __webpack_require__(869); +var compilers = __webpack_require__(841); +var parsers = __webpack_require__(873); +var cache = __webpack_require__(874); +var utils = __webpack_require__(875); var MAX_LENGTH = 1024 * 64; /** @@ -82866,7 +83039,7 @@ module.exports = micromatch; /***/ }), -/* 727 */ +/* 728 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -82876,18 +83049,18 @@ module.exports = micromatch; * Module dependencies */ -var toRegex = __webpack_require__(728); -var unique = __webpack_require__(740); -var extend = __webpack_require__(737); +var toRegex = __webpack_require__(729); +var unique = __webpack_require__(741); +var extend = __webpack_require__(738); /** * Local dependencies */ -var compilers = __webpack_require__(741); -var parsers = __webpack_require__(756); -var Braces = __webpack_require__(766); -var utils = __webpack_require__(742); +var compilers = __webpack_require__(742); +var parsers = __webpack_require__(757); +var Braces = __webpack_require__(767); +var utils = __webpack_require__(743); var MAX_LENGTH = 1024 * 64; var cache = {}; @@ -83191,15 +83364,15 @@ module.exports = braces; /***/ }), -/* 728 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var define = __webpack_require__(729); -var extend = __webpack_require__(737); -var not = __webpack_require__(739); +var define = __webpack_require__(730); +var extend = __webpack_require__(738); +var not = __webpack_require__(740); var MAX_LENGTH = 1024 * 64; /** @@ -83346,7 +83519,7 @@ module.exports.makeRe = makeRe; /***/ }), -/* 729 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83359,7 +83532,7 @@ module.exports.makeRe = makeRe; -var isDescriptor = __webpack_require__(730); +var isDescriptor = __webpack_require__(731); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -83384,7 +83557,7 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 730 */ +/* 731 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83397,9 +83570,9 @@ module.exports = function defineProperty(obj, prop, val) { -var typeOf = __webpack_require__(731); -var isAccessor = __webpack_require__(732); -var isData = __webpack_require__(735); +var typeOf = __webpack_require__(732); +var isAccessor = __webpack_require__(733); +var isData = __webpack_require__(736); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -83413,7 +83586,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 731 */ +/* 732 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -83566,7 +83739,7 @@ function isBuffer(val) { /***/ }), -/* 732 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83579,7 +83752,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(733); +var typeOf = __webpack_require__(734); // accessor descriptor properties var accessor = { @@ -83642,10 +83815,10 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 733 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(734); +var isBuffer = __webpack_require__(735); var toString = Object.prototype.toString; /** @@ -83764,7 +83937,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 734 */ +/* 735 */ /***/ (function(module, exports) { /*! @@ -83791,7 +83964,7 @@ function isSlowBuffer (obj) { /***/ }), -/* 735 */ +/* 736 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83804,7 +83977,7 @@ function isSlowBuffer (obj) { -var typeOf = __webpack_require__(736); +var typeOf = __webpack_require__(737); // data descriptor properties var data = { @@ -83853,10 +84026,10 @@ module.exports = isDataDescriptor; /***/ }), -/* 736 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(734); +var isBuffer = __webpack_require__(735); var toString = Object.prototype.toString; /** @@ -83975,13 +84148,13 @@ module.exports = function kindOf(val) { /***/ }), -/* 737 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(738); +var isObject = __webpack_require__(739); module.exports = function extend(o/*, objects*/) { if (!isObject(o)) { o = {}; } @@ -84015,7 +84188,7 @@ function hasOwn(obj, key) { /***/ }), -/* 738 */ +/* 739 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84035,13 +84208,13 @@ module.exports = function isExtendable(val) { /***/ }), -/* 739 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(737); +var extend = __webpack_require__(738); /** * The main export is a function that takes a `pattern` string and an `options` object. @@ -84108,7 +84281,7 @@ module.exports = toRegex; /***/ }), -/* 740 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84158,13 +84331,13 @@ module.exports.immutable = function uniqueImmutable(arr) { /***/ }), -/* 741 */ +/* 742 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(742); +var utils = __webpack_require__(743); module.exports = function(braces, options) { braces.compiler @@ -84447,25 +84620,25 @@ function hasQueue(node) { /***/ }), -/* 742 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var splitString = __webpack_require__(743); +var splitString = __webpack_require__(744); var utils = module.exports; /** * Module dependencies */ -utils.extend = __webpack_require__(737); -utils.flatten = __webpack_require__(749); -utils.isObject = __webpack_require__(747); -utils.fillRange = __webpack_require__(750); -utils.repeat = __webpack_require__(755); -utils.unique = __webpack_require__(740); +utils.extend = __webpack_require__(738); +utils.flatten = __webpack_require__(750); +utils.isObject = __webpack_require__(748); +utils.fillRange = __webpack_require__(751); +utils.repeat = __webpack_require__(756); +utils.unique = __webpack_require__(741); utils.define = function(obj, key, val) { Object.defineProperty(obj, key, { @@ -84797,7 +84970,7 @@ utils.escapeRegex = function(str) { /***/ }), -/* 743 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -84810,7 +84983,7 @@ utils.escapeRegex = function(str) { -var extend = __webpack_require__(744); +var extend = __webpack_require__(745); module.exports = function(str, options, fn) { if (typeof str !== 'string') { @@ -84975,14 +85148,14 @@ function keepEscaping(opts, str, idx) { /***/ }), -/* 744 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(745); -var assignSymbols = __webpack_require__(748); +var isExtendable = __webpack_require__(746); +var assignSymbols = __webpack_require__(749); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -85042,7 +85215,7 @@ function isEnum(obj, key) { /***/ }), -/* 745 */ +/* 746 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85055,7 +85228,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(746); +var isPlainObject = __webpack_require__(747); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -85063,7 +85236,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 746 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85076,7 +85249,7 @@ module.exports = function isExtendable(val) { -var isObject = __webpack_require__(747); +var isObject = __webpack_require__(748); function isObjectObject(o) { return isObject(o) === true @@ -85107,7 +85280,7 @@ module.exports = function isPlainObject(o) { /***/ }), -/* 747 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85126,7 +85299,7 @@ module.exports = function isObject(val) { /***/ }), -/* 748 */ +/* 749 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85173,7 +85346,7 @@ module.exports = function(receiver, objects) { /***/ }), -/* 749 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85202,7 +85375,7 @@ function flat(arr, res) { /***/ }), -/* 750 */ +/* 751 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85216,10 +85389,10 @@ function flat(arr, res) { var util = __webpack_require__(29); -var isNumber = __webpack_require__(751); -var extend = __webpack_require__(737); -var repeat = __webpack_require__(753); -var toRegex = __webpack_require__(754); +var isNumber = __webpack_require__(752); +var extend = __webpack_require__(738); +var repeat = __webpack_require__(754); +var toRegex = __webpack_require__(755); /** * Return a range of numbers or letters. @@ -85417,7 +85590,7 @@ module.exports = fillRange; /***/ }), -/* 751 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85430,7 +85603,7 @@ module.exports = fillRange; -var typeOf = __webpack_require__(752); +var typeOf = __webpack_require__(753); module.exports = function isNumber(num) { var type = typeOf(num); @@ -85446,10 +85619,10 @@ module.exports = function isNumber(num) { /***/ }), -/* 752 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(734); +var isBuffer = __webpack_require__(735); var toString = Object.prototype.toString; /** @@ -85568,7 +85741,7 @@ module.exports = function kindOf(val) { /***/ }), -/* 753 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85645,7 +85818,7 @@ function repeat(str, num) { /***/ }), -/* 754 */ +/* 755 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85658,8 +85831,8 @@ function repeat(str, num) { -var repeat = __webpack_require__(753); -var isNumber = __webpack_require__(751); +var repeat = __webpack_require__(754); +var isNumber = __webpack_require__(752); var cache = {}; function toRegexRange(min, max, options) { @@ -85946,7 +86119,7 @@ module.exports = toRegexRange; /***/ }), -/* 755 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85971,14 +86144,14 @@ module.exports = function repeat(ele, num) { /***/ }), -/* 756 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Node = __webpack_require__(757); -var utils = __webpack_require__(742); +var Node = __webpack_require__(758); +var utils = __webpack_require__(743); /** * Braces parsers @@ -86338,15 +86511,15 @@ function concatNodes(pos, node, parent, options) { /***/ }), -/* 757 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(747); -var define = __webpack_require__(758); -var utils = __webpack_require__(765); +var isObject = __webpack_require__(748); +var define = __webpack_require__(759); +var utils = __webpack_require__(766); var ownNames; /** @@ -86837,7 +87010,7 @@ exports = module.exports = Node; /***/ }), -/* 758 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86850,7 +87023,7 @@ exports = module.exports = Node; -var isDescriptor = __webpack_require__(759); +var isDescriptor = __webpack_require__(760); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -86875,7 +87048,7 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 759 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86888,9 +87061,9 @@ module.exports = function defineProperty(obj, prop, val) { -var typeOf = __webpack_require__(760); -var isAccessor = __webpack_require__(761); -var isData = __webpack_require__(763); +var typeOf = __webpack_require__(761); +var isAccessor = __webpack_require__(762); +var isData = __webpack_require__(764); module.exports = function isDescriptor(obj, key) { if (typeOf(obj) !== 'object') { @@ -86904,7 +87077,7 @@ module.exports = function isDescriptor(obj, key) { /***/ }), -/* 760 */ +/* 761 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -87039,7 +87212,7 @@ function isBuffer(val) { /***/ }), -/* 761 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87052,7 +87225,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(762); +var typeOf = __webpack_require__(763); // accessor descriptor properties var accessor = { @@ -87115,7 +87288,7 @@ module.exports = isAccessorDescriptor; /***/ }), -/* 762 */ +/* 763 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -87250,7 +87423,7 @@ function isBuffer(val) { /***/ }), -/* 763 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87263,7 +87436,7 @@ function isBuffer(val) { -var typeOf = __webpack_require__(764); +var typeOf = __webpack_require__(765); module.exports = function isDataDescriptor(obj, prop) { // data descriptor properties @@ -87306,7 +87479,7 @@ module.exports = function isDataDescriptor(obj, prop) { /***/ }), -/* 764 */ +/* 765 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -87441,13 +87614,13 @@ function isBuffer(val) { /***/ }), -/* 765 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var typeOf = __webpack_require__(752); +var typeOf = __webpack_require__(753); var utils = module.exports; /** @@ -88467,17 +88640,17 @@ function assert(val, message) { /***/ }), -/* 766 */ +/* 767 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(737); -var Snapdragon = __webpack_require__(767); -var compilers = __webpack_require__(741); -var parsers = __webpack_require__(756); -var utils = __webpack_require__(742); +var extend = __webpack_require__(738); +var Snapdragon = __webpack_require__(768); +var compilers = __webpack_require__(742); +var parsers = __webpack_require__(757); +var utils = __webpack_require__(743); /** * Customize Snapdragon parser and renderer @@ -88578,17 +88751,17 @@ module.exports = Braces; /***/ }), -/* 767 */ +/* 768 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Base = __webpack_require__(768); -var define = __webpack_require__(729); -var Compiler = __webpack_require__(797); -var Parser = __webpack_require__(826); -var utils = __webpack_require__(806); +var Base = __webpack_require__(769); +var define = __webpack_require__(730); +var Compiler = __webpack_require__(798); +var Parser = __webpack_require__(827); +var utils = __webpack_require__(807); var regexCache = {}; var cache = {}; @@ -88759,20 +88932,20 @@ module.exports.Parser = Parser; /***/ }), -/* 768 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(29); -var define = __webpack_require__(769); -var CacheBase = __webpack_require__(770); -var Emitter = __webpack_require__(771); -var isObject = __webpack_require__(747); -var merge = __webpack_require__(788); -var pascal = __webpack_require__(791); -var cu = __webpack_require__(792); +var define = __webpack_require__(770); +var CacheBase = __webpack_require__(771); +var Emitter = __webpack_require__(772); +var isObject = __webpack_require__(748); +var merge = __webpack_require__(789); +var pascal = __webpack_require__(792); +var cu = __webpack_require__(793); /** * Optionally define a custom `cache` namespace to use. @@ -89201,7 +89374,7 @@ module.exports.namespace = namespace; /***/ }), -/* 769 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89214,7 +89387,7 @@ module.exports.namespace = namespace; -var isDescriptor = __webpack_require__(759); +var isDescriptor = __webpack_require__(760); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -89239,21 +89412,21 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 770 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(747); -var Emitter = __webpack_require__(771); -var visit = __webpack_require__(772); -var toPath = __webpack_require__(775); -var union = __webpack_require__(776); -var del = __webpack_require__(780); -var get = __webpack_require__(778); -var has = __webpack_require__(785); -var set = __webpack_require__(779); +var isObject = __webpack_require__(748); +var Emitter = __webpack_require__(772); +var visit = __webpack_require__(773); +var toPath = __webpack_require__(776); +var union = __webpack_require__(777); +var del = __webpack_require__(781); +var get = __webpack_require__(779); +var has = __webpack_require__(786); +var set = __webpack_require__(780); /** * Create a `Cache` constructor that when instantiated will @@ -89507,7 +89680,7 @@ module.exports.namespace = namespace; /***/ }), -/* 771 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { @@ -89676,7 +89849,7 @@ Emitter.prototype.hasListeners = function(event){ /***/ }), -/* 772 */ +/* 773 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89689,8 +89862,8 @@ Emitter.prototype.hasListeners = function(event){ -var visit = __webpack_require__(773); -var mapVisit = __webpack_require__(774); +var visit = __webpack_require__(774); +var mapVisit = __webpack_require__(775); module.exports = function(collection, method, val) { var result; @@ -89713,7 +89886,7 @@ module.exports = function(collection, method, val) { /***/ }), -/* 773 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89726,7 +89899,7 @@ module.exports = function(collection, method, val) { -var isObject = __webpack_require__(747); +var isObject = __webpack_require__(748); module.exports = function visit(thisArg, method, target, val) { if (!isObject(thisArg) && typeof thisArg !== 'function') { @@ -89753,14 +89926,14 @@ module.exports = function visit(thisArg, method, target, val) { /***/ }), -/* 774 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(29); -var visit = __webpack_require__(773); +var visit = __webpack_require__(774); /** * Map `visit` over an array of objects. @@ -89797,7 +89970,7 @@ function isObject(val) { /***/ }), -/* 775 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89810,7 +89983,7 @@ function isObject(val) { -var typeOf = __webpack_require__(752); +var typeOf = __webpack_require__(753); module.exports = function toPath(args) { if (typeOf(args) !== 'arguments') { @@ -89837,16 +90010,16 @@ function filter(arr) { /***/ }), -/* 776 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isObject = __webpack_require__(738); -var union = __webpack_require__(777); -var get = __webpack_require__(778); -var set = __webpack_require__(779); +var isObject = __webpack_require__(739); +var union = __webpack_require__(778); +var get = __webpack_require__(779); +var set = __webpack_require__(780); module.exports = function unionValue(obj, prop, value) { if (!isObject(obj)) { @@ -89874,7 +90047,7 @@ function arrayify(val) { /***/ }), -/* 777 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89910,7 +90083,7 @@ module.exports = function union(init) { /***/ }), -/* 778 */ +/* 779 */ /***/ (function(module, exports) { /*! @@ -89966,7 +90139,7 @@ function toString(val) { /***/ }), -/* 779 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89979,10 +90152,10 @@ function toString(val) { -var split = __webpack_require__(743); -var extend = __webpack_require__(737); -var isPlainObject = __webpack_require__(746); -var isObject = __webpack_require__(738); +var split = __webpack_require__(744); +var extend = __webpack_require__(738); +var isPlainObject = __webpack_require__(747); +var isObject = __webpack_require__(739); module.exports = function(obj, prop, val) { if (!isObject(obj)) { @@ -90028,7 +90201,7 @@ function isValidKey(key) { /***/ }), -/* 780 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90041,8 +90214,8 @@ function isValidKey(key) { -var isObject = __webpack_require__(747); -var has = __webpack_require__(781); +var isObject = __webpack_require__(748); +var has = __webpack_require__(782); module.exports = function unset(obj, prop) { if (!isObject(obj)) { @@ -90067,7 +90240,7 @@ module.exports = function unset(obj, prop) { /***/ }), -/* 781 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90080,9 +90253,9 @@ module.exports = function unset(obj, prop) { -var isObject = __webpack_require__(782); -var hasValues = __webpack_require__(784); -var get = __webpack_require__(778); +var isObject = __webpack_require__(783); +var hasValues = __webpack_require__(785); +var get = __webpack_require__(779); module.exports = function(obj, prop, noZero) { if (isObject(obj)) { @@ -90093,7 +90266,7 @@ module.exports = function(obj, prop, noZero) { /***/ }), -/* 782 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90106,7 +90279,7 @@ module.exports = function(obj, prop, noZero) { -var isArray = __webpack_require__(783); +var isArray = __webpack_require__(784); module.exports = function isObject(val) { return val != null && typeof val === 'object' && isArray(val) === false; @@ -90114,7 +90287,7 @@ module.exports = function isObject(val) { /***/ }), -/* 783 */ +/* 784 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -90125,7 +90298,7 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 784 */ +/* 785 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90168,7 +90341,7 @@ module.exports = function hasValue(o, noZero) { /***/ }), -/* 785 */ +/* 786 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90181,9 +90354,9 @@ module.exports = function hasValue(o, noZero) { -var isObject = __webpack_require__(747); -var hasValues = __webpack_require__(786); -var get = __webpack_require__(778); +var isObject = __webpack_require__(748); +var hasValues = __webpack_require__(787); +var get = __webpack_require__(779); module.exports = function(val, prop) { return hasValues(isObject(val) && prop ? get(val, prop) : val); @@ -90191,7 +90364,7 @@ module.exports = function(val, prop) { /***/ }), -/* 786 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90204,8 +90377,8 @@ module.exports = function(val, prop) { -var typeOf = __webpack_require__(787); -var isNumber = __webpack_require__(751); +var typeOf = __webpack_require__(788); +var isNumber = __webpack_require__(752); module.exports = function hasValue(val) { // is-number checks for NaN and other edge cases @@ -90258,10 +90431,10 @@ module.exports = function hasValue(val) { /***/ }), -/* 787 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { -var isBuffer = __webpack_require__(734); +var isBuffer = __webpack_require__(735); var toString = Object.prototype.toString; /** @@ -90383,14 +90556,14 @@ module.exports = function kindOf(val) { /***/ }), -/* 788 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(789); -var forIn = __webpack_require__(790); +var isExtendable = __webpack_require__(790); +var forIn = __webpack_require__(791); function mixinDeep(target, objects) { var len = arguments.length, i = 0; @@ -90454,7 +90627,7 @@ module.exports = mixinDeep; /***/ }), -/* 789 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90467,7 +90640,7 @@ module.exports = mixinDeep; -var isPlainObject = __webpack_require__(746); +var isPlainObject = __webpack_require__(747); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -90475,7 +90648,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 790 */ +/* 791 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90498,7 +90671,7 @@ module.exports = function forIn(obj, fn, thisArg) { /***/ }), -/* 791 */ +/* 792 */ /***/ (function(module, exports) { /*! @@ -90525,14 +90698,14 @@ module.exports = pascalcase; /***/ }), -/* 792 */ +/* 793 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var util = __webpack_require__(29); -var utils = __webpack_require__(793); +var utils = __webpack_require__(794); /** * Expose class utils @@ -90897,7 +91070,7 @@ cu.bubble = function(Parent, events) { /***/ }), -/* 793 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90911,10 +91084,10 @@ var utils = {}; * Lazily required module dependencies */ -utils.union = __webpack_require__(777); -utils.define = __webpack_require__(729); -utils.isObj = __webpack_require__(747); -utils.staticExtend = __webpack_require__(794); +utils.union = __webpack_require__(778); +utils.define = __webpack_require__(730); +utils.isObj = __webpack_require__(748); +utils.staticExtend = __webpack_require__(795); /** @@ -90925,7 +91098,7 @@ module.exports = utils; /***/ }), -/* 794 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -90938,8 +91111,8 @@ module.exports = utils; -var copy = __webpack_require__(795); -var define = __webpack_require__(729); +var copy = __webpack_require__(796); +var define = __webpack_require__(730); var util = __webpack_require__(29); /** @@ -91022,15 +91195,15 @@ module.exports = extend; /***/ }), -/* 795 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var typeOf = __webpack_require__(752); -var copyDescriptor = __webpack_require__(796); -var define = __webpack_require__(729); +var typeOf = __webpack_require__(753); +var copyDescriptor = __webpack_require__(797); +var define = __webpack_require__(730); /** * Copy static properties, prototype properties, and descriptors from one object to another. @@ -91203,7 +91376,7 @@ module.exports.has = has; /***/ }), -/* 796 */ +/* 797 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91291,16 +91464,16 @@ function isObject(val) { /***/ }), -/* 797 */ +/* 798 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(798); -var define = __webpack_require__(729); -var debug = __webpack_require__(800)('snapdragon:compiler'); -var utils = __webpack_require__(806); +var use = __webpack_require__(799); +var define = __webpack_require__(730); +var debug = __webpack_require__(801)('snapdragon:compiler'); +var utils = __webpack_require__(807); /** * Create a new `Compiler` with the given `options`. @@ -91454,7 +91627,7 @@ Compiler.prototype = { // source map support if (opts.sourcemap) { - var sourcemaps = __webpack_require__(825); + var sourcemaps = __webpack_require__(826); sourcemaps(this); this.mapVisit(this.ast.nodes); this.applySourceMaps(); @@ -91475,7 +91648,7 @@ module.exports = Compiler; /***/ }), -/* 798 */ +/* 799 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91488,7 +91661,7 @@ module.exports = Compiler; -var utils = __webpack_require__(799); +var utils = __webpack_require__(800); module.exports = function base(app, opts) { if (!utils.isObject(app) && typeof app !== 'function') { @@ -91603,7 +91776,7 @@ module.exports = function base(app, opts) { /***/ }), -/* 799 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -91617,8 +91790,8 @@ var utils = {}; * Lazily required module dependencies */ -utils.define = __webpack_require__(729); -utils.isObject = __webpack_require__(747); +utils.define = __webpack_require__(730); +utils.isObject = __webpack_require__(748); utils.isString = function(val) { @@ -91633,7 +91806,7 @@ module.exports = utils; /***/ }), -/* 800 */ +/* 801 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91642,14 +91815,14 @@ module.exports = utils; */ if (typeof process !== 'undefined' && process.type === 'renderer') { - module.exports = __webpack_require__(801); + module.exports = __webpack_require__(802); } else { - module.exports = __webpack_require__(804); + module.exports = __webpack_require__(805); } /***/ }), -/* 801 */ +/* 802 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91658,7 +91831,7 @@ if (typeof process !== 'undefined' && process.type === 'renderer') { * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(802); +exports = module.exports = __webpack_require__(803); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; @@ -91840,7 +92013,7 @@ function localstorage() { /***/ }), -/* 802 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { @@ -91856,7 +92029,7 @@ exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; -exports.humanize = __webpack_require__(803); +exports.humanize = __webpack_require__(804); /** * The currently active debug mode names, and names to skip. @@ -92048,7 +92221,7 @@ function coerce(val) { /***/ }), -/* 803 */ +/* 804 */ /***/ (function(module, exports) { /** @@ -92206,7 +92379,7 @@ function plural(ms, n, name) { /***/ }), -/* 804 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92222,7 +92395,7 @@ var util = __webpack_require__(29); * Expose `debug()` as the module. */ -exports = module.exports = __webpack_require__(802); +exports = module.exports = __webpack_require__(803); exports.init = init; exports.log = log; exports.formatArgs = formatArgs; @@ -92401,7 +92574,7 @@ function createWritableStdioStream (fd) { case 'PIPE': case 'TCP': - var net = __webpack_require__(805); + var net = __webpack_require__(806); stream = new net.Socket({ fd: fd, readable: false, @@ -92460,13 +92633,13 @@ exports.enable(load()); /***/ }), -/* 805 */ +/* 806 */ /***/ (function(module, exports) { module.exports = require("net"); /***/ }), -/* 806 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -92476,9 +92649,9 @@ module.exports = require("net"); * Module dependencies */ -exports.extend = __webpack_require__(737); -exports.SourceMap = __webpack_require__(807); -exports.sourceMapResolve = __webpack_require__(818); +exports.extend = __webpack_require__(738); +exports.SourceMap = __webpack_require__(808); +exports.sourceMapResolve = __webpack_require__(819); /** * Convert backslash in the given string to forward slashes @@ -92521,7 +92694,7 @@ exports.last = function(arr, n) { /***/ }), -/* 807 */ +/* 808 */ /***/ (function(module, exports, __webpack_require__) { /* @@ -92529,13 +92702,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__(808).SourceMapGenerator; -exports.SourceMapConsumer = __webpack_require__(814).SourceMapConsumer; -exports.SourceNode = __webpack_require__(817).SourceNode; +exports.SourceMapGenerator = __webpack_require__(809).SourceMapGenerator; +exports.SourceMapConsumer = __webpack_require__(815).SourceMapConsumer; +exports.SourceNode = __webpack_require__(818).SourceNode; /***/ }), -/* 808 */ +/* 809 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -92545,10 +92718,10 @@ exports.SourceNode = __webpack_require__(817).SourceNode; * http://opensource.org/licenses/BSD-3-Clause */ -var base64VLQ = __webpack_require__(809); -var util = __webpack_require__(811); -var ArraySet = __webpack_require__(812).ArraySet; -var MappingList = __webpack_require__(813).MappingList; +var base64VLQ = __webpack_require__(810); +var util = __webpack_require__(812); +var ArraySet = __webpack_require__(813).ArraySet; +var MappingList = __webpack_require__(814).MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -92957,7 +93130,7 @@ exports.SourceMapGenerator = SourceMapGenerator; /***/ }), -/* 809 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -92997,7 +93170,7 @@ exports.SourceMapGenerator = SourceMapGenerator; * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -var base64 = __webpack_require__(810); +var base64 = __webpack_require__(811); // 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, @@ -93103,7 +93276,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { /***/ }), -/* 810 */ +/* 811 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -93176,7 +93349,7 @@ exports.decode = function (charCode) { /***/ }), -/* 811 */ +/* 812 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -93599,7 +93772,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate /***/ }), -/* 812 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -93609,7 +93782,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(811); +var util = __webpack_require__(812); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; @@ -93726,7 +93899,7 @@ exports.ArraySet = ArraySet; /***/ }), -/* 813 */ +/* 814 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -93736,7 +93909,7 @@ exports.ArraySet = ArraySet; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(811); +var util = __webpack_require__(812); /** * Determine whether mappingB is after mappingA with respect to generated @@ -93811,7 +93984,7 @@ exports.MappingList = MappingList; /***/ }), -/* 814 */ +/* 815 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -93821,11 +93994,11 @@ exports.MappingList = MappingList; * http://opensource.org/licenses/BSD-3-Clause */ -var util = __webpack_require__(811); -var binarySearch = __webpack_require__(815); -var ArraySet = __webpack_require__(812).ArraySet; -var base64VLQ = __webpack_require__(809); -var quickSort = __webpack_require__(816).quickSort; +var util = __webpack_require__(812); +var binarySearch = __webpack_require__(816); +var ArraySet = __webpack_require__(813).ArraySet; +var base64VLQ = __webpack_require__(810); +var quickSort = __webpack_require__(817).quickSort; function SourceMapConsumer(aSourceMap) { var sourceMap = aSourceMap; @@ -94899,7 +95072,7 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; /***/ }), -/* 815 */ +/* 816 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -95016,7 +95189,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { /***/ }), -/* 816 */ +/* 817 */ /***/ (function(module, exports) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -95136,7 +95309,7 @@ exports.quickSort = function (ary, comparator) { /***/ }), -/* 817 */ +/* 818 */ /***/ (function(module, exports, __webpack_require__) { /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -95146,8 +95319,8 @@ exports.quickSort = function (ary, comparator) { * http://opensource.org/licenses/BSD-3-Clause */ -var SourceMapGenerator = __webpack_require__(808).SourceMapGenerator; -var util = __webpack_require__(811); +var SourceMapGenerator = __webpack_require__(809).SourceMapGenerator; +var util = __webpack_require__(812); // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). @@ -95555,17 +95728,17 @@ exports.SourceNode = SourceNode; /***/ }), -/* 818 */ +/* 819 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014, 2015, 2016, 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var sourceMappingURL = __webpack_require__(819) -var resolveUrl = __webpack_require__(820) -var decodeUriComponent = __webpack_require__(821) -var urix = __webpack_require__(823) -var atob = __webpack_require__(824) +var sourceMappingURL = __webpack_require__(820) +var resolveUrl = __webpack_require__(821) +var decodeUriComponent = __webpack_require__(822) +var urix = __webpack_require__(824) +var atob = __webpack_require__(825) @@ -95863,7 +96036,7 @@ module.exports = { /***/ }), -/* 819 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;// Copyright 2014 Simon Lydell @@ -95926,7 +96099,7 @@ void (function(root, factory) { /***/ }), -/* 820 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -95944,13 +96117,13 @@ module.exports = resolveUrl /***/ }), -/* 821 */ +/* 822 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Simon Lydell // X11 (“MIT”) Licensed. (See LICENSE.) -var decodeUriComponent = __webpack_require__(822) +var decodeUriComponent = __webpack_require__(823) function customDecodeUriComponent(string) { // `decodeUriComponent` turns `+` into ` `, but that's not wanted. @@ -95961,7 +96134,7 @@ module.exports = customDecodeUriComponent /***/ }), -/* 822 */ +/* 823 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -96062,7 +96235,7 @@ module.exports = function (encodedURI) { /***/ }), -/* 823 */ +/* 824 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2014 Simon Lydell @@ -96085,7 +96258,7 @@ module.exports = urix /***/ }), -/* 824 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -96099,7 +96272,7 @@ module.exports = atob.atob = atob; /***/ }), -/* 825 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -96107,8 +96280,8 @@ module.exports = atob.atob = atob; var fs = __webpack_require__(23); var path = __webpack_require__(16); -var define = __webpack_require__(729); -var utils = __webpack_require__(806); +var define = __webpack_require__(730); +var utils = __webpack_require__(807); /** * Expose `mixin()`. @@ -96251,19 +96424,19 @@ exports.comment = function(node) { /***/ }), -/* 826 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var use = __webpack_require__(798); +var use = __webpack_require__(799); var util = __webpack_require__(29); -var Cache = __webpack_require__(827); -var define = __webpack_require__(729); -var debug = __webpack_require__(800)('snapdragon:parser'); -var Position = __webpack_require__(828); -var utils = __webpack_require__(806); +var Cache = __webpack_require__(828); +var define = __webpack_require__(730); +var debug = __webpack_require__(801)('snapdragon:parser'); +var Position = __webpack_require__(829); +var utils = __webpack_require__(807); /** * Create a new `Parser` with the given `input` and `options`. @@ -96791,7 +96964,7 @@ module.exports = Parser; /***/ }), -/* 827 */ +/* 828 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -96898,13 +97071,13 @@ MapCache.prototype.del = function mapDelete(key) { /***/ }), -/* 828 */ +/* 829 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var define = __webpack_require__(729); +var define = __webpack_require__(730); /** * Store position for a node @@ -96919,16 +97092,16 @@ module.exports = function Position(start, parser) { /***/ }), -/* 829 */ +/* 830 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var safe = __webpack_require__(830); -var define = __webpack_require__(836); -var extend = __webpack_require__(837); -var not = __webpack_require__(839); +var safe = __webpack_require__(831); +var define = __webpack_require__(837); +var extend = __webpack_require__(838); +var not = __webpack_require__(840); var MAX_LENGTH = 1024 * 64; /** @@ -97081,10 +97254,10 @@ module.exports.makeRe = makeRe; /***/ }), -/* 830 */ +/* 831 */ /***/ (function(module, exports, __webpack_require__) { -var parse = __webpack_require__(831); +var parse = __webpack_require__(832); var types = parse.types; module.exports = function (re, opts) { @@ -97130,13 +97303,13 @@ function isRegExp (x) { /***/ }), -/* 831 */ +/* 832 */ /***/ (function(module, exports, __webpack_require__) { -var util = __webpack_require__(832); -var types = __webpack_require__(833); -var sets = __webpack_require__(834); -var positions = __webpack_require__(835); +var util = __webpack_require__(833); +var types = __webpack_require__(834); +var sets = __webpack_require__(835); +var positions = __webpack_require__(836); module.exports = function(regexpStr) { @@ -97418,11 +97591,11 @@ module.exports.types = types; /***/ }), -/* 832 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(833); -var sets = __webpack_require__(834); +var types = __webpack_require__(834); +var sets = __webpack_require__(835); // All of these are private and only used by randexp. @@ -97535,7 +97708,7 @@ exports.error = function(regexp, msg) { /***/ }), -/* 833 */ +/* 834 */ /***/ (function(module, exports) { module.exports = { @@ -97551,10 +97724,10 @@ module.exports = { /***/ }), -/* 834 */ +/* 835 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(833); +var types = __webpack_require__(834); var INTS = function() { return [{ type: types.RANGE , from: 48, to: 57 }]; @@ -97639,10 +97812,10 @@ exports.anyChar = function() { /***/ }), -/* 835 */ +/* 836 */ /***/ (function(module, exports, __webpack_require__) { -var types = __webpack_require__(833); +var types = __webpack_require__(834); exports.wordBoundary = function() { return { type: types.POSITION, value: 'b' }; @@ -97662,7 +97835,7 @@ exports.end = function() { /***/ }), -/* 836 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -97675,8 +97848,8 @@ exports.end = function() { -var isobject = __webpack_require__(747); -var isDescriptor = __webpack_require__(759); +var isobject = __webpack_require__(748); +var isDescriptor = __webpack_require__(760); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -97707,14 +97880,14 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 837 */ +/* 838 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(838); -var assignSymbols = __webpack_require__(748); +var isExtendable = __webpack_require__(839); +var assignSymbols = __webpack_require__(749); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -97774,7 +97947,7 @@ function isEnum(obj, key) { /***/ }), -/* 838 */ +/* 839 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -97787,7 +97960,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(746); +var isPlainObject = __webpack_require__(747); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -97795,14 +97968,14 @@ module.exports = function isExtendable(val) { /***/ }), -/* 839 */ +/* 840 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extend = __webpack_require__(837); -var safe = __webpack_require__(830); +var extend = __webpack_require__(838); +var safe = __webpack_require__(831); /** * The main export is a function that takes a `pattern` string and an `options` object. @@ -97874,14 +98047,14 @@ module.exports = toRegex; /***/ }), -/* 840 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var nanomatch = __webpack_require__(841); -var extglob = __webpack_require__(856); +var nanomatch = __webpack_require__(842); +var extglob = __webpack_require__(857); module.exports = function(snapdragon) { var compilers = snapdragon.compiler.compilers; @@ -97958,7 +98131,7 @@ function escapeExtglobs(compiler) { /***/ }), -/* 841 */ +/* 842 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -97969,17 +98142,17 @@ function escapeExtglobs(compiler) { */ var util = __webpack_require__(29); -var toRegex = __webpack_require__(728); -var extend = __webpack_require__(842); +var toRegex = __webpack_require__(729); +var extend = __webpack_require__(843); /** * Local dependencies */ -var compilers = __webpack_require__(844); -var parsers = __webpack_require__(845); -var cache = __webpack_require__(848); -var utils = __webpack_require__(850); +var compilers = __webpack_require__(845); +var parsers = __webpack_require__(846); +var cache = __webpack_require__(849); +var utils = __webpack_require__(851); var MAX_LENGTH = 1024 * 64; /** @@ -98803,14 +98976,14 @@ module.exports = nanomatch; /***/ }), -/* 842 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var isExtendable = __webpack_require__(843); -var assignSymbols = __webpack_require__(748); +var isExtendable = __webpack_require__(844); +var assignSymbols = __webpack_require__(749); module.exports = Object.assign || function(obj/*, objects*/) { if (obj === null || typeof obj === 'undefined') { @@ -98870,7 +99043,7 @@ function isEnum(obj, key) { /***/ }), -/* 843 */ +/* 844 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -98883,7 +99056,7 @@ function isEnum(obj, key) { -var isPlainObject = __webpack_require__(746); +var isPlainObject = __webpack_require__(747); module.exports = function isExtendable(val) { return isPlainObject(val) || typeof val === 'function' || Array.isArray(val); @@ -98891,7 +99064,7 @@ module.exports = function isExtendable(val) { /***/ }), -/* 844 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -99237,15 +99410,15 @@ module.exports = function(nanomatch, options) { /***/ }), -/* 845 */ +/* 846 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var regexNot = __webpack_require__(739); -var toRegex = __webpack_require__(728); -var isOdd = __webpack_require__(846); +var regexNot = __webpack_require__(740); +var toRegex = __webpack_require__(729); +var isOdd = __webpack_require__(847); /** * Characters to use in negation regex (we want to "not" match @@ -99631,7 +99804,7 @@ module.exports.not = NOT_REGEX; /***/ }), -/* 846 */ +/* 847 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -99644,7 +99817,7 @@ module.exports.not = NOT_REGEX; -var isNumber = __webpack_require__(847); +var isNumber = __webpack_require__(848); module.exports = function isOdd(i) { if (!isNumber(i)) { @@ -99658,7 +99831,7 @@ module.exports = function isOdd(i) { /***/ }), -/* 847 */ +/* 848 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -99686,14 +99859,14 @@ module.exports = function isNumber(num) { /***/ }), -/* 848 */ +/* 849 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(849))(); +module.exports = new (__webpack_require__(850))(); /***/ }), -/* 849 */ +/* 850 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -99706,7 +99879,7 @@ module.exports = new (__webpack_require__(849))(); -var MapCache = __webpack_require__(827); +var MapCache = __webpack_require__(828); /** * Create a new `FragmentCache` with an optional object to use for `caches`. @@ -99828,7 +100001,7 @@ exports = module.exports = FragmentCache; /***/ }), -/* 850 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -99841,14 +100014,14 @@ var path = __webpack_require__(16); * Module dependencies */ -var isWindows = __webpack_require__(851)(); -var Snapdragon = __webpack_require__(767); -utils.define = __webpack_require__(852); -utils.diff = __webpack_require__(853); -utils.extend = __webpack_require__(842); -utils.pick = __webpack_require__(854); -utils.typeOf = __webpack_require__(855); -utils.unique = __webpack_require__(740); +var isWindows = __webpack_require__(852)(); +var Snapdragon = __webpack_require__(768); +utils.define = __webpack_require__(853); +utils.diff = __webpack_require__(854); +utils.extend = __webpack_require__(843); +utils.pick = __webpack_require__(855); +utils.typeOf = __webpack_require__(856); +utils.unique = __webpack_require__(741); /** * Returns true if the given value is effectively an empty string @@ -100214,7 +100387,7 @@ utils.unixify = function(options) { /***/ }), -/* 851 */ +/* 852 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @@ -100242,7 +100415,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 852 */ +/* 853 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -100255,8 +100428,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ -var isobject = __webpack_require__(747); -var isDescriptor = __webpack_require__(759); +var isobject = __webpack_require__(748); +var isDescriptor = __webpack_require__(760); var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty) ? Reflect.defineProperty : Object.defineProperty; @@ -100287,7 +100460,7 @@ module.exports = function defineProperty(obj, key, val) { /***/ }), -/* 853 */ +/* 854 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -100341,7 +100514,7 @@ function diffArray(one, two) { /***/ }), -/* 854 */ +/* 855 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -100354,7 +100527,7 @@ function diffArray(one, two) { -var isObject = __webpack_require__(747); +var isObject = __webpack_require__(748); module.exports = function pick(obj, keys) { if (!isObject(obj) && typeof obj !== 'function') { @@ -100383,7 +100556,7 @@ module.exports = function pick(obj, keys) { /***/ }), -/* 855 */ +/* 856 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -100518,7 +100691,7 @@ function isBuffer(val) { /***/ }), -/* 856 */ +/* 857 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -100528,18 +100701,18 @@ function isBuffer(val) { * Module dependencies */ -var extend = __webpack_require__(737); -var unique = __webpack_require__(740); -var toRegex = __webpack_require__(728); +var extend = __webpack_require__(738); +var unique = __webpack_require__(741); +var toRegex = __webpack_require__(729); /** * Local dependencies */ -var compilers = __webpack_require__(857); -var parsers = __webpack_require__(863); -var Extglob = __webpack_require__(866); -var utils = __webpack_require__(865); +var compilers = __webpack_require__(858); +var parsers = __webpack_require__(869); +var Extglob = __webpack_require__(872); +var utils = __webpack_require__(871); var MAX_LENGTH = 1024 * 64; /** @@ -100856,13 +101029,13 @@ module.exports = extglob; /***/ }), -/* 857 */ +/* 858 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(858); +var brackets = __webpack_require__(859); /** * Extglob compilers @@ -101032,7 +101205,7 @@ module.exports = function(extglob) { /***/ }), -/* 858 */ +/* 859 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -101042,17 +101215,17 @@ module.exports = function(extglob) { * Local dependencies */ -var compilers = __webpack_require__(859); -var parsers = __webpack_require__(861); +var compilers = __webpack_require__(860); +var parsers = __webpack_require__(862); /** * Module dependencies */ -var debug = __webpack_require__(800)('expand-brackets'); -var extend = __webpack_require__(737); -var Snapdragon = __webpack_require__(767); -var toRegex = __webpack_require__(728); +var debug = __webpack_require__(864)('expand-brackets'); +var extend = __webpack_require__(738); +var Snapdragon = __webpack_require__(768); +var toRegex = __webpack_require__(729); /** * Parses the given POSIX character class `pattern` and returns a @@ -101250,13 +101423,13 @@ module.exports = brackets; /***/ }), -/* 859 */ +/* 860 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var posix = __webpack_require__(860); +var posix = __webpack_require__(861); module.exports = function(brackets) { brackets.compiler @@ -101344,7 +101517,7 @@ module.exports = function(brackets) { /***/ }), -/* 860 */ +/* 861 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -101373,282 +101546,1109 @@ module.exports = { /***/ }), -/* 861 */ +/* 862 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(863); +var define = __webpack_require__(730); + +/** + * Text regex + */ + +var TEXT_REGEX = '(\\[(?=.*\\])|\\])+'; +var not = utils.createRegex(TEXT_REGEX); + +/** + * Brackets parsers + */ + +function parsers(brackets) { + brackets.state = brackets.state || {}; + brackets.parser.sets.bracket = brackets.parser.sets.bracket || []; + brackets.parser + + .capture('escape', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(/^\\(.)/); + if (!m) return; + + return pos({ + type: 'escape', + val: m[0] + }); + }) + + /** + * Text parser + */ + + .capture('text', function() { + if (this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + return pos({ + type: 'text', + val: m[0] + }); + }) + + /** + * POSIX character classes: "[[:alpha:][:digits:]]" + */ + + .capture('posix', function() { + var pos = this.position(); + var m = this.match(/^\[:(.*?):\](?=.*\])/); + if (!m) return; + + var inside = this.isInside('bracket'); + if (inside) { + brackets.posix++; + } + + return pos({ + type: 'posix', + insideBracket: inside, + inner: m[1], + val: m[0] + }); + }) + + /** + * Bracket (noop) + */ + + .capture('bracket', function() {}) + + /** + * Open: '[' + */ + + .capture('bracket.open', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\[(?=.*\])/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + if (parsed.slice(-1) === '\\' && !this.isInside('bracket')) { + last.val = last.val.slice(0, last.val.length - 1); + return pos({ + type: 'escape', + val: m[0] + }); + } + + var open = pos({ + type: 'bracket.open', + val: m[0] + }); + + if (last.type === 'bracket.open' || this.isInside('bracket')) { + open.val = '\\' + open.val; + open.type = 'bracket.inner'; + open.escaped = true; + return open; + } + + var node = pos({ + type: 'bracket', + nodes: [open] + }); + + define(node, 'parent', prev); + define(open, 'parent', node); + this.push('bracket', node); + prev.nodes.push(node); + }) + + /** + * Bracket text + */ + + .capture('bracket.inner', function() { + if (!this.isInside('bracket')) return; + var pos = this.position(); + var m = this.match(not); + if (!m || !m[0]) return; + + var next = this.input.charAt(0); + var val = m[0]; + + var node = pos({ + type: 'bracket.inner', + val: val + }); + + if (val === '\\\\') { + return node; + } + + var first = val.charAt(0); + var last = val.slice(-1); + + if (first === '!') { + val = '^' + val.slice(1); + } + + if (last === '\\' || (val === '^' && next === ']')) { + val += this.input[0]; + this.consume(1); + } + + node.val = val; + return node; + }) + + /** + * Close: ']' + */ + + .capture('bracket.close', function() { + var parsed = this.parsed; + var pos = this.position(); + var m = this.match(/^\]/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + if (parsed.slice(-1) === '\\' && !this.isInside('bracket')) { + last.val = last.val.slice(0, last.val.length - 1); + + return pos({ + type: 'escape', + val: m[0] + }); + } + + var node = pos({ + type: 'bracket.close', + rest: this.input, + val: m[0] + }); + + if (last.type === 'bracket.open') { + node.type = 'bracket.inner'; + node.escaped = true; + return node; + } + + var bracket = this.pop('bracket'); + if (!this.isType(bracket, 'bracket')) { + if (this.options.strict) { + throw new Error('missing opening "["'); + } + node.type = 'bracket.inner'; + node.escaped = true; + return node; + } + + bracket.nodes.push(node); + define(node, 'parent', bracket); + }); +} + +/** + * Brackets parsers + */ + +module.exports = parsers; + +/** + * Expose text regex + */ + +module.exports.TEXT_REGEX = TEXT_REGEX; + + +/***/ }), +/* 863 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var toRegex = __webpack_require__(729); +var regexNot = __webpack_require__(740); +var cached; + +/** + * Get the last element from `array` + * @param {Array} `array` + * @return {*} + */ + +exports.last = function(arr) { + return arr[arr.length - 1]; +}; + +/** + * Create and cache regex to use for text nodes + */ + +exports.createRegex = function(pattern, include) { + if (cached) return cached; + var opts = {contains: true, strictClose: false}; + var not = regexNot.create(pattern, opts); + var re; + + if (typeof include === 'string') { + re = toRegex('^(?:' + include + '|' + not + ')', opts); + } else { + re = toRegex(not, opts); + } + + return (cached = re); +}; + + +/***/ }), +/* 864 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Detect Electron renderer process, which is node, but we should + * treat as a browser. + */ + +if (typeof process !== 'undefined' && process.type === 'renderer') { + module.exports = __webpack_require__(865); +} else { + module.exports = __webpack_require__(868); +} + + +/***/ }), +/* 865 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * This is the web browser implementation of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = __webpack_require__(866); +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = 'undefined' != typeof chrome + && 'undefined' != typeof chrome.storage + ? chrome.storage.local + : localstorage(); + +/** + * Colors. + */ + +exports.colors = [ + 'lightseagreen', + 'forestgreen', + 'goldenrod', + 'dodgerblue', + 'darkorchid', + 'crimson' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { + return true; + } + + // is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +exports.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return '[UnexpectedJSONParseError]: ' + err.message; + } +}; + + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + var useColors = this.useColors; + + args[0] = (useColors ? '%c' : '') + + this.namespace + + (useColors ? ' %c' : ' ') + + args[0] + + (useColors ? '%c ' : ' ') + + '+' + exports.humanize(this.diff); + + if (!useColors) return; + + var c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit') + + // the final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ('%%' === match) return; + index++; + if ('%c' === match) { + // we only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.log()` when available. + * No-op when `console.log` is not a "function". + * + * @api public + */ + +function log() { + // this hackery is required for IE8/9, where + // the `console.log` function doesn't have 'apply' + return 'object' === typeof console + && console.log + && Function.prototype.apply.call(console.log, console, arguments); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + +function save(namespaces) { + try { + if (null == namespaces) { + exports.storage.removeItem('debug'); + } else { + exports.storage.debug = namespaces; + } + } catch(e) {} +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + var r; + try { + r = exports.storage.debug; + } catch(e) {} + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Enable namespaces listed in `localStorage.debug` initially. + */ + +exports.enable(load()); + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + return window.localStorage; + } catch (e) {} +} + + +/***/ }), +/* 866 */ +/***/ (function(module, exports, __webpack_require__) { + + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + * + * Expose `debug()` as the module. + */ + +exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; +exports.coerce = coerce; +exports.disable = disable; +exports.enable = enable; +exports.enabled = enabled; +exports.humanize = __webpack_require__(867); + +/** + * The currently active debug mode names, and names to skip. + */ + +exports.names = []; +exports.skips = []; + +/** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + +exports.formatters = {}; + +/** + * Previous log timestamp. + */ + +var prevTime; + +/** + * Select a color. + * @param {String} namespace + * @return {Number} + * @api private + */ + +function selectColor(namespace) { + var hash = 0, i; + + for (i in namespace) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return exports.colors[Math.abs(hash) % exports.colors.length]; +} + +/** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + +function createDebug(namespace) { + + function debug() { + // disabled? + if (!debug.enabled) return; + + var self = debug; + + // set `diff` timestamp + var curr = +new Date(); + var ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + // turn the `arguments` into a proper Array + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + + args[0] = exports.coerce(args[0]); + + if ('string' !== typeof args[0]) { + // anything else let's inspect with %O + args.unshift('%O'); + } + + // apply any `formatters` transformations + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + // if we encounter an escaped % then don't increase the array index + if (match === '%%') return match; + index++; + var formatter = exports.formatters[format]; + if ('function' === typeof formatter) { + var val = args[index]; + match = formatter.call(self, val); + + // now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // apply env-specific formatting (colors, etc.) + exports.formatArgs.call(self, args); + + var logFn = debug.log || exports.log || console.log.bind(console); + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.enabled = exports.enabled(namespace); + debug.useColors = exports.useColors(); + debug.color = selectColor(namespace); + + // env-specific initialization logic for debug instances + if ('function' === typeof exports.init) { + exports.init(debug); + } + + return debug; +} + +/** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + +function enable(namespaces) { + exports.save(namespaces); + + exports.names = []; + exports.skips = []; + + var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + var len = split.length; + + for (var i = 0; i < len; i++) { + if (!split[i]) continue; // ignore empty strings + namespaces = split[i].replace(/\*/g, '.*?'); + if (namespaces[0] === '-') { + exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + exports.names.push(new RegExp('^' + namespaces + '$')); + } + } +} + +/** + * Disable debug output. + * + * @api public + */ + +function disable() { + exports.enable(''); +} + +/** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + +function enabled(name) { + var i, len; + for (i = 0, len = exports.skips.length; i < len; i++) { + if (exports.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports.names.length; i < len; i++) { + if (exports.names[i].test(name)) { + return true; + } + } + return false; +} + +/** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + +function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; +} + + +/***/ }), +/* 867 */ +/***/ (function(module, exports) { + +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isNaN(val) === false) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + 'd'; + } + if (ms >= h) { + return Math.round(ms / h) + 'h'; + } + if (ms >= m) { + return Math.round(ms / m) + 'm'; + } + if (ms >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + return plural(ms, d, 'day') || + plural(ms, h, 'hour') || + plural(ms, m, 'minute') || + plural(ms, s, 'second') || + ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + ' ' + name; + } + return Math.ceil(ms / n) + ' ' + name + 's'; +} + + +/***/ }), +/* 868 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - +/** + * Module dependencies. + */ -var utils = __webpack_require__(862); -var define = __webpack_require__(729); +var tty = __webpack_require__(478); +var util = __webpack_require__(29); /** - * Text regex + * This is the Node.js implementation of `debug()`. + * + * Expose `debug()` as the module. */ -var TEXT_REGEX = '(\\[(?=.*\\])|\\])+'; -var not = utils.createRegex(TEXT_REGEX); +exports = module.exports = __webpack_require__(866); +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; /** - * Brackets parsers + * Colors. */ -function parsers(brackets) { - brackets.state = brackets.state || {}; - brackets.parser.sets.bracket = brackets.parser.sets.bracket || []; - brackets.parser +exports.colors = [6, 2, 3, 4, 5, 1]; - .capture('escape', function() { - if (this.isInside('bracket')) return; - var pos = this.position(); - var m = this.match(/^\\(.)/); - if (!m) return; +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ - return pos({ - type: 'escape', - val: m[0] - }); - }) +exports.inspectOpts = Object.keys(process.env).filter(function (key) { + return /^debug_/i.test(key); +}).reduce(function (obj, key) { + // camel-case + var prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); - /** - * Text parser - */ + // coerce string value into JS value + var val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) val = true; + else if (/^(no|off|false|disabled)$/i.test(val)) val = false; + else if (val === 'null') val = null; + else val = Number(val); - .capture('text', function() { - if (this.isInside('bracket')) return; - var pos = this.position(); - var m = this.match(not); - if (!m || !m[0]) return; + obj[prop] = val; + return obj; +}, {}); - return pos({ - type: 'text', - val: m[0] - }); - }) +/** + * The file descriptor to write the `debug()` calls to. + * Set the `DEBUG_FD` env variable to override with another value. i.e.: + * + * $ DEBUG_FD=3 node script.js 3>debug.log + */ - /** - * POSIX character classes: "[[:alpha:][:digits:]]" - */ +var fd = parseInt(process.env.DEBUG_FD, 10) || 2; - .capture('posix', function() { - var pos = this.position(); - var m = this.match(/^\[:(.*?):\](?=.*\])/); - if (!m) return; +if (1 !== fd && 2 !== fd) { + util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() +} - var inside = this.isInside('bracket'); - if (inside) { - brackets.posix++; - } +var stream = 1 === fd ? process.stdout : + 2 === fd ? process.stderr : + createWritableStdioStream(fd); - return pos({ - type: 'posix', - insideBracket: inside, - inner: m[1], - val: m[0] - }); - }) +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ - /** - * Bracket (noop) - */ +function useColors() { + return 'colors' in exports.inspectOpts + ? Boolean(exports.inspectOpts.colors) + : tty.isatty(fd); +} - .capture('bracket', function() {}) +/** + * Map %o to `util.inspect()`, all on a single line. + */ - /** - * Open: '[' - */ +exports.formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n').map(function(str) { + return str.trim() + }).join(' '); +}; - .capture('bracket.open', function() { - var parsed = this.parsed; - var pos = this.position(); - var m = this.match(/^\[(?=.*\])/); - if (!m) return; +/** + * Map %o to `util.inspect()`, allowing multiple lines if needed. + */ - var prev = this.prev(); - var last = utils.last(prev.nodes); +exports.formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; - if (parsed.slice(-1) === '\\' && !this.isInside('bracket')) { - last.val = last.val.slice(0, last.val.length - 1); - return pos({ - type: 'escape', - val: m[0] - }); - } +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ - var open = pos({ - type: 'bracket.open', - val: m[0] - }); +function formatArgs(args) { + var name = this.namespace; + var useColors = this.useColors; - if (last.type === 'bracket.open' || this.isInside('bracket')) { - open.val = '\\' + open.val; - open.type = 'bracket.inner'; - open.escaped = true; - return open; - } + if (useColors) { + var c = this.color; + var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; - var node = pos({ - type: 'bracket', - nodes: [open] - }); + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); + } else { + args[0] = new Date().toUTCString() + + ' ' + name + ' ' + args[0]; + } +} - define(node, 'parent', prev); - define(open, 'parent', node); - this.push('bracket', node); - prev.nodes.push(node); - }) +/** + * Invokes `util.format()` with the specified arguments and writes to `stream`. + */ - /** - * Bracket text - */ +function log() { + return stream.write(util.format.apply(util, arguments) + '\n'); +} - .capture('bracket.inner', function() { - if (!this.isInside('bracket')) return; - var pos = this.position(); - var m = this.match(not); - if (!m || !m[0]) return; +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ - var next = this.input.charAt(0); - var val = m[0]; +function save(namespaces) { + if (null == namespaces) { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } else { + process.env.DEBUG = namespaces; + } +} - var node = pos({ - type: 'bracket.inner', - val: val - }); +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ - if (val === '\\\\') { - return node; - } +function load() { + return process.env.DEBUG; +} - var first = val.charAt(0); - var last = val.slice(-1); +/** + * Copied from `node/src/node.js`. + * + * XXX: It's lame that node doesn't expose this API out-of-the-box. It also + * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. + */ - if (first === '!') { - val = '^' + val.slice(1); - } +function createWritableStdioStream (fd) { + var stream; + var tty_wrap = process.binding('tty_wrap'); - if (last === '\\' || (val === '^' && next === ']')) { - val += this.input[0]; - this.consume(1); - } + // Note stream._type is used for test-module-load-list.js - node.val = val; - return node; - }) + switch (tty_wrap.guessHandleType(fd)) { + case 'TTY': + stream = new tty.WriteStream(fd); + stream._type = 'tty'; - /** - * Close: ']' - */ + // Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); + } + break; - .capture('bracket.close', function() { - var parsed = this.parsed; - var pos = this.position(); - var m = this.match(/^\]/); - if (!m) return; + case 'FILE': + var fs = __webpack_require__(23); + stream = new fs.SyncWriteStream(fd, { autoClose: false }); + stream._type = 'fs'; + break; - var prev = this.prev(); - var last = utils.last(prev.nodes); + case 'PIPE': + case 'TCP': + var net = __webpack_require__(806); + stream = new net.Socket({ + fd: fd, + readable: false, + writable: true + }); - if (parsed.slice(-1) === '\\' && !this.isInside('bracket')) { - last.val = last.val.slice(0, last.val.length - 1); + // FIXME Should probably have an option in net.Socket to create a + // stream from an existing fd which is writable only. But for now + // we'll just add this hack and set the `readable` member to false. + // Test: ./node test/fixtures/echo.js < /etc/passwd + stream.readable = false; + stream.read = null; + stream._type = 'pipe'; - return pos({ - type: 'escape', - val: m[0] - }); + // FIXME Hack to have stream not keep the event loop alive. + // See https://github.com/joyent/node/issues/1726 + if (stream._handle && stream._handle.unref) { + stream._handle.unref(); } + break; - var node = pos({ - type: 'bracket.close', - rest: this.input, - val: m[0] - }); + default: + // Probably an error on in uv_guess_handle() + throw new Error('Implement me. Unknown stream file type!'); + } - if (last.type === 'bracket.open') { - node.type = 'bracket.inner'; - node.escaped = true; - return node; - } + // For supporting legacy API we put the FD here. + stream.fd = fd; - var bracket = this.pop('bracket'); - if (!this.isType(bracket, 'bracket')) { - if (this.options.strict) { - throw new Error('missing opening "["'); - } - node.type = 'bracket.inner'; - node.escaped = true; - return node; - } + stream._isStdio = true; - bracket.nodes.push(node); - define(node, 'parent', bracket); - }); + return stream; } /** - * Brackets parsers - */ - -module.exports = parsers; - -/** - * Expose text regex + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. */ -module.exports.TEXT_REGEX = TEXT_REGEX; - - -/***/ }), -/* 862 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var toRegex = __webpack_require__(728); -var regexNot = __webpack_require__(739); -var cached; - -/** - * Get the last element from `array` - * @param {Array} `array` - * @return {*} - */ +function init (debug) { + debug.inspectOpts = {}; -exports.last = function(arr) { - return arr[arr.length - 1]; -}; + var keys = Object.keys(exports.inspectOpts); + for (var i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} /** - * Create and cache regex to use for text nodes + * Enable namespaces listed in `process.env.DEBUG` initially. */ -exports.createRegex = function(pattern, include) { - if (cached) return cached; - var opts = {contains: true, strictClose: false}; - var not = regexNot.create(pattern, opts); - var re; - - if (typeof include === 'string') { - re = toRegex('^(?:' + include + '|' + not + ')', opts); - } else { - re = toRegex(not, opts); - } - - return (cached = re); -}; +exports.enable(load()); /***/ }), -/* 863 */ +/* 869 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var brackets = __webpack_require__(858); -var define = __webpack_require__(864); -var utils = __webpack_require__(865); +var brackets = __webpack_require__(859); +var define = __webpack_require__(870); +var utils = __webpack_require__(871); /** * Characters to use in text regex (we want to "not" match @@ -101803,7 +102803,7 @@ module.exports = parsers; /***/ }), -/* 864 */ +/* 870 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -101816,7 +102816,7 @@ module.exports = parsers; -var isDescriptor = __webpack_require__(759); +var isDescriptor = __webpack_require__(760); module.exports = function defineProperty(obj, prop, val) { if (typeof obj !== 'object' && typeof obj !== 'function') { @@ -101841,14 +102841,14 @@ module.exports = function defineProperty(obj, prop, val) { /***/ }), -/* 865 */ +/* 871 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var regex = __webpack_require__(739); -var Cache = __webpack_require__(849); +var regex = __webpack_require__(740); +var Cache = __webpack_require__(850); /** * Utils @@ -101917,7 +102917,7 @@ utils.createRegex = function(str) { /***/ }), -/* 866 */ +/* 872 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -101927,16 +102927,16 @@ utils.createRegex = function(str) { * Module dependencies */ -var Snapdragon = __webpack_require__(767); -var define = __webpack_require__(864); -var extend = __webpack_require__(737); +var Snapdragon = __webpack_require__(768); +var define = __webpack_require__(870); +var extend = __webpack_require__(738); /** * Local dependencies */ -var compilers = __webpack_require__(857); -var parsers = __webpack_require__(863); +var compilers = __webpack_require__(858); +var parsers = __webpack_require__(869); /** * Customize Snapdragon parser and renderer @@ -102002,16 +103002,16 @@ module.exports = Extglob; /***/ }), -/* 867 */ +/* 873 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var extglob = __webpack_require__(856); -var nanomatch = __webpack_require__(841); -var regexNot = __webpack_require__(739); -var toRegex = __webpack_require__(829); +var extglob = __webpack_require__(857); +var nanomatch = __webpack_require__(842); +var regexNot = __webpack_require__(740); +var toRegex = __webpack_require__(830); var not; /** @@ -102092,14 +103092,14 @@ function textRegex(pattern) { /***/ }), -/* 868 */ +/* 874 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = new (__webpack_require__(849))(); +module.exports = new (__webpack_require__(850))(); /***/ }), -/* 869 */ +/* 875 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -102112,13 +103112,13 @@ var path = __webpack_require__(16); * Module dependencies */ -var Snapdragon = __webpack_require__(767); -utils.define = __webpack_require__(836); -utils.diff = __webpack_require__(853); -utils.extend = __webpack_require__(837); -utils.pick = __webpack_require__(854); -utils.typeOf = __webpack_require__(870); -utils.unique = __webpack_require__(740); +var Snapdragon = __webpack_require__(768); +utils.define = __webpack_require__(837); +utils.diff = __webpack_require__(854); +utils.extend = __webpack_require__(838); +utils.pick = __webpack_require__(855); +utils.typeOf = __webpack_require__(876); +utils.unique = __webpack_require__(741); /** * Returns true if the platform is windows, or `path.sep` is `\\`. @@ -102415,7 +103415,7 @@ utils.unixify = function(options) { /***/ }), -/* 870 */ +/* 876 */ /***/ (function(module, exports) { var toString = Object.prototype.toString; @@ -102550,7 +103550,7 @@ function isBuffer(val) { /***/ }), -/* 871 */ +/* 877 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -102569,9 +103569,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(872); -var reader_1 = __webpack_require__(885); -var fs_stream_1 = __webpack_require__(889); +var readdir = __webpack_require__(878); +var reader_1 = __webpack_require__(891); +var fs_stream_1 = __webpack_require__(895); var ReaderAsync = /** @class */ (function (_super) { __extends(ReaderAsync, _super); function ReaderAsync() { @@ -102632,15 +103632,15 @@ exports.default = ReaderAsync; /***/ }), -/* 872 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const readdirSync = __webpack_require__(873); -const readdirAsync = __webpack_require__(881); -const readdirStream = __webpack_require__(884); +const readdirSync = __webpack_require__(879); +const readdirAsync = __webpack_require__(887); +const readdirStream = __webpack_require__(890); module.exports = exports = readdirAsyncPath; exports.readdir = exports.readdirAsync = exports.async = readdirAsyncPath; @@ -102724,7 +103724,7 @@ function readdirStreamStat (dir, options) { /***/ }), -/* 873 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -102732,11 +103732,11 @@ function readdirStreamStat (dir, options) { module.exports = readdirSync; -const DirectoryReader = __webpack_require__(874); +const DirectoryReader = __webpack_require__(880); let syncFacade = { - fs: __webpack_require__(879), - forEach: __webpack_require__(880), + fs: __webpack_require__(885), + forEach: __webpack_require__(886), sync: true }; @@ -102765,7 +103765,7 @@ function readdirSync (dir, options, internalOptions) { /***/ }), -/* 874 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -102774,9 +103774,9 @@ function readdirSync (dir, options, internalOptions) { const Readable = __webpack_require__(27).Readable; const EventEmitter = __webpack_require__(379).EventEmitter; const path = __webpack_require__(16); -const normalizeOptions = __webpack_require__(875); -const stat = __webpack_require__(877); -const call = __webpack_require__(878); +const normalizeOptions = __webpack_require__(881); +const stat = __webpack_require__(883); +const call = __webpack_require__(884); /** * Asynchronously reads the contents of a directory and streams the results @@ -103152,14 +104152,14 @@ module.exports = DirectoryReader; /***/ }), -/* 875 */ +/* 881 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const globToRegExp = __webpack_require__(876); +const globToRegExp = __webpack_require__(882); module.exports = normalizeOptions; @@ -103336,7 +104336,7 @@ function normalizeOptions (options, internalOptions) { /***/ }), -/* 876 */ +/* 882 */ /***/ (function(module, exports) { module.exports = function (glob, opts) { @@ -103473,13 +104473,13 @@ module.exports = function (glob, opts) { /***/ }), -/* 877 */ +/* 883 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const call = __webpack_require__(878); +const call = __webpack_require__(884); module.exports = stat; @@ -103554,7 +104554,7 @@ function symlinkStat (fs, path, lstats, callback) { /***/ }), -/* 878 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -103615,14 +104615,14 @@ function callOnce (fn) { /***/ }), -/* 879 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); -const call = __webpack_require__(878); +const call = __webpack_require__(884); /** * A facade around {@link fs.readdirSync} that allows it to be called @@ -103686,7 +104686,7 @@ exports.lstat = function (path, callback) { /***/ }), -/* 880 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -103715,7 +104715,7 @@ function syncForEach (array, iterator, done) { /***/ }), -/* 881 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -103723,12 +104723,12 @@ function syncForEach (array, iterator, done) { module.exports = readdirAsync; -const maybe = __webpack_require__(882); -const DirectoryReader = __webpack_require__(874); +const maybe = __webpack_require__(888); +const DirectoryReader = __webpack_require__(880); let asyncFacade = { fs: __webpack_require__(23), - forEach: __webpack_require__(883), + forEach: __webpack_require__(889), async: true }; @@ -103770,7 +104770,7 @@ function readdirAsync (dir, options, callback, internalOptions) { /***/ }), -/* 882 */ +/* 888 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -103797,7 +104797,7 @@ module.exports = function maybe (cb, promise) { /***/ }), -/* 883 */ +/* 889 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -103833,7 +104833,7 @@ function asyncForEach (array, iterator, done) { /***/ }), -/* 884 */ +/* 890 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -103841,11 +104841,11 @@ function asyncForEach (array, iterator, done) { module.exports = readdirStream; -const DirectoryReader = __webpack_require__(874); +const DirectoryReader = __webpack_require__(880); let streamFacade = { fs: __webpack_require__(23), - forEach: __webpack_require__(883), + forEach: __webpack_require__(889), async: true }; @@ -103865,16 +104865,16 @@ function readdirStream (dir, options, internalOptions) { /***/ }), -/* 885 */ +/* 891 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = __webpack_require__(16); -var deep_1 = __webpack_require__(886); -var entry_1 = __webpack_require__(888); -var pathUtil = __webpack_require__(887); +var deep_1 = __webpack_require__(892); +var entry_1 = __webpack_require__(894); +var pathUtil = __webpack_require__(893); var Reader = /** @class */ (function () { function Reader(options) { this.options = options; @@ -103940,14 +104940,14 @@ exports.default = Reader; /***/ }), -/* 886 */ +/* 892 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(887); -var patternUtils = __webpack_require__(721); +var pathUtils = __webpack_require__(893); +var patternUtils = __webpack_require__(722); var DeepFilter = /** @class */ (function () { function DeepFilter(options, micromatchOptions) { this.options = options; @@ -104030,7 +105030,7 @@ exports.default = DeepFilter; /***/ }), -/* 887 */ +/* 893 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104061,14 +105061,14 @@ exports.makeAbsolute = makeAbsolute; /***/ }), -/* 888 */ +/* 894 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var pathUtils = __webpack_require__(887); -var patternUtils = __webpack_require__(721); +var pathUtils = __webpack_require__(893); +var patternUtils = __webpack_require__(722); var EntryFilter = /** @class */ (function () { function EntryFilter(options, micromatchOptions) { this.options = options; @@ -104153,7 +105153,7 @@ exports.default = EntryFilter; /***/ }), -/* 889 */ +/* 895 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104173,8 +105173,8 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(27); -var fsStat = __webpack_require__(890); -var fs_1 = __webpack_require__(894); +var fsStat = __webpack_require__(896); +var fs_1 = __webpack_require__(900); var FileSystemStream = /** @class */ (function (_super) { __extends(FileSystemStream, _super); function FileSystemStream() { @@ -104224,14 +105224,14 @@ exports.default = FileSystemStream; /***/ }), -/* 890 */ +/* 896 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const optionsManager = __webpack_require__(891); -const statProvider = __webpack_require__(893); +const optionsManager = __webpack_require__(897); +const statProvider = __webpack_require__(899); /** * Asynchronous API. */ @@ -104262,13 +105262,13 @@ exports.statSync = statSync; /***/ }), -/* 891 */ +/* 897 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const fsAdapter = __webpack_require__(892); +const fsAdapter = __webpack_require__(898); function prepare(opts) { const options = Object.assign({ fs: fsAdapter.getFileSystemAdapter(opts ? opts.fs : undefined), @@ -104281,7 +105281,7 @@ exports.prepare = prepare; /***/ }), -/* 892 */ +/* 898 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104304,7 +105304,7 @@ exports.getFileSystemAdapter = getFileSystemAdapter; /***/ }), -/* 893 */ +/* 899 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104356,7 +105356,7 @@ exports.isFollowedSymlink = isFollowedSymlink; /***/ }), -/* 894 */ +/* 900 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104387,7 +105387,7 @@ exports.default = FileSystem; /***/ }), -/* 895 */ +/* 901 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104407,9 +105407,9 @@ var __extends = (this && this.__extends) || (function () { })(); Object.defineProperty(exports, "__esModule", { value: true }); var stream = __webpack_require__(27); -var readdir = __webpack_require__(872); -var reader_1 = __webpack_require__(885); -var fs_stream_1 = __webpack_require__(889); +var readdir = __webpack_require__(878); +var reader_1 = __webpack_require__(891); +var fs_stream_1 = __webpack_require__(895); var TransformStream = /** @class */ (function (_super) { __extends(TransformStream, _super); function TransformStream(reader) { @@ -104477,7 +105477,7 @@ exports.default = ReaderStream; /***/ }), -/* 896 */ +/* 902 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104496,9 +105496,9 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var readdir = __webpack_require__(872); -var reader_1 = __webpack_require__(885); -var fs_sync_1 = __webpack_require__(897); +var readdir = __webpack_require__(878); +var reader_1 = __webpack_require__(891); +var fs_sync_1 = __webpack_require__(903); var ReaderSync = /** @class */ (function (_super) { __extends(ReaderSync, _super); function ReaderSync() { @@ -104558,7 +105558,7 @@ exports.default = ReaderSync; /***/ }), -/* 897 */ +/* 903 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104577,8 +105577,8 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); -var fsStat = __webpack_require__(890); -var fs_1 = __webpack_require__(894); +var fsStat = __webpack_require__(896); +var fs_1 = __webpack_require__(900); var FileSystemSync = /** @class */ (function (_super) { __extends(FileSystemSync, _super); function FileSystemSync() { @@ -104624,7 +105624,7 @@ exports.default = FileSystemSync; /***/ }), -/* 898 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104640,13 +105640,13 @@ exports.flatten = flatten; /***/ }), -/* 899 */ +/* 905 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var merge2 = __webpack_require__(588); +var merge2 = __webpack_require__(589); /** * Merge multiple streams and propagate their errors into one stream in parallel. */ @@ -104661,13 +105661,13 @@ exports.merge = merge; /***/ }), -/* 900 */ +/* 906 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); -const pathType = __webpack_require__(901); +const pathType = __webpack_require__(907); const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0]; @@ -104733,13 +105733,13 @@ module.exports.sync = (input, opts) => { /***/ }), -/* 901 */ +/* 907 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); -const pify = __webpack_require__(902); +const pify = __webpack_require__(908); function type(fn, fn2, fp) { if (typeof fp !== 'string') { @@ -104782,7 +105782,7 @@ exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink'); /***/ }), -/* 902 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -104873,17 +105873,17 @@ module.exports = (obj, opts) => { /***/ }), -/* 903 */ +/* 909 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const fs = __webpack_require__(23); const path = __webpack_require__(16); -const fastGlob = __webpack_require__(717); -const gitIgnore = __webpack_require__(904); -const pify = __webpack_require__(905); -const slash = __webpack_require__(906); +const fastGlob = __webpack_require__(718); +const gitIgnore = __webpack_require__(910); +const pify = __webpack_require__(911); +const slash = __webpack_require__(912); const DEFAULT_IGNORE = [ '**/node_modules/**', @@ -104981,7 +105981,7 @@ module.exports.sync = options => { /***/ }), -/* 904 */ +/* 910 */ /***/ (function(module, exports) { // A simple implementation of make-array @@ -105450,7 +106450,7 @@ module.exports = options => new IgnoreBase(options) /***/ }), -/* 905 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -105525,7 +106525,7 @@ module.exports = (input, options) => { /***/ }), -/* 906 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -105543,17 +106543,17 @@ module.exports = input => { /***/ }), -/* 907 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const path = __webpack_require__(16); const {constants: fsConstants} = __webpack_require__(23); -const pEvent = __webpack_require__(908); -const CpFileError = __webpack_require__(911); -const fs = __webpack_require__(915); -const ProgressEmitter = __webpack_require__(918); +const pEvent = __webpack_require__(914); +const CpFileError = __webpack_require__(917); +const fs = __webpack_require__(921); +const ProgressEmitter = __webpack_require__(924); const cpFileAsync = async (source, destination, options, progressEmitter) => { let readError; @@ -105667,12 +106667,12 @@ module.exports.sync = (source, destination, options) => { /***/ }), -/* 908 */ +/* 914 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pTimeout = __webpack_require__(909); +const pTimeout = __webpack_require__(915); const symbolAsyncIterator = Symbol.asyncIterator || '@@asyncIterator'; @@ -105963,12 +106963,12 @@ module.exports.iterator = (emitter, event, options) => { /***/ }), -/* 909 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const pFinally = __webpack_require__(910); +const pFinally = __webpack_require__(916); class TimeoutError extends Error { constructor(message) { @@ -106014,7 +107014,7 @@ module.exports.TimeoutError = TimeoutError; /***/ }), -/* 910 */ +/* 916 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106036,12 +107036,12 @@ module.exports = (promise, onFinally) => { /***/ }), -/* 911 */ +/* 917 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(912); +const NestedError = __webpack_require__(918); class CpFileError extends NestedError { constructor(message, nested) { @@ -106055,10 +107055,10 @@ module.exports = CpFileError; /***/ }), -/* 912 */ +/* 918 */ /***/ (function(module, exports, __webpack_require__) { -var inherits = __webpack_require__(913); +var inherits = __webpack_require__(919); var NestedError = function (message, nested) { this.nested = nested; @@ -106109,7 +107109,7 @@ module.exports = NestedError; /***/ }), -/* 913 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { try { @@ -106117,12 +107117,12 @@ try { if (typeof util.inherits !== 'function') throw ''; module.exports = util.inherits; } catch (e) { - module.exports = __webpack_require__(914); + module.exports = __webpack_require__(920); } /***/ }), -/* 914 */ +/* 920 */ /***/ (function(module, exports) { if (typeof Object.create === 'function') { @@ -106151,16 +107151,16 @@ if (typeof Object.create === 'function') { /***/ }), -/* 915 */ +/* 921 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const {promisify} = __webpack_require__(29); const fs = __webpack_require__(22); -const makeDir = __webpack_require__(916); -const pEvent = __webpack_require__(908); -const CpFileError = __webpack_require__(911); +const makeDir = __webpack_require__(922); +const pEvent = __webpack_require__(914); +const CpFileError = __webpack_require__(917); const stat = promisify(fs.stat); const lstat = promisify(fs.lstat); @@ -106257,7 +107257,7 @@ exports.copyFileSync = (source, destination, flags) => { /***/ }), -/* 916 */ +/* 922 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106265,7 +107265,7 @@ exports.copyFileSync = (source, destination, flags) => { const fs = __webpack_require__(23); const path = __webpack_require__(16); const {promisify} = __webpack_require__(29); -const semver = __webpack_require__(917); +const semver = __webpack_require__(923); const defaults = { mode: 0o777 & (~process.umask()), @@ -106414,7 +107414,7 @@ module.exports.sync = (input, options) => { /***/ }), -/* 917 */ +/* 923 */ /***/ (function(module, exports) { exports = module.exports = SemVer @@ -108016,7 +109016,7 @@ function coerce (version, options) { /***/ }), -/* 918 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -108057,7 +109057,7 @@ module.exports = ProgressEmitter; /***/ }), -/* 919 */ +/* 925 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -108103,12 +109103,12 @@ exports.default = module.exports; /***/ }), -/* 920 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const NestedError = __webpack_require__(921); +const NestedError = __webpack_require__(927); class CpyError extends NestedError { constructor(message, nested) { @@ -108122,7 +109122,7 @@ module.exports = CpyError; /***/ }), -/* 921 */ +/* 927 */ /***/ (function(module, exports, __webpack_require__) { var inherits = __webpack_require__(29).inherits; @@ -108178,14 +109178,14 @@ module.exports = NestedError; /***/ }), -/* 922 */ +/* 928 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prepareExternalProjectDependencies", function() { return prepareExternalProjectDependencies; }); -/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(515); -/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(514); +/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(516); +/* harmony import */ var _utils_project__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(515); /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with diff --git a/src/dev/ci_setup/setup.sh b/src/dev/ci_setup/setup.sh index 104a818f72a20..dc91d1cf23a37 100755 --- a/src/dev/ci_setup/setup.sh +++ b/src/dev/ci_setup/setup.sh @@ -16,6 +16,14 @@ echo " -- TEST_ES_SNAPSHOT_VERSION='$TEST_ES_SNAPSHOT_VERSION'" echo " -- installing node.js dependencies" yarn kbn bootstrap --prefer-offline +### +### Download es snapshots +### +echo " -- downloading es snapshot" +node scripts/es snapshot --download-only; +node scripts/es snapshot --license=oss --download-only; + + ### ### verify no git modifications ### diff --git a/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/oracle.svg b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/oracle.svg new file mode 100644 index 0000000000000..78db57f914818 --- /dev/null +++ b/src/legacy/core_plugins/kibana/public/home/tutorial_resources/logos/oracle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/plugins/home/server/tutorials/oracle_metrics/index.ts b/src/plugins/home/server/tutorials/oracle_metrics/index.ts new file mode 100644 index 0000000000000..d45dad0682e61 --- /dev/null +++ b/src/plugins/home/server/tutorials/oracle_metrics/index.ts @@ -0,0 +1,70 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { i18n } from '@kbn/i18n'; +import { TutorialsCategory } from '../../services/tutorials'; +import { + onPremInstructions, + cloudInstructions, + onPremCloudInstructions, +} from '../instructions/metricbeat_instructions'; +import { + TutorialContext, + TutorialSchema, +} from '../../services/tutorials/lib/tutorials_registry_types'; + +export function oracleMetricsSpecProvider(context: TutorialContext): TutorialSchema { + const moduleName = 'oracle'; + return { + id: moduleName + 'Metrics', + name: i18n.translate('home.tutorials.oracleMetrics.nameTitle', { + defaultMessage: 'oracle metrics', + }), + isBeta: false, + category: TutorialsCategory.METRICS, + shortDescription: i18n.translate('home.tutorials.oracleMetrics.shortDescription', { + defaultMessage: 'Fetch internal metrics from a Oracle server.', + }), + longDescription: i18n.translate('home.tutorials.oracleMetrics.longDescription', { + defaultMessage: + 'The `{moduleName}` Metricbeat module fetches internal metrics from a Oracle server. \ +[Learn more]({learnMoreLink}).', + values: { + moduleName, + learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-' + moduleName + '.html', + }, + }), + artifacts: { + application: { + label: i18n.translate('home.tutorials.oracleMetrics.artifacts.application.label', { + defaultMessage: 'Discover', + }), + path: '/app/kibana#/discover', + }, + dashboards: [], + exportedFields: { + documentationUrl: '{config.docs.beats.metricbeat}/exported-fields-' + moduleName + '.html', + }, + }, + completionTimeMinutes: 10, + onPrem: onPremInstructions(moduleName, context), + elasticCloud: cloudInstructions(moduleName), + onPremElasticCloud: onPremCloudInstructions(moduleName), + }; +} diff --git a/src/plugins/home/server/tutorials/register.ts b/src/plugins/home/server/tutorials/register.ts index b6c56a35554b2..1eec15069f87e 100644 --- a/src/plugins/home/server/tutorials/register.ts +++ b/src/plugins/home/server/tutorials/register.ts @@ -88,6 +88,7 @@ import { ibmmqMetricsSpecProvider } from './ibmmq_metrics'; import { statsdMetricsSpecProvider } from './statsd_metrics'; import { redisenterpriseMetricsSpecProvider } from './redisenterprise_metrics'; import { openmetricsMetricsSpecProvider } from './openmetrics_metrics'; +import { oracleMetricsSpecProvider } from './oracle_metrics'; export const builtInTutorials = [ systemLogsSpecProvider, @@ -162,4 +163,5 @@ export const builtInTutorials = [ statsdMetricsSpecProvider, redisenterpriseMetricsSpecProvider, openmetricsMetricsSpecProvider, + oracleMetricsSpecProvider, ]; diff --git a/test/functional/apps/context/_discover_navigation.js b/test/functional/apps/context/_discover_navigation.js index b906296037888..a56a85546bbcd 100644 --- a/test/functional/apps/context/_discover_navigation.js +++ b/test/functional/apps/context/_discover_navigation.js @@ -31,7 +31,8 @@ export default function({ getService, getPageObjects }) { const filterBar = getService('filterBar'); const PageObjects = getPageObjects(['common', 'discover', 'timePicker']); - describe('context link in discover', function contextSize() { + // FLAKY: https://github.com/elastic/kibana/issues/53308 + describe.skip('context link in discover', function contextSize() { this.tags('smoke'); before(async function() { await PageObjects.common.navigateToApp('discover'); diff --git a/test/functional/apps/discover/_field_visualize.ts b/test/functional/apps/discover/_field_visualize.ts index 46238bf143290..24f4ba592324c 100644 --- a/test/functional/apps/discover/_field_visualize.ts +++ b/test/functional/apps/discover/_field_visualize.ts @@ -32,7 +32,8 @@ export default function({ getService, getPageObjects }: FtrProviderContext) { defaultIndex: 'logstash-*', }; - describe('discover field visualize button', () => { + // FLAKY: https://github.com/elastic/kibana/issues/61714 + describe.skip('discover field visualize button', () => { before(async function() { log.debug('load kibana index with default index pattern'); await esArchiver.load('discover'); diff --git a/test/plugin_functional/plugins/kbn_sample_panel_action/kibana.json b/test/plugin_functional/plugins/kbn_sample_panel_action/kibana.json new file mode 100644 index 0000000000000..109afbcd5dabd --- /dev/null +++ b/test/plugin_functional/plugins/kbn_sample_panel_action/kibana.json @@ -0,0 +1,9 @@ +{ + "id": "kbn_sample_panel_action", + "version": "0.0.1", + "kibanaVersion": "kibana", + "configPath": ["kbn_sample_panel_action"], + "server": false, + "ui": true, + "requiredPlugins": ["uiActions", "embeddable"] +} \ No newline at end of file diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json b/test/plugin_functional/plugins/kbn_sample_panel_action/package.json similarity index 70% rename from test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json rename to test/plugin_functional/plugins/kbn_sample_panel_action/package.json index 8bc9afbc803a5..914ff39884fa3 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json +++ b/test/plugin_functional/plugins/kbn_sample_panel_action/package.json @@ -1,7 +1,7 @@ { - "name": "kbn_tp_sample_panel_action", + "name": "kbn_sample_panel_action", "version": "1.0.0", - "main": "target/test/plugin_functional/plugins/kbn_tp_sample_panel_action", + "main": "target/test/plugin_functional/plugins/kbn_sample_panel_action", "kibana": { "version": "kibana", "templateVersion": "1.0.0" @@ -16,7 +16,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "@kbn/plugin-helpers": "9.0.2", "typescript": "3.7.2" } } diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/index.ts b/test/plugin_functional/plugins/kbn_sample_panel_action/public/index.ts similarity index 58% rename from test/plugin_functional/plugins/kbn_tp_sample_panel_action/index.ts rename to test/plugin_functional/plugins/kbn_sample_panel_action/public/index.ts index 13b7f8fe52fa0..c7eb1745226cc 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/index.ts +++ b/test/plugin_functional/plugins/kbn_sample_panel_action/public/index.ts @@ -17,24 +17,14 @@ * under the License. */ -import { resolve } from 'path'; +import { PluginInitializer } from 'kibana/public'; +import { + SampelPanelActionTestPlugin, + SampelPanelActionTestPluginSetup, + SampelPanelActionTestPluginStart, +} from './plugin'; -// TODO: use something better once https://github.com/elastic/kibana/issues/26555 is -// figured out. -type KibanaPlugin = any; - -function samplePanelAction(kibana: KibanaPlugin) { - return new kibana.Plugin({ - publicDir: resolve(__dirname, './public'), - uiExports: { - embeddableActions: [ - 'plugins/kbn_tp_sample_panel_action/sample_panel_action', - 'plugins/kbn_tp_sample_panel_action/sample_panel_link', - ], - }, - }); -} - -module.exports = (kibana: KibanaPlugin) => { - return [samplePanelAction(kibana)]; -}; +export const plugin: PluginInitializer< + SampelPanelActionTestPluginSetup, + SampelPanelActionTestPluginStart +> = () => new SampelPanelActionTestPlugin(); diff --git a/test/plugin_functional/plugins/kbn_sample_panel_action/public/plugin.ts b/test/plugin_functional/plugins/kbn_sample_panel_action/public/plugin.ts new file mode 100644 index 0000000000000..8ea8d2ff49e3b --- /dev/null +++ b/test/plugin_functional/plugins/kbn_sample_panel_action/public/plugin.ts @@ -0,0 +1,47 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { CoreSetup, Plugin } from 'kibana/public'; +import { UiActionsSetup } from '../../../../../src/plugins/ui_actions/public'; +import { CONTEXT_MENU_TRIGGER } from '../../../../../src/plugins/embeddable/public'; +import { createSamplePanelAction } from './sample_panel_action'; +import { createSamplePanelLink } from './sample_panel_link'; + +export class SampelPanelActionTestPlugin + implements Plugin { + public setup(core: CoreSetup, { uiActions }: { uiActions: UiActionsSetup }) { + const samplePanelAction = createSamplePanelAction(core.getStartServices); + + uiActions.registerAction(samplePanelAction); + uiActions.attachAction(CONTEXT_MENU_TRIGGER, samplePanelAction); + + const samplePanelLink = createSamplePanelLink(); + + uiActions.registerAction(samplePanelLink); + uiActions.attachAction(CONTEXT_MENU_TRIGGER, samplePanelLink); + + return {}; + } + + public start() {} + public stop() {} +} + +export type SampelPanelActionTestPluginSetup = ReturnType; +export type SampelPanelActionTestPluginStart = ReturnType; diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/public/sample_panel_action.tsx b/test/plugin_functional/plugins/kbn_sample_panel_action/public/sample_panel_action.tsx similarity index 81% rename from test/plugin_functional/plugins/kbn_tp_sample_panel_action/public/sample_panel_action.tsx rename to test/plugin_functional/plugins/kbn_sample_panel_action/public/sample_panel_action.tsx index 8395fddece2a4..18e45c22abaca 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/public/sample_panel_action.tsx +++ b/test/plugin_functional/plugins/kbn_sample_panel_action/public/sample_panel_action.tsx @@ -16,23 +16,23 @@ * specific language governing permissions and limitations * under the License. */ +import { CoreSetup } from 'kibana/public'; import { EuiFlyoutBody, EuiFlyoutHeader, EuiTitle } from '@elastic/eui'; import React from 'react'; -import { npStart, npSetup } from 'ui/new_platform'; -import { CONTEXT_MENU_TRIGGER, IEmbeddable } from '../../../../../src/plugins/embeddable/public'; +import { IEmbeddable } from '../../../../../src/plugins/embeddable/public'; import { createAction, ActionType } from '../../../../../src/plugins/ui_actions/public'; import { toMountPoint } from '../../../../../src/plugins/kibana_react/public'; // Casting to ActionType is a hack - in a real situation use // declare module and add this id to ActionContextMapping. -export const SAMPLE_PANEL_ACTION = 'SAMPLE_PANEL_ACTION' as ActionType; +export const SAMPLE_PANEL_ACTION = 'samplePanelAction' as ActionType; export interface SamplePanelActionContext { embeddable: IEmbeddable; } -function createSamplePanelAction() { +export function createSamplePanelAction(getStartServices: CoreSetup['getStartServices']) { return createAction({ type: SAMPLE_PANEL_ACTION, getDisplayName: () => 'Sample Panel Action', @@ -40,7 +40,8 @@ function createSamplePanelAction() { if (!embeddable) { return; } - npStart.core.overlays.openFlyout( + const openFlyout = (await getStartServices())[0].overlays.openFlyout; + openFlyout( toMountPoint( @@ -60,7 +61,3 @@ function createSamplePanelAction() { }, }); } - -const action = createSamplePanelAction(); -npSetup.plugins.uiActions.registerAction(action); -npSetup.plugins.uiActions.attachAction(CONTEXT_MENU_TRIGGER, action); diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/public/sample_panel_link.ts b/test/plugin_functional/plugins/kbn_sample_panel_action/public/sample_panel_link.ts similarity index 82% rename from test/plugin_functional/plugins/kbn_tp_sample_panel_action/public/sample_panel_link.ts rename to test/plugin_functional/plugins/kbn_sample_panel_action/public/sample_panel_link.ts index 4b09be4db8a60..b0f1219a815a3 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/public/sample_panel_link.ts +++ b/test/plugin_functional/plugins/kbn_sample_panel_action/public/sample_panel_link.ts @@ -16,9 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { npStart } from 'ui/new_platform'; import { Action, createAction, ActionType } from '../../../../../src/plugins/ui_actions/public'; -import { CONTEXT_MENU_TRIGGER } from '../../../../../src/plugins/embeddable/public'; // Casting to ActionType is a hack - in a real situation use // declare module and add this id to ActionContextMapping. @@ -31,7 +29,3 @@ export const createSamplePanelLink = (): Action => execute: async () => {}, getHref: () => 'https://example.com/kibana/test', }); - -const action = createSamplePanelLink(); -npStart.plugins.uiActions.registerAction(action); -npStart.plugins.uiActions.attachAction(CONTEXT_MENU_TRIGGER, action); diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/tsconfig.json b/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json similarity index 100% rename from test/plugin_functional/plugins/kbn_tp_sample_panel_action/tsconfig.json rename to test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json diff --git a/test/plugin_functional/test_suites/panel_actions/index.js b/test/plugin_functional/test_suites/panel_actions/index.js index 1c4b30771f3cc..bacd930c76e56 100644 --- a/test/plugin_functional/test_suites/panel_actions/index.js +++ b/test/plugin_functional/test_suites/panel_actions/index.js @@ -32,10 +32,9 @@ export default function({ getService, getPageObjects, loadTestFile }) { const browser = getService('browser'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); - const PageObjects = getPageObjects(['dashboard']); + const PageObjects = getPageObjects(['common', 'dashboard']); - // FLAKY: https://github.com/elastic/kibana/issues/41050 - describe.skip('pluggable panel actions', function() { + describe('pluggable panel actions', function() { before(async () => { await browser.setWindowSize(1300, 900); await esArchiver.load(KIBANA_ARCHIVE_PATH); diff --git a/test/scripts/jenkins_build_kbn_sample_panel_action.sh b/test/scripts/jenkins_build_kbn_sample_panel_action.sh new file mode 100644 index 0000000000000..0c425d61d0528 --- /dev/null +++ b/test/scripts/jenkins_build_kbn_sample_panel_action.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +source src/dev/ci_setup/setup_env.sh + +cd test/plugin_functional/plugins/kbn_sample_panel_action; +if [[ ! -d "target" ]]; then + checks-reporter-with-killswitch "Build kbn_sample_panel_action" yarn build; +fi +cd -; diff --git a/test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh b/test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh deleted file mode 100755 index 4b16e3b32fefd..0000000000000 --- a/test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -source src/dev/ci_setup/setup_env.sh - -cd test/plugin_functional/plugins/kbn_tp_sample_panel_action; -if [[ ! -d "target" ]]; then - checks-reporter-with-killswitch "Build kbn_tp_sample_panel_action" yarn build; -fi -cd -; diff --git a/test/scripts/jenkins_build_kibana.sh b/test/scripts/jenkins_build_kibana.sh index a7c05b6e5802d..1f6e09fad19e9 100755 --- a/test/scripts/jenkins_build_kibana.sh +++ b/test/scripts/jenkins_build_kibana.sh @@ -11,9 +11,6 @@ node scripts/build_kibana_platform_plugins \ # doesn't persist, also set in kibanaPipeline.groovy export KBN_NP_PLUGINS_BUILT=true -echo " -> downloading es snapshot" -node scripts/es snapshot --license=oss --download-only; - echo " -> Ensuring all functional tests are in a ciGroup" yarn run grunt functionalTests:ensureAllTestsInCiGroup; diff --git a/test/scripts/jenkins_ci_group.sh b/test/scripts/jenkins_ci_group.sh index b233d99d26902..23807a6e98dc2 100755 --- a/test/scripts/jenkins_ci_group.sh +++ b/test/scripts/jenkins_ci_group.sh @@ -6,7 +6,7 @@ if [[ -z "$CODE_COVERAGE" ]]; then checks-reporter-with-killswitch "Functional tests / Group ${CI_GROUP}" yarn run grunt "run:functionalTests_ciGroup${CI_GROUP}"; if [ "$CI_GROUP" == "1" ]; then - source test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh + source test/scripts/jenkins_build_kbn_sample_panel_action.sh yarn run grunt run:pluginFunctionalTestsRelease --from=source; yarn run grunt run:exampleFunctionalTestsRelease --from=source; yarn run grunt run:interpreterFunctionalTestsRelease; diff --git a/test/scripts/jenkins_xpack_build_kibana.sh b/test/scripts/jenkins_xpack_build_kibana.sh index 2bf9d2d9c158b..777d98080e407 100755 --- a/test/scripts/jenkins_xpack_build_kibana.sh +++ b/test/scripts/jenkins_xpack_build_kibana.sh @@ -12,9 +12,6 @@ node scripts/build_kibana_platform_plugins \ # doesn't persist, also set in kibanaPipeline.groovy export KBN_NP_PLUGINS_BUILT=true -echo " -> downloading es snapshot" -node scripts/es snapshot --download-only; - echo " -> Ensuring all functional tests are in a ciGroup" cd "$XPACK_DIR" node scripts/functional_tests --assert-none-excluded \ diff --git a/x-pack/legacy/plugins/apm/mappings.json b/x-pack/legacy/plugins/apm/mappings.json index 1e906dd2a5967..6ca9f13792085 100644 --- a/x-pack/legacy/plugins/apm/mappings.json +++ b/x-pack/legacy/plugins/apm/mappings.json @@ -33,9 +33,17 @@ }, "language": { "properties": { + "composite": { + "type": "keyword", + "ignore_above": 1024 + }, "name": { "type": "keyword", "ignore_above": 1024 + }, + "version": { + "type": "keyword", + "ignore_above": 1024 } } }, diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/index.tsx index 0abaa9d76fc07..94e42f1b91160 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/index.tsx +++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/index.tsx @@ -33,10 +33,16 @@ export function ServiceMap({ serviceName }: ServiceMapProps) { const license = useLicense(); const { urlParams } = useUrlParams(); - const { data } = useFetcher(() => { + const { data = { elements: [] } } = useFetcher(() => { + // When we don't have a license or a valid license, don't make the request. + if (!license || !isValidPlatinumLicense(license)) { + return; + } + const { start, end, environment } = urlParams; if (start && end) { return callApmApi({ + isCachable: false, pathname: '/api/apm/service-map', params: { query: { @@ -48,7 +54,7 @@ export function ServiceMap({ serviceName }: ServiceMapProps) { } }); } - }, [serviceName, urlParams]); + }, [license, serviceName, urlParams]); const { ref, height, width } = useRefDimensions(); diff --git a/x-pack/legacy/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/ServicePage/ServicePage.tsx b/x-pack/legacy/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/ServicePage/ServicePage.tsx index b9f8fd86d067b..43002c79aa2b4 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/ServicePage/ServicePage.tsx +++ b/x-pack/legacy/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/ServicePage/ServicePage.tsx @@ -36,7 +36,7 @@ export function ServicePage({ newConfig, setNewConfig, onClickNext }: Props) { callApmApi => { return callApmApi({ pathname: '/api/apm/settings/agent-configuration/services', - forceCache: true + isCachable: true }); }, [], diff --git a/x-pack/legacy/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/CustomLinkFlyout/FiltersSection.tsx b/x-pack/legacy/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/CustomLinkFlyout/FiltersSection.tsx index fdef9e1f5b7e7..fb8ffe6722c87 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/CustomLinkFlyout/FiltersSection.tsx +++ b/x-pack/legacy/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/CustomLinkFlyout/FiltersSection.tsx @@ -116,7 +116,7 @@ export const FiltersSection = ({ void; - customLinkSelected?: CustomLink; onSave: () => void; onDelete: () => void; + defaults?: { + url?: string; + label?: string; + filters?: Filter[]; + }; + customLinkId?: string; } +const filtersEmptyState: Filter[] = [{ key: '', value: '' }]; + export const CustomLinkFlyout = ({ onClose, - customLinkSelected, onSave, - onDelete + onDelete, + defaults, + customLinkId }: Props) => { const { toasts } = useApmPluginContext().core.notifications; const [isSaving, setIsSaving] = useState(false); - const [label, setLabel] = useState(customLinkSelected?.label || ''); - const [url, setUrl] = useState(customLinkSelected?.url || ''); - const selectedFilters = customLinkSelected?.filters; + const [label, setLabel] = useState(defaults?.label || ''); + const [url, setUrl] = useState(defaults?.url || ''); const [filters, setFilters] = useState( - selectedFilters?.length - ? selectedFilters - : ([{ key: '', value: '' }] as Filter[]) + defaults?.filters?.length ? defaults.filters : filtersEmptyState ); const isFormValid = !!label && !!url; @@ -61,7 +63,7 @@ export const CustomLinkFlyout = ({ event.preventDefault(); setIsSaving(true); await saveCustomLink({ - id: customLinkSelected?.id, + id: customLinkId, label, url, filters, @@ -131,7 +133,7 @@ export const CustomLinkFlyout = ({ onClose={onClose} isSaving={isSaving} onDelete={onDelete} - customLinkId={customLinkSelected?.id} + customLinkId={customLinkId} /> diff --git a/x-pack/legacy/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.tsx index 47990bf9233f6..e9a915e0f59bc 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.tsx +++ b/x-pack/legacy/plugins/apm/public/components/app/Settings/CustomizeUI/CustomLink/index.tsx @@ -55,7 +55,8 @@ export const CustomLinkOverview = () => { {isFlyoutOpen && ( { onCloseFlyout(); refetch(); diff --git a/x-pack/legacy/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx b/x-pack/legacy/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx index 0c5359e446ab8..048ed662ec502 100644 --- a/x-pack/legacy/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx +++ b/x-pack/legacy/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx @@ -7,10 +7,7 @@ import { EuiButtonEmpty } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { FunctionComponent, useMemo, useState } from 'react'; -import { - CustomLink as CustomLinkType, - Filter -} from '../../../../../../../plugins/apm/common/custom_link/custom_link_types'; +import { Filter } from '../../../../../../../plugins/apm/common/custom_link/custom_link_types'; import { Transaction } from '../../../../../../../plugins/apm/typings/es_schemas/ui/transaction'; import { ActionMenu, @@ -68,7 +65,7 @@ export const TransactionActionMenu: FunctionComponent = ({ { key: 'service.environment', value: transaction?.service.environment }, { key: 'transaction.name', value: transaction?.transaction.name }, { key: 'transaction.type', value: transaction?.transaction.type } - ] as Filter[], + ].filter((filter): filter is Filter => typeof filter.value === 'string'), [transaction] ); @@ -100,7 +97,7 @@ export const TransactionActionMenu: FunctionComponent = ({ <> {isCustomLinkFlyoutOpen && ( { toggleCustomLinkFlyout(); diff --git a/x-pack/legacy/plugins/apm/public/components/shared/TransactionActionMenu/__test__/TransactionActionMenu.test.tsx b/x-pack/legacy/plugins/apm/public/components/shared/TransactionActionMenu/__test__/TransactionActionMenu.test.tsx index 560884aec554a..ce42bd3e39ad1 100644 --- a/x-pack/legacy/plugins/apm/public/components/shared/TransactionActionMenu/__test__/TransactionActionMenu.test.tsx +++ b/x-pack/legacy/plugins/apm/public/components/shared/TransactionActionMenu/__test__/TransactionActionMenu.test.tsx @@ -17,6 +17,7 @@ import * as hooks from '../../../../hooks/useFetcher'; import { LicenseContext } from '../../../../context/LicenseContext'; import { License } from '../../../../../../../../plugins/licensing/common/license'; import { MockApmPluginContextWrapper } from '../../../../context/ApmPluginContext/MockApmPluginContext'; +import * as apmApi from '../../../../services/rest/createCallApmApi'; const renderTransaction = async (transaction: Record) => { const rendered = render( @@ -142,6 +143,12 @@ describe('TransactionActionMenu component', () => { }); describe('Custom links', () => { + beforeAll(() => { + spyOn(apmApi, 'callApmApi').and.returnValue({}); + }); + afterAll(() => { + jest.resetAllMocks(); + }); it('doesnt show custom links when license is not valid', () => { const license = new License({ signature: 'test signature', @@ -250,5 +257,53 @@ describe('TransactionActionMenu component', () => { }); expectTextsInDocument(component, ['Custom Links']); }); + it('opens flyout with filters prefilled', () => { + const license = new License({ + signature: 'test signature', + license: { + expiryDateInMillis: 0, + mode: 'gold', + status: 'active', + type: 'gold', + uid: '1' + } + }); + const component = render( + + + + + + ); + act(() => { + fireEvent.click(component.getByText('Actions')); + }); + expectTextsInDocument(component, ['Custom Links']); + act(() => { + fireEvent.click(component.getByText('Create custom link')); + }); + expectTextsInDocument(component, ['Create link']); + const getFilterKeyValue = (key: string) => { + return { + [(component.getAllByText(key)[0] as HTMLOptionElement) + .text]: (component.getAllByTestId( + `${key}.value` + )[0] as HTMLInputElement).value + }; + }; + expect(getFilterKeyValue('service.name')).toEqual({ + 'service.name': 'opbeans-go' + }); + expect(getFilterKeyValue('transaction.name')).toEqual({ + 'transaction.name': 'GET /api/products/:id/customers' + }); + expect(getFilterKeyValue('transaction.type')).toEqual({ + 'transaction.type': 'request' + }); + }); }); }); diff --git a/x-pack/legacy/plugins/apm/public/hooks/useDynamicIndexPattern.ts b/x-pack/legacy/plugins/apm/public/hooks/useDynamicIndexPattern.ts index 747144690bb24..ee3d2e81f259f 100644 --- a/x-pack/legacy/plugins/apm/public/hooks/useDynamicIndexPattern.ts +++ b/x-pack/legacy/plugins/apm/public/hooks/useDynamicIndexPattern.ts @@ -14,7 +14,7 @@ export function useDynamicIndexPattern( callApmApi => { return callApmApi({ pathname: '/api/apm/index_pattern/dynamic', - forceCache: true, + isCachable: true, params: { query: { processorEvent diff --git a/x-pack/legacy/plugins/apm/public/services/__test__/callApi.test.ts b/x-pack/legacy/plugins/apm/public/services/__test__/callApi.test.ts index 95ebed1fcb2a6..5da237b637abc 100644 --- a/x-pack/legacy/plugins/apm/public/services/__test__/callApi.test.ts +++ b/x-pack/legacy/plugins/apm/public/services/__test__/callApi.test.ts @@ -157,6 +157,46 @@ describe('callApi', () => { expect(http.get).toHaveBeenCalledTimes(1); }); + + it('should not return cached response with `isCachable: false` option', async () => { + await callApi(http, { + isCachable: false, + pathname: `/api/kibana`, + query: { start: '2010', end: '2011' } + }); + await callApi(http, { + isCachable: false, + pathname: `/api/kibana`, + query: { start: '2010', end: '2011' } + }); + await callApi(http, { + isCachable: false, + pathname: `/api/kibana`, + query: { start: '2010', end: '2011' } + }); + + expect(http.get).toHaveBeenCalledTimes(3); + }); + + it('should return cached response with `isCachable: true` option', async () => { + await callApi(http, { + isCachable: true, + pathname: `/api/kibana`, + query: { end: '2030' } + }); + await callApi(http, { + isCachable: true, + pathname: `/api/kibana`, + query: { end: '2030' } + }); + await callApi(http, { + isCachable: true, + pathname: `/api/kibana`, + query: { end: '2030' } + }); + + expect(http.get).toHaveBeenCalledTimes(1); + }); }); }); }); diff --git a/x-pack/legacy/plugins/apm/public/services/rest/callApi.ts b/x-pack/legacy/plugins/apm/public/services/rest/callApi.ts index 43ecb860a1f1a..d8e3d27f042a9 100644 --- a/x-pack/legacy/plugins/apm/public/services/rest/callApi.ts +++ b/x-pack/legacy/plugins/apm/public/services/rest/callApi.ts @@ -11,7 +11,7 @@ import { HttpSetup, HttpFetchOptions } from 'kibana/public'; export type FetchOptions = Omit & { pathname: string; - forceCache?: boolean; + isCachable?: boolean; method?: string; body?: any; }; @@ -74,8 +74,8 @@ export async function callApi( // only cache items that has a time range with `start` and `end` params, // and where `end` is not a timestamp in the future function isCachable(fetchOptions: FetchOptions) { - if (fetchOptions.forceCache) { - return true; + if (fetchOptions.isCachable !== undefined) { + return fetchOptions.isCachable; } if ( diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/elements/metric/index.ts b/x-pack/legacy/plugins/canvas/canvas_plugin_src/elements/metric/index.ts index def16f2a4b23a..c08c090f11f91 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/elements/metric/index.ts +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/elements/metric/index.ts @@ -6,7 +6,7 @@ import { openSans } from '../../../common/lib/fonts'; import header from './header.png'; -import { AdvancedSettings } from '../../../public/lib/kibana_advanced_settings'; +import { getAdvancedSettings } from '../../../public/lib/kibana_advanced_settings'; import { ElementFactory } from '../../../types'; export const metric: ElementFactory = () => ({ @@ -23,6 +23,6 @@ export const metric: ElementFactory = () => ({ | metric "Countries" metricFont={font size=48 family="${openSans.value}" color="#000000" align="center" lHeight=48} labelFont={font size=14 family="${openSans.value}" color="#000000" align="center"} - metricFormat="${AdvancedSettings.get('format:number:defaultPattern')}" + metricFormat="${getAdvancedSettings().get('format:number:defaultPattern')}" | render`, }); diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/renderers/time_filter/components/index.tsx b/x-pack/legacy/plugins/canvas/canvas_plugin_src/renderers/time_filter/components/index.tsx index e2e9358bf99c6..55a453720e2f0 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/renderers/time_filter/components/index.tsx +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/renderers/time_filter/components/index.tsx @@ -5,11 +5,11 @@ */ import React from 'react'; -import { AdvancedSettings } from '../../../../public/lib/kibana_advanced_settings'; +import { getAdvancedSettings } from '../../../../public/lib/kibana_advanced_settings'; import { TimeFilter as Component, Props } from './time_filter'; export const TimeFilter = (props: Props) => { - const customQuickRanges = (AdvancedSettings.get('timepicker:quickRanges') || []).map( + const customQuickRanges = (getAdvancedSettings().get('timepicker:quickRanges') || []).map( ({ from, to, display }: { from: string; to: string; display: string }) => ({ start: from, end: to, @@ -17,7 +17,7 @@ export const TimeFilter = (props: Props) => { }) ); - const customDateFormat = AdvancedSettings.get('dateFormat'); + const customDateFormat = getAdvancedSettings().get('dateFormat'); return ( diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/index.ts b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/index.ts index cc49943832d07..d19bfa64bae76 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/index.ts +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/date_format/index.ts @@ -7,7 +7,7 @@ import { compose, withProps } from 'recompose'; import moment from 'moment'; import { DateFormatArgInput as Component, Props as ComponentProps } from './date_format'; -import { AdvancedSettings } from '../../../../public/lib/kibana_advanced_settings'; +import { getAdvancedSettings } from '../../../../public/lib/kibana_advanced_settings'; // @ts-ignore untyped local lib import { templateFromReactComponent } from '../../../../public/lib/template_from_react_component'; import { ArgumentFactory } from '../../../../types/arguments'; @@ -15,19 +15,19 @@ import { ArgumentStrings } from '../../../../i18n'; const { DateFormat: strings } = ArgumentStrings; -const formatMap = { - DEFAULT: AdvancedSettings.get('dateFormat'), - NANOS: AdvancedSettings.get('dateNanosFormat'), +const getFormatMap = () => ({ + DEFAULT: getAdvancedSettings().get('dateFormat'), + NANOS: getAdvancedSettings().get('dateNanosFormat'), ISO8601: '', LOCAL_LONG: 'LLLL', LOCAL_SHORT: 'LLL', LOCAL_DATE: 'l', LOCAL_TIME_WITH_SECONDS: 'LTS', -}; +}); const now = moment(); -const dateFormats = Object.values(formatMap).map(format => ({ +const dateFormats = Object.values(getFormatMap()).map(format => ({ value: format, text: moment.utc(now).format(format), })); diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/index.ts b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/index.ts index 7654774901ff0..ce6c90c89a5a0 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/index.ts +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/arguments/number_format/index.ts @@ -6,7 +6,7 @@ import { compose, withProps } from 'recompose'; import { NumberFormatArgInput as Component, Props as ComponentProps } from './number_format'; -import { AdvancedSettings } from '../../../../public/lib/kibana_advanced_settings'; +import { getAdvancedSettings } from '../../../../public/lib/kibana_advanced_settings'; // @ts-ignore untyped local lib import { templateFromReactComponent } from '../../../../public/lib/template_from_react_component'; import { ArgumentFactory } from '../../../../types/arguments'; @@ -14,25 +14,28 @@ import { ArgumentStrings } from '../../../../i18n'; const { NumberFormat: strings } = ArgumentStrings; -const formatMap = { - NUMBER: AdvancedSettings.get('format:number:defaultPattern'), - PERCENT: AdvancedSettings.get('format:percent:defaultPattern'), - CURRENCY: AdvancedSettings.get('format:currency:defaultPattern'), +const getFormatMap = () => ({ + NUMBER: getAdvancedSettings().get('format:number:defaultPattern'), + PERCENT: getAdvancedSettings().get('format:percent:defaultPattern'), + CURRENCY: getAdvancedSettings().get('format:currency:defaultPattern'), DURATION: '00:00:00', - BYTES: AdvancedSettings.get('format:bytes:defaultPattern'), -}; + BYTES: getAdvancedSettings().get('format:bytes:defaultPattern'), +}); -const numberFormats = [ - { value: formatMap.NUMBER, text: strings.getFormatNumber() }, - { value: formatMap.PERCENT, text: strings.getFormatPercent() }, - { value: formatMap.CURRENCY, text: strings.getFormatCurrency() }, - { value: formatMap.DURATION, text: strings.getFormatDuration() }, - { value: formatMap.BYTES, text: strings.getFormatBytes() }, -]; +const getNumberFormats = () => { + const formatMap = getFormatMap(); + return [ + { value: formatMap.NUMBER, text: strings.getFormatNumber() }, + { value: formatMap.PERCENT, text: strings.getFormatPercent() }, + { value: formatMap.CURRENCY, text: strings.getFormatCurrency() }, + { value: formatMap.DURATION, text: strings.getFormatDuration() }, + { value: formatMap.BYTES, text: strings.getFormatBytes() }, + ]; +}; -export const NumberFormatArgInput = compose(withProps({ numberFormats }))( - Component -); +export const NumberFormatArgInput = compose( + withProps({ numberFormats: getNumberFormats() }) +)(Component); export const numberFormat: ArgumentFactory = () => ({ name: 'numberFormat', diff --git a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/views/metric.js b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/views/metric.js index 33cdb5541e172..e69f8f1de5952 100644 --- a/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/views/metric.js +++ b/x-pack/legacy/plugins/canvas/canvas_plugin_src/uis/views/metric.js @@ -5,7 +5,7 @@ */ import { openSans } from '../../../common/lib/fonts'; -import { AdvancedSettings } from '../../../public/lib/kibana_advanced_settings'; +import { getAdvancedSettings } from '../../../public/lib/kibana_advanced_settings'; import { ViewStrings } from '../../../i18n'; const { Metric: strings } = ViewStrings; @@ -21,7 +21,7 @@ export const metric = () => ({ displayName: strings.getMetricFormatDisplayName(), help: strings.getMetricFormatHelp(), argType: 'numberFormat', - default: `"${AdvancedSettings.get('format:number:defaultPattern')}"`, + default: `"${getAdvancedSettings().get('format:number:defaultPattern')}"`, }, { name: '_', diff --git a/x-pack/legacy/plugins/canvas/i18n/elements/element_strings.test.ts b/x-pack/legacy/plugins/canvas/i18n/elements/element_strings.test.ts index a946fa87a58b3..3d835bdf31bf8 100644 --- a/x-pack/legacy/plugins/canvas/i18n/elements/element_strings.test.ts +++ b/x-pack/legacy/plugins/canvas/i18n/elements/element_strings.test.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - +jest.mock('ui/new_platform'); import { getElementStrings } from './element_strings'; import { elementSpecs } from '../../canvas_plugin_src/elements'; diff --git a/x-pack/legacy/plugins/canvas/public/components/workpad_loader/workpad_loader.js b/x-pack/legacy/plugins/canvas/public/components/workpad_loader/workpad_loader.js index f8d6fb0bd76ce..9b30b3e1ec7ca 100644 --- a/x-pack/legacy/plugins/canvas/public/components/workpad_loader/workpad_loader.js +++ b/x-pack/legacy/plugins/canvas/public/components/workpad_loader/workpad_loader.js @@ -25,7 +25,7 @@ import { ConfirmModal } from '../confirm_modal'; import { Link } from '../link'; import { Paginate } from '../paginate'; import { ComponentStrings } from '../../../i18n'; -import { AdvancedSettings } from '../../lib/kibana_advanced_settings'; +import { getAdvancedSettings } from '../../lib/kibana_advanced_settings'; import { WorkpadDropzone } from './workpad_dropzone'; import { WorkpadCreate } from './workpad_create'; import { WorkpadSearch } from './workpad_search'; @@ -33,7 +33,7 @@ import { uploadWorkpad } from './upload_workpad'; const { WorkpadLoader: strings } = ComponentStrings; -const formatDate = date => date && moment(date).format(AdvancedSettings.get('dateFormat')); +const formatDate = date => date && moment(date).format(getAdvancedSettings().get('dateFormat')); const getDisplayName = (name, workpad, loadedWorkpad) => { const workpadName = name.length ? name : {workpad.id}; diff --git a/x-pack/legacy/plugins/canvas/public/lib/kibana_advanced_settings.ts b/x-pack/legacy/plugins/canvas/public/lib/kibana_advanced_settings.ts index 33f3d801c22d6..f57f3188a8184 100644 --- a/x-pack/legacy/plugins/canvas/public/lib/kibana_advanced_settings.ts +++ b/x-pack/legacy/plugins/canvas/public/lib/kibana_advanced_settings.ts @@ -4,6 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import chrome from 'ui/chrome'; +import { getCoreStart } from '../legacy'; -export const AdvancedSettings = chrome.getUiSettingsClient(); +export const getAdvancedSettings = () => getCoreStart().uiSettings; diff --git a/x-pack/legacy/plugins/index_lifecycle_management/server/routes/api/nodes/constants.ts b/x-pack/legacy/plugins/index_lifecycle_management/server/routes/api/nodes/constants.ts index 7a85c5e7c02d4..4392dacac8fa4 100644 --- a/x-pack/legacy/plugins/index_lifecycle_management/server/routes/api/nodes/constants.ts +++ b/x-pack/legacy/plugins/index_lifecycle_management/server/routes/api/nodes/constants.ts @@ -8,6 +8,8 @@ export const NODE_ATTRS_KEYS_TO_IGNORE: string[] = [ 'ml.enabled', 'ml.machine_memory', 'ml.max_open_jobs', - 'testattr', + // Used by ML to identify nodes that have transform enabled: + // https://github.com/elastic/elasticsearch/pull/52712/files#diff-225cc2c1291b4c60a8c3412a619094e1R147 + 'transform.node', 'xpack.installed', ]; diff --git a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/__snapshots__/view.test.js.snap b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/__snapshots__/view.test.js.snap index 2ca994647e1da..27ea52bfed044 100644 --- a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/__snapshots__/view.test.js.snap +++ b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/__snapshots__/view.test.js.snap @@ -67,6 +67,140 @@ exports[`TOCEntry is rendered 1`] = ` `; +exports[`TOCEntry props Should shade background when not selected layer 1`] = ` +
+
+ +
+ + +
+
+ + + +
+`; + +exports[`TOCEntry props Should shade background when selected layer 1`] = ` +
+
+ +
+ + +
+
+ + + +
+`; + exports[`TOCEntry props isReadOnly 1`] = `
{ return LAYER_ID; }, - hasLegendDetails: async () => { - return true; - }, renderLegendDetails: () => { return
TOC details mock
; }, @@ -83,5 +80,33 @@ describe('TOCEntry', () => { expect(component).toMatchSnapshot(); }); + + test('Should shade background when selected layer', async () => { + const component = shallowWithIntl(); + + // Ensure all promises resolve + await new Promise(resolve => process.nextTick(resolve)); + // Ensure the state changes are reflected + component.update(); + + expect(component).toMatchSnapshot(); + }); + + test('Should shade background when not selected layer', async () => { + const differentLayer = Object.create(mockLayer); + differentLayer.getId = () => { + return 'foobar'; + }; + const component = shallowWithIntl( + + ); + + // Ensure all promises resolve + await new Promise(resolve => process.nextTick(resolve)); + // Ensure the state changes are reflected + component.update(); + + expect(component).toMatchSnapshot(); + }); }); }); diff --git a/x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts b/x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts index 98af25cd7d209..74a11fb455ac0 100644 --- a/x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts +++ b/x-pack/legacy/plugins/siem/cypress/integration/signal_detection_rules_prebuilt.spec.ts @@ -114,7 +114,7 @@ describe('Deleting prebuilt rules', () => { cy.get(RELOAD_PREBUILT_RULES_BTN).should('exist'); cy.get(RELOAD_PREBUILT_RULES_BTN) .invoke('text') - .should('eql', 'Reload 1 deleted Elastic prebuilt rule '); + .should('eql', 'Install 1 Elastic prebuilt rule '); reloadDeletedRules(); @@ -146,7 +146,7 @@ describe('Deleting prebuilt rules', () => { cy.get(RELOAD_PREBUILT_RULES_BTN).should('exist'); cy.get(RELOAD_PREBUILT_RULES_BTN) .invoke('text') - .should('eql', `Reload ${numberOfRulesToBeSelected} deleted Elastic prebuilt rules `); + .should('eql', `Install ${numberOfRulesToBeSelected} Elastic prebuilt rules `); cy.get(ELASTIC_RULES_BTN) .invoke('text') .should('eql', `Elastic rules (${expectedNumberOfRulesAfterDeletion})`); diff --git a/x-pack/legacy/plugins/siem/cypress/integration/url_state.spec.ts b/x-pack/legacy/plugins/siem/cypress/integration/url_state.spec.ts index 25e50194f543d..cd60745b19040 100644 --- a/x-pack/legacy/plugins/siem/cypress/integration/url_state.spec.ts +++ b/x-pack/legacy/plugins/siem/cypress/integration/url_state.spec.ts @@ -249,6 +249,7 @@ describe('url state', () => { const timelineName = 'SIEM'; addNameToTimeline(timelineName); addDescriptionToTimeline('This is the best timeline of the world'); + cy.wait(5000); cy.url({ timeout: 30000 }).should('match', /\w*-\w*-\w*-\w*-\w*/); cy.url().then(url => { diff --git a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/index.tsx b/x-pack/legacy/plugins/siem/public/components/matrix_histogram/index.tsx index e3e0562424ffb..12a474009dc5b 100644 --- a/x-pack/legacy/plugins/siem/public/components/matrix_histogram/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/matrix_histogram/index.tsx @@ -25,7 +25,6 @@ import { HistogramAggregation, MatrixHistogramQueryProps, } from './types'; -import { ChartSeriesData } from '../charts/common'; import { InspectButtonContainer } from '../inspect'; import { State, inputsSelectors, hostsModel, networkModel } from '../../store'; @@ -120,11 +119,6 @@ export const MatrixHistogramComponent: React.FC( defaultStackByOption ); - - const [titleWithStackByField, setTitle] = useState(''); - const [subtitleWithCounts, setSubtitle] = useState(''); - const [hideHistogram, setHideHistogram] = useState(hideHistogramIfEmpty); - const [barChartData, setBarChartData] = useState(null); const setSelectedChartOptionCallback = useCallback( (event: React.ChangeEvent) => { setSelectedStackByOption( @@ -146,40 +140,36 @@ export const MatrixHistogramComponent: React.FC { - if (title != null) setTitle(typeof title === 'function' ? title(selectedStackByOption) : title); - - if (subtitle != null) - setSubtitle(typeof subtitle === 'function' ? subtitle(totalCount) : subtitle); - - if (totalCount <= 0 && hideHistogramIfEmpty) { - setHideHistogram(true); - } else { - setHideHistogram(false); - } - setBarChartData(getCustomChartData(data, mapping)); + const titleWithStackByField = useMemo( + () => (title != null && typeof title === 'function' ? title(selectedStackByOption) : title), + [title, selectedStackByOption] + ); + const subtitleWithCounts = useMemo( + () => (subtitle != null && typeof subtitle === 'function' ? subtitle(totalCount) : subtitle), + [subtitle, totalCount] + ); + const hideHistogram = useMemo(() => (totalCount <= 0 && hideHistogramIfEmpty ? true : false), [ + totalCount, + hideHistogramIfEmpty, + ]); + const barChartData = useMemo(() => getCustomChartData(data, mapping), [data, mapping]); + useEffect(() => { setQuery({ id, inspect, loading, refetch }); if (isInitialLoading && !!barChartData && data) { setIsInitialLoading(false); } }, [ - subtitle, - setSubtitle, - setHideHistogram, - setBarChartData, setQuery, - hideHistogramIfEmpty, - totalCount, id, inspect, - isInspected, loading, refetch, - data, - refetch, isInitialLoading, + barChartData, + data, + setIsInitialLoading, ]); if (hideHistogram) { diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/translations.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/translations.ts index e70eadda57085..407dedbf27baf 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/translations.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/translations.ts @@ -55,3 +55,10 @@ export const UPDATE_PREPACKAGED_RULES = (updateRules: number) => defaultMessage: 'Update {updateRules} Elastic prebuilt {updateRules, plural, =1 {rule} other {rules}} ', }); + +export const RELEASE_NOTES_HELP = i18n.translate( + 'xpack.siem.detectionEngine.rules.releaseNotesHelp', + { + defaultMessage: 'Release notes', + } +); diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.tsx b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.tsx index 80a120ebc63ef..c2887508a9ae9 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/components/pre_packaged_rules/update_callout.tsx @@ -6,7 +6,9 @@ import React, { memo } from 'react'; -import { EuiCallOut, EuiButton } from '@elastic/eui'; +import { EuiCallOut, EuiButton, EuiLink } from '@elastic/eui'; + +import { useKibana } from '../../../../../lib/kibana'; import * as i18n from './translations'; interface UpdatePrePackagedRulesCallOutProps { @@ -19,13 +21,25 @@ const UpdatePrePackagedRulesCallOutComponent: React.FC ( - -

{i18n.UPDATE_PREPACKAGED_RULES_MSG(numberOfUpdatedRules)}

- - {i18n.UPDATE_PREPACKAGED_RULES(numberOfUpdatedRules)} - -
-); +}) => { + const { services } = useKibana(); + return ( + +

+ {i18n.UPDATE_PREPACKAGED_RULES_MSG(numberOfUpdatedRules)} +
+ + {i18n.RELEASE_NOTES_HELP} + +

+ + {i18n.UPDATE_PREPACKAGED_RULES(numberOfUpdatedRules)} + +
+ ); +}; export const UpdatePrePackagedRulesCallOut = memo(UpdatePrePackagedRulesCallOutComponent); diff --git a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts index 882263934477d..fc0a79fa652ff 100644 --- a/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts +++ b/x-pack/legacy/plugins/siem/public/pages/detection_engine/rules/translations.ts @@ -406,7 +406,7 @@ export const RELOAD_MISSING_PREPACKAGED_RULES = (missingRules: number) => i18n.translate('xpack.siem.detectionEngine.rules.reloadMissingPrePackagedRulesButton', { values: { missingRules }, defaultMessage: - 'Reload {missingRules} deleted Elastic prebuilt {missingRules, plural, =1 {rule} other {rules}} ', + 'Install {missingRules} Elastic prebuilt {missingRules, plural, =1 {rule} other {rules}} ', }); export const IMPORT_RULE_BTN_TITLE = i18n.translate( diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.test.tsx b/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.test.tsx new file mode 100644 index 0000000000000..d838b936a2d65 --- /dev/null +++ b/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.test.tsx @@ -0,0 +1,135 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +/* eslint-disable react/display-name */ + +import euiDarkVars from '@elastic/eui/dist/eui_theme_dark.json'; +import { mount, ReactWrapper } from 'enzyme'; +import React from 'react'; +import { ThemeProvider } from 'styled-components'; + +import { useQuery } from '../../../containers/matrix_histogram'; +import { wait } from '../../../lib/helpers'; +import { mockIndexPattern, TestProviders } from '../../../mock'; + +import { AlertsByCategory } from '.'; + +jest.mock('../../../lib/kibana'); + +jest.mock('../../../containers/matrix_histogram', () => { + return { + useQuery: jest.fn(), + }; +}); + +const theme = () => ({ eui: { ...euiDarkVars, euiSizeL: '24px' }, darkMode: true }); +const from = new Date('2020-03-31T06:00:00.000Z').valueOf(); +const to = new Date('2019-03-31T06:00:00.000Z').valueOf(); + +describe('Alerts by category', () => { + let wrapper: ReactWrapper; + + describe('before loading data', () => { + beforeAll(async () => { + (useQuery as jest.Mock).mockReturnValue({ + data: null, + loading: false, + inspect: false, + totalCount: null, + }); + + wrapper = mount( + + + + + + ); + + await wait(); + wrapper.update(); + }); + + test('it renders the expected title', () => { + expect(wrapper.find('[data-test-subj="header-section-title"]').text()).toEqual( + 'External alert count' + ); + }); + + test('it does NOT render the subtitle', () => { + expect(wrapper.find('[data-test-subj="header-panel-subtitle"]').exists()).toBe(false); + }); + + test('it renders the expected filter fields', () => { + const expectedOptions = ['event.category', 'event.module']; + + expectedOptions.forEach(option => { + expect(wrapper.find(`option[value="${option}"]`).text()).toEqual(option); + }); + }); + + test('it renders the `View alerts` button', () => { + expect(wrapper.find('[data-test-subj="view-alerts"]').exists()).toBe(true); + }); + + test('it does NOT render the bar chart when data is not available', () => { + expect(wrapper.find(`.echChart`).exists()).toBe(false); + }); + }); + + describe('after loading data', () => { + beforeAll(async () => { + (useQuery as jest.Mock).mockReturnValue({ + data: [ + { x: 1, y: 2, g: 'g1' }, + { x: 2, y: 4, g: 'g1' }, + { x: 3, y: 6, g: 'g1' }, + { x: 1, y: 1, g: 'g2' }, + { x: 2, y: 3, g: 'g2' }, + { x: 3, y: 5, g: 'g2' }, + ], + loading: false, + inspect: false, + totalCount: 6, + }); + + wrapper = mount( + + + + + + ); + + await wait(); + wrapper.update(); + }); + + test('it renders the expected subtitle', () => { + expect(wrapper.find('[data-test-subj="header-panel-subtitle"]').text()).toEqual( + 'Showing: 6 external alerts' + ); + }); + + test('it renders the bar chart when data is available', () => { + expect(wrapper.find(`.echChart`).exists()).toBe(true); + }); + }); +}); diff --git a/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx b/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx index e0d383c59e2ee..744102fbac4b3 100644 --- a/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx +++ b/x-pack/legacy/plugins/siem/public/pages/overview/alerts_by_category/index.tsx @@ -78,7 +78,11 @@ const AlertsByCategoryComponent: React.FC = ({ const urlSearch = useGetUrlSearch(navTabs.detections); const alertsCountViewAlertsButton = useMemo( - () => {i18n.VIEW_ALERTS}, + () => ( + + {i18n.VIEW_ALERTS} + + ), [urlSearch] ); @@ -87,7 +91,7 @@ const AlertsByCategoryComponent: React.FC = ({ ...histogramConfigs, defaultStackByOption: alertsStackByOptions.find(o => o.text === DEFAULT_STACK_BY) ?? alertsStackByOptions[0], - getSubtitle: (totalCount: number) => + subtitle: (totalCount: number) => `${SHOWING}: ${numeral(totalCount).format(defaultNumberFormat)} ${UNIT(totalCount)}`, legendPosition: Position.Right, }), diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/alerts/toggle_alert_flyout_button.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/alerts/toggle_alert_flyout_button.tsx index 8093dd30604e4..04dfe4b3e3509 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/alerts/toggle_alert_flyout_button.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/alerts/toggle_alert_flyout_button.tsx @@ -49,7 +49,10 @@ export const ToggleAlertFlyoutButtonComponent = ({ setAlertFlyoutVisible }: Prop data-test-subj="xpack.uptime.toggleAlertFlyout" key="create-alert" icon="bell" - onClick={() => setAlertFlyoutVisible(true)} + onClick={() => { + setAlertFlyoutVisible(true); + setIsOpen(false); + }} > -
+
); }); diff --git a/x-pack/legacy/plugins/uptime/public/lib/alert_types/__tests__/monitor_status.test.ts b/x-pack/legacy/plugins/uptime/public/lib/alert_types/__tests__/monitor_status.test.ts index 6323ee3951e21..34b330e9ca1b0 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/alert_types/__tests__/monitor_status.test.ts +++ b/x-pack/legacy/plugins/uptime/public/lib/alert_types/__tests__/monitor_status.test.ts @@ -88,7 +88,7 @@ describe('monitor status alert type', () => { `); }); - it('has unparse-able `from` value', () => { + it('has unparseable `from` value', () => { expect( validate({ ...params, @@ -106,7 +106,7 @@ describe('monitor status alert type', () => { `); }); - it('has unparse-able `to` value', () => { + it('has unparseable `to` value', () => { expect( validate({ ...params, @@ -153,7 +153,7 @@ describe('monitor status alert type', () => { `); }); - it('is < 1', () => { + it('is less than 1', () => { expect(validate({ ...params, numTimes: 0 })).toMatchInlineSnapshot(` Object { "errors": Object { @@ -170,7 +170,8 @@ describe('monitor status alert type', () => { Object { "alertParamsExpression": [Function], "defaultActionMessage": "{{context.message}} - {{context.completeIdList}}", + Last triggered at: {{state.lastTriggeredAt}} + {{context.downMonitorsWithGeo}}", "iconClass": "uptimeApp", "id": "xpack.uptime.alerts.monitorStatus", "name": "Uptime Monitor Status", diff --git a/x-pack/legacy/plugins/uptime/public/lib/alert_types/monitor_status.tsx b/x-pack/legacy/plugins/uptime/public/lib/alert_types/monitor_status.tsx index effbb59539d16..fde25ea30734f 100644 --- a/x-pack/legacy/plugins/uptime/public/lib/alert_types/monitor_status.tsx +++ b/x-pack/legacy/plugins/uptime/public/lib/alert_types/monitor_status.tsx @@ -67,5 +67,5 @@ export const initMonitorStatusAlertType: AlertTypeInitializer = ({ return ; }, validate, - defaultActionMessage: '{{context.message}}\n{{context.completeIdList}}', + defaultActionMessage: `{{context.message}}\nLast triggered at: {{state.lastTriggeredAt}}\n{{context.downMonitorsWithGeo}}`, }); diff --git a/x-pack/legacy/plugins/uptime/public/routes.tsx b/x-pack/legacy/plugins/uptime/public/routes.tsx index 590e00e92e1fb..bb0700287dbf1 100644 --- a/x-pack/legacy/plugins/uptime/public/routes.tsx +++ b/x-pack/legacy/plugins/uptime/public/routes.tsx @@ -18,13 +18,19 @@ interface RouterProps { export const PageRouter: FC = ({ autocomplete }) => ( - +
+ +
- +
+ +
- +
+ +
diff --git a/x-pack/package.json b/x-pack/package.json index 2072b6d8d46e9..bbab1a96f52f4 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -180,8 +180,8 @@ "@babel/register": "^7.9.0", "@babel/runtime": "^7.9.2", "@elastic/apm-rum-react": "^0.3.2", - "@elastic/datemath": "5.0.2", - "@elastic/ems-client": "7.7.1", + "@elastic/datemath": "5.0.3", + "@elastic/ems-client": "7.8.0", "@elastic/eui": "21.0.1", "@elastic/filesaver": "1.1.2", "@elastic/maki": "6.2.0", @@ -289,6 +289,7 @@ "object-path-immutable": "^3.1.1", "oboe": "^2.1.4", "oppsy": "^2.0.0", + "p-retry": "^4.2.0", "papaparse": "^4.6.3", "pdfmake": "^0.1.63", "pluralize": "3.1.0", diff --git a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts index 6a0e2d65d1949..cfe4aa01a4a99 100644 --- a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts +++ b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts @@ -62,7 +62,7 @@ export const generalSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.captureBody.description', { defaultMessage: - 'For transactions that are HTTP requests, the agent can optionally capture the request body (e.g. POST variables). Default is "off".' + 'For transactions that are HTTP requests, the agent can optionally capture the request body (e.g. POST variables).' } ), options: [ @@ -191,7 +191,7 @@ export const generalSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.transactionMaxSpans.description', { defaultMessage: - 'Limits the amount of spans that are recorded per transaction. Default is 500.' + 'Limits the amount of spans that are recorded per transaction.' } ), min: 0, diff --git a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/java_settings.ts b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/java_settings.ts index 1a480c131e853..7331b6c5dcbf5 100644 --- a/x-pack/plugins/apm/common/agent_configuration/setting_definitions/java_settings.ts +++ b/x-pack/plugins/apm/common/agent_configuration/setting_definitions/java_settings.ts @@ -20,7 +20,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.enableLogCorrelation.description', { defaultMessage: - "A boolean specifying if the agent should integrate into SLF4J's https://www.slf4j.org/api/org/slf4j/MDC.html[MDC] to enable trace-log correlation.\nIf set to `true`, the agent will set the `trace.id` and `transaction.id` for the currently active spans and transactions to the MDC.\nSee <> for more details.\n\nNOTE: While it's allowed to enable this setting at runtime, you can't disable it without a restart." + "A boolean specifying if the agent should integrate into SLF4J's MDC to enable trace-log correlation. If set to `true`, the agent will set the `trace.id` and `transaction.id` for the currently active spans and transactions to the MDC. While it's allowed to enable this setting at runtime, you can't disable it without a restart." } ), includeAgents: ['java'] @@ -61,7 +61,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.circuitBreakerEnabled.description', { defaultMessage: - 'A boolean specifying whether the circuit breaker should be enabled or not. \nWhen enabled, the agent periodically polls stress monitors to detect system/process/JVM stress state. \nIf ANY of the monitors detects a stress indication, the agent will become inactive, as if the \n<> configuration option has been set to `false`, thus reducing resource consumption to a minimum. \nWhen inactive, the agent continues polling the same monitors in order to detect whether the stress state \nhas been relieved. If ALL monitors approve that the system/process/JVM is not under stress anymore, the \nagent will resume and become fully functional.' + 'A boolean specifying whether the circuit breaker should be enabled or not. When enabled, the agent periodically polls stress monitors to detect system/process/JVM stress state. If ANY of the monitors detects a stress indication, the agent will become inactive, as if the `active` configuration option has been set to `false`, thus reducing resource consumption to a minimum. When inactive, the agent continues polling the same monitors in order to detect whether the stress state has been relieved. If ALL monitors approve that the system/process/JVM is not under stress anymore, the agent will resume and become fully functional.' } ), includeAgents: ['java'] @@ -79,7 +79,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.stressMonitorGcStressThreshold.description', { defaultMessage: - 'The threshold used by the GC monitor to rely on for identifying heap stress.\nThe same threshold will be used for all heap pools, so that if ANY has a usage percentage that crosses it, \nthe agent will consider it as a heap stress. The GC monitor relies only on memory consumption measured \nafter a recent GC.' + 'The threshold used by the GC monitor to rely on for identifying heap stress. The same threshold will be used for all heap pools, so that if ANY has a usage percentage that crosses it, the agent will consider it as a heap stress. The GC monitor relies only on memory consumption measured after a recent GC.' } ), includeAgents: ['java'] @@ -98,7 +98,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.stressMonitorGcReliefThreshold.description', { defaultMessage: - 'The threshold used by the GC monitor to rely on for identifying when the heap is not under stress .\nIf `stress_monitor_gc_stress_threshold` has been crossed, the agent will consider it a heap-stress state. \nIn order to determine that the stress state is over, percentage of occupied memory in ALL heap pools should \nbe lower than this threshold. The GC monitor relies only on memory consumption measured after a recent GC.' + 'The threshold used by the GC monitor to rely on for identifying when the heap is not under stress. If `stress_monitor_gc_stress_threshold` has been crossed, the agent will consider it a heap-stress state. In order to determine that the stress state is over, percentage of occupied memory in ALL heap pools should be lower than this threshold. The GC monitor relies only on memory consumption measured after a recent GC.' } ), includeAgents: ['java'] @@ -116,7 +116,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.stressMonitorCpuDurationThreshold.description', { defaultMessage: - 'The minimal time required in order to determine whether the system is \neither currently under stress, or that the stress detected previously has been relieved. \nAll measurements during this time must be consistent in comparison to the relevant threshold in \norder to detect a change of stress state. Must be at least `1m`.' + 'The minimal time required in order to determine whether the system is either currently under stress, or that the stress detected previously has been relieved. All measurements during this time must be consistent in comparison to the relevant threshold in order to detect a change of stress state. Must be at least `1m`.' } ), includeAgents: ['java'] @@ -134,7 +134,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.stressMonitorSystemCpuStressThreshold.description', { defaultMessage: - 'The threshold used by the system CPU monitor to detect system CPU stress. \nIf the system CPU crosses this threshold for a duration of at least `stress_monitor_cpu_duration_threshold`, \nthe monitor considers this as a stress state.' + 'The threshold used by the system CPU monitor to detect system CPU stress. If the system CPU crosses this threshold for a duration of at least `stress_monitor_cpu_duration_threshold`, the monitor considers this as a stress state.' } ), includeAgents: ['java'] @@ -152,7 +152,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.stressMonitorSystemCpuReliefThreshold.description', { defaultMessage: - 'The threshold used by the system CPU monitor to determine that the system is \nnot under CPU stress. If the monitor detected a CPU stress, the measured system CPU needs to be below \nthis threshold for a duration of at least `stress_monitor_cpu_duration_threshold` in order for the \nmonitor to decide that the CPU stress has been relieved.' + 'The threshold used by the system CPU monitor to determine that the system is not under CPU stress. If the monitor detected a CPU stress, the measured system CPU needs to be below this threshold for a duration of at least `stress_monitor_cpu_duration_threshold` in order for the monitor to decide that the CPU stress has been relieved.' } ), includeAgents: ['java'] @@ -175,7 +175,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.profilingInferredSpansEnabled.description', { defaultMessage: - 'Set to `true` to make the agent create spans for method executions based on\nhttps://github.com/jvm-profiling-tools/async-profiler[async-profiler], a sampling aka statistical profiler.\n\nDue to the nature of how sampling profilers work,\nthe duration of the inferred spans are not exact, but only estimations.\nThe <> lets you fine tune the trade-off between accuracy and overhead.\n\nThe inferred spans are created after a profiling session has ended.\nThis means there is a delay between the regular and the inferred spans being visible in the UI.\n\nNOTE: This feature is not available on Windows' + 'Set to `true` to make the agent create spans for method executions based on async-profiler, a sampling aka statistical profiler. Due to the nature of how sampling profilers work, the duration of the inferred spans are not exact, but only estimations. The `profiling_inferred_spans_sampling_interval` lets you fine tune the trade-off between accuracy and overhead. The inferred spans are created after a profiling session has ended. This means there is a delay between the regular and the inferred spans being visible in the UI. This feature is not available on Windows' } ), includeAgents: ['java'] @@ -193,7 +193,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.profilingInferredSpansSamplingInterval.description', { defaultMessage: - 'The frequency at which stack traces are gathered within a profiling session.\nThe lower you set it, the more accurate the durations will be.\nThis comes at the expense of higher overhead and more spans for potentially irrelevant operations.\nThe minimal duration of a profiling-inferred span is the same as the value of this setting.' + 'The frequency at which stack traces are gathered within a profiling session. The lower you set it, the more accurate the durations will be. This comes at the expense of higher overhead and more spans for potentially irrelevant operations. The minimal duration of a profiling-inferred span is the same as the value of this setting.' } ), includeAgents: ['java'] @@ -211,7 +211,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.profilingInferredSpansMinDuration.description', { defaultMessage: - 'The minimum duration of an inferred span.\nNote that the min duration is also implicitly set by the sampling interval.\nHowever, increasing the sampling interval also decreases the accuracy of the duration of inferred spans.' + 'The minimum duration of an inferred span. Note that the min duration is also implicitly set by the sampling interval. However, increasing the sampling interval also decreases the accuracy of the duration of inferred spans.' } ), includeAgents: ['java'] @@ -229,7 +229,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.profilingInferredSpansIncludedClasses.description', { defaultMessage: - 'If set, the agent will only create inferred spans for methods which match this list.\nSetting a value may slightly increase performance and can reduce clutter by only creating spans for the classes you are interested in.\nExample: `org.example.myapp.*`\n\nThis option supports the wildcard `*`, which matches zero or more characters.\nExamples: `/foo/*/bar/*/baz*`, `*foo*`.\nMatching is case insensitive by default.\nPrepending an element with `(?-i)` makes the matching case sensitive.' + 'If set, the agent will only create inferred spans for methods which match this list. Setting a value may slightly increase performance and can reduce clutter by only creating spans for the classes you are interested in. Example: `org.example.myapp.*` This option supports the wildcard `*`, which matches zero or more characters. Examples: `/foo/*/bar/*/baz*`, `*foo*`. Matching is case insensitive by default. Prepending an element with `(?-i)` makes the matching case sensitive.' } ), includeAgents: ['java'] @@ -248,7 +248,7 @@ export const javaSettings: RawSettingDefinition[] = [ 'xpack.apm.agentConfig.profilingInferredSpansExcludedClasses.description', { defaultMessage: - 'Excludes classes for which no profiler-inferred spans should be created.\n\nThis option supports the wildcard `*`, which matches zero or more characters.\nExamples: `/foo/*/bar/*/baz*`, `*foo*`.\nMatching is case insensitive by default.\nPrepending an element with `(?-i)` makes the matching case sensitive.' + 'Excludes classes for which no profiler-inferred spans should be created. This option supports the wildcard `*`, which matches zero or more characters. Examples: `/foo/*/bar/*/baz*`, `*foo*`. Matching is case insensitive by default. Prepending an element with `(?-i)` makes the matching case sensitive.' } ), includeAgents: ['java'] diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts index 415076b6ae116..85f233de2086d 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts @@ -236,7 +236,7 @@ export const tasks: TelemetryTask[] = [ .map(part => Number(part)); return { - versions: { + version: { apm_server: { major, minor, diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts index f68dc517a2227..14807d50f3c31 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts @@ -18,7 +18,7 @@ export type TimeframeMapAll = Pick; export type APMDataTelemetry = DeepPartial<{ has_any_services: boolean; services_per_agent: Record; - versions: { + version: { apm_server: { minor: number; major: number; diff --git a/x-pack/plugins/apm/server/lib/helpers/create_or_update_index.ts b/x-pack/plugins/apm/server/lib/helpers/create_or_update_index.ts index 91a595c0900be..4df02786b1fb5 100644 --- a/x-pack/plugins/apm/server/lib/helpers/create_or_update_index.ts +++ b/x-pack/plugins/apm/server/lib/helpers/create_or_update_index.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - +import pRetry from 'p-retry'; import { IClusterClient, Logger } from 'src/core/server'; import { CallCluster } from 'src/legacy/core_plugins/elasticsearch'; @@ -34,27 +34,39 @@ export async function createOrUpdateIndex({ logger: Logger; }) { try { - const { callAsInternalUser } = esClient; - const indexExists = await callAsInternalUser('indices.exists', { index }); - const result = indexExists - ? await updateExistingIndex({ - index, - callAsInternalUser, - mappings - }) - : await createNewIndex({ - index, - callAsInternalUser, - mappings - }); + /* + * In some cases we could be trying to create an index before ES is ready. + * When this happens, we retry creating the index with exponential backoff. + * We use retry's default formula, meaning that the first retry happens after 2s, + * the 5th after 32s, and the final attempt after around 17m. If the final attempt fails, + * the error is logged to the console. + * See https://github.com/sindresorhus/p-retry and https://github.com/tim-kos/node-retry. + */ + await pRetry(async () => { + const { callAsInternalUser } = esClient; + const indexExists = await callAsInternalUser('indices.exists', { index }); + const result = indexExists + ? await updateExistingIndex({ + index, + callAsInternalUser, + mappings + }) + : await createNewIndex({ + index, + callAsInternalUser, + mappings + }); - if (!result.acknowledged) { - const resultError = - result && result.error && JSON.stringify(result.error); - throw new Error(resultError); - } + if (!result.acknowledged) { + const resultError = + result && result.error && JSON.stringify(result.error); + throw new Error(resultError); + } + }); } catch (e) { - logger.error(`Could not create APM index: '${index}'. Error: ${e.message}`); + logger.error( + `Could not create APM index: '${index}'. Error: ${e.message}.` + ); } } diff --git a/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts b/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts index 57d31553382bf..301f184af7d81 100644 --- a/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts +++ b/x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts @@ -19,6 +19,7 @@ import { getTotalLoaded, } from '../../../../../src/plugins/data/server'; import { IEnhancedEsSearchRequest } from '../../common'; +import { shimHitsTotal } from './shim_hits_total'; export interface AsyncSearchResponse { id: string; @@ -56,22 +57,27 @@ async function asyncSearch( request: IEnhancedEsSearchRequest, options?: ISearchOptions ) { - const { body = undefined, index = undefined, ...params } = request.id ? {} : request.params; + const { timeout = undefined, restTotalHitsAsInt = undefined, ...params } = { + trackTotalHits: true, // Get the exact count of hits + ...request.params, + }; // If we have an ID, then just poll for that ID, otherwise send the entire request body + const { body = undefined, index = undefined, ...queryParams } = request.id ? {} : params; + const method = request.id ? 'GET' : 'POST'; const path = encodeURI(request.id ? `_async_search/${request.id}` : `${index}/_async_search`); // Wait up to 1s for the response to return - const query = toSnakeCase({ waitForCompletionTimeout: '1s', ...params }); + const query = toSnakeCase({ waitForCompletionTimeout: '1s', ...queryParams }); - const { response: rawResponse, id } = (await caller( + const { response, id } = (await caller( 'transport.request', { method, path, body, query }, options )) as AsyncSearchResponse; - return { id, rawResponse, ...getTotalLoaded(rawResponse._shards) }; + return { id, rawResponse: shimHitsTotal(response), ...getTotalLoaded(response._shards) }; } async function rollupSearch( diff --git a/x-pack/plugins/data_enhanced/server/search/shim_hits_total.test.ts b/x-pack/plugins/data_enhanced/server/search/shim_hits_total.test.ts new file mode 100644 index 0000000000000..61740b97299da --- /dev/null +++ b/x-pack/plugins/data_enhanced/server/search/shim_hits_total.test.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { shimHitsTotal } from './shim_hits_total'; + +describe('shimHitsTotal', () => { + test('returns the total if it is already numeric', () => { + const result = shimHitsTotal({ + hits: { + total: 5, + }, + } as any); + expect(result).toEqual({ + hits: { + total: 5, + }, + }); + }); + + test('returns the total if it is inside `value`', () => { + const result = shimHitsTotal({ + hits: { + total: { + value: 5, + }, + }, + } as any); + expect(result).toEqual({ + hits: { + total: 5, + }, + }); + }); + + test('returns other properties from the response', () => { + const result = shimHitsTotal({ + _shards: {}, + hits: { + hits: [], + total: { + value: 5, + }, + }, + } as any); + expect(result).toEqual({ + _shards: {}, + hits: { + hits: [], + total: 5, + }, + }); + }); +}); diff --git a/x-pack/plugins/data_enhanced/server/search/shim_hits_total.ts b/x-pack/plugins/data_enhanced/server/search/shim_hits_total.ts new file mode 100644 index 0000000000000..10d45be01563a --- /dev/null +++ b/x-pack/plugins/data_enhanced/server/search/shim_hits_total.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { SearchResponse } from 'elasticsearch'; + +/** + * Temporary workaround until https://github.com/elastic/kibana/issues/26356 is addressed. + * Since we are setting `track_total_hits` in the request, `hits.total` will be an object + * containing the `value`. + */ +export function shimHitsTotal(response: SearchResponse) { + const total = (response.hits?.total as any)?.value ?? response.hits?.total; + const hits = { ...response.hits, total }; + return { ...response, hits }; +} diff --git a/x-pack/plugins/endpoint/package.json b/x-pack/plugins/endpoint/package.json index 9e65f23a38860..fc4f4bd586bef 100644 --- a/x-pack/plugins/endpoint/package.json +++ b/x-pack/plugins/endpoint/package.json @@ -13,7 +13,6 @@ "devDependencies": { "@types/seedrandom": ">=2.0.0 <4.0.0", "@types/react-redux": "^7.1.0", - "redux-devtools-extension": "^2.13.8", - "ts-node": "^8.8.1" + "redux-devtools-extension": "^2.13.8" } } diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/components/__snapshots__/page_view.test.tsx.snap b/x-pack/plugins/endpoint/public/applications/endpoint/components/__snapshots__/page_view.test.tsx.snap index 34420e653049c..dfc69fc46ebdc 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/components/__snapshots__/page_view.test.tsx.snap +++ b/x-pack/plugins/endpoint/public/applications/endpoint/components/__snapshots__/page_view.test.tsx.snap @@ -1,32 +1,41 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`PageView component should display body header custom element 1`] = ` -.c0 { +.c0.endpoint--isListView { padding: 0; } -.c0 .endpoint-header { +.c0.endpoint--isListView .endpoint-header { padding: 24px; } -.c0 .endpoint-page-content { +.c0.endpoint--isListView .endpoint-page-content { border-left: none; border-right: none; } +.c0.endpoint--isDetailsView .endpoint-page-content { + padding: 0; + border: none; + background: none; +} + body header

} + viewType="list" > - +

body header @@ -82,28 +91,37 @@ exports[`PageView component should display body header custom element 1`] = ` `; exports[`PageView component should display body header wrapped in EuiTitle 1`] = ` -.c0 { +.c0.endpoint--isListView { padding: 0; } -.c0 .endpoint-header { +.c0.endpoint--isListView .endpoint-header { padding: 24px; } -.c0 .endpoint-page-content { +.c0.endpoint--isListView .endpoint-page-content { border-left: none; border-right: none; } +.c0.endpoint--isDetailsView .endpoint-page-content { + padding: 0; + border: none; + background: none; +} + - +

- -

- body header -

-
+ + +

+ body header +

+
+
@@ -163,29 +184,38 @@ exports[`PageView component should display body header wrapped in EuiTitle 1`] = `; exports[`PageView component should display header left and right 1`] = ` -.c0 { +.c0.endpoint--isListView { padding: 0; } -.c0 .endpoint-header { +.c0.endpoint--isListView .endpoint-header { padding: 24px; } -.c0 .endpoint-page-content { +.c0.endpoint--isListView .endpoint-page-content { border-left: none; border-right: none; } +.c0.endpoint--isDetailsView .endpoint-page-content { + padding: 0; + border: none; + background: none; +} + - +
- -

+ - page title -

-
+

+ page title +

+ +
- +.c0.endpoint--isDetailsView .endpoint-page-content { + padding: 0; + border: none; + background: none; +} + + +
- +
- -

+ - page title -

-
+

+ page title +

+ +
@@ -401,28 +456,37 @@ exports[`PageView component should display only header left 1`] = ` `; exports[`PageView component should display only header right but include an empty left side 1`] = ` -.c0 { +.c0.endpoint--isListView { padding: 0; } -.c0 .endpoint-header { +.c0.endpoint--isListView .endpoint-header { padding: 24px; } -.c0 .endpoint-page-content { +.c0.endpoint--isListView .endpoint-page-content { border-left: none; border-right: none; } +.c0.endpoint--isDetailsView .endpoint-page-content { + padding: 0; + border: none; + background: none; +} + - +
title here

} + viewType="list" > - +
{ mount(ui, { wrappingComponent: EuiThemeProvider }); it('should display only body if not header props used', () => { - expect(render(body content)).toMatchSnapshot(); + expect(render(body content)).toMatchSnapshot(); }); it('should display header left and right', () => { expect( render( - + body content ) ).toMatchSnapshot(); }); it('should display only header left', () => { - expect(render(body content)).toMatchSnapshot(); + expect( + render( + + body content + + ) + ).toMatchSnapshot(); }); it('should display only header right but include an empty left side', () => { expect( - render(body content) + render( + + body content + + ) ).toMatchSnapshot(); }); it(`should use custom element for header left and not wrap in EuiTitle`, () => { expect( - render(title here

}>body content
) + render( + title here

}> + body content +
+ ) ).toMatchSnapshot(); }); it('should display body header wrapped in EuiTitle', () => { - expect(render(body content)).toMatchSnapshot(); + expect( + render( + + body content + + ) + ).toMatchSnapshot(); }); it('should display body header custom element', () => { expect( - render(body header

}>body content
) + render( + body header

}> + body content +
+ ) ).toMatchSnapshot(); }); it('should pass through EuiPage props', () => { expect( render( props.theme.eui.euiSizeL}; + .endpoint-header { + padding: ${props => props.theme.eui.euiSizeL}; + } + .endpoint-page-content { + border-left: none; + border-right: none; + } } - .endpoint-page-content { - border-left: none; - border-right: none; + &.endpoint--isDetailsView { + .endpoint-page-content { + padding: 0; + border: none; + background: none; + } } `; const isStringOrNumber = /(string|number)/; +/** + * The `PageView` component used to render `headerLeft` when it is set as a `string` + * Can be used when wanting to customize the `headerLeft` value but still use the standard + * title component + */ +export const PageViewHeaderTitle = memo<{ children: ReactNode }>(({ children }) => { + return ( + +

{children}

+
+ ); +}); + +/** + * The `PageView` component used to render `bodyHeader` when it is set as a `string` + * Can be used when wanting to customize the `bodyHeader` value but still use the standard + * title component + */ +export const PageViewBodyHeaderTitle = memo<{ children: ReactNode }>( + ({ children, ...otherProps }) => { + return ( + +

{children}

+
+ ); + } +); + /** * Page View layout for use in Endpoint */ export const PageView = memo< EuiPageProps & { + /** + * The type of view + */ + viewType: 'list' | 'details'; /** * content to be placed on the left side of the header. If a `string` is used, then it will * be wrapped with `

`, else it will just be used as is. @@ -52,17 +93,18 @@ export const PageView = memo< bodyHeader?: ReactNode; children?: ReactNode; } ->(({ children, headerLeft, headerRight, bodyHeader, ...otherProps }) => { +>(({ viewType, children, headerLeft, headerRight, bodyHeader, ...otherProps }) => { return ( - + {(headerLeft || headerRight) && ( {isStringOrNumber.test(typeof headerLeft) ? ( - -

{headerLeft}

-
+ {headerLeft} ) : ( headerLeft )} @@ -77,11 +119,9 @@ export const PageView = memo< {bodyHeader && ( - + {isStringOrNumber.test(typeof bodyHeader) ? ( - -

{bodyHeader}

-
+ {bodyHeader} ) : ( bodyHeader )} diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/models/policy.ts b/x-pack/plugins/endpoint/public/applications/endpoint/models/policy.ts new file mode 100644 index 0000000000000..e1ac9defc858e --- /dev/null +++ b/x-pack/plugins/endpoint/public/applications/endpoint/models/policy.ts @@ -0,0 +1,90 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { PolicyConfig } from '../types'; + +/** + * Generate a new Policy model. + * NOTE: in the near future, this will likely be removed and an API call to EPM will be used to retrieve + * the latest from the Endpoint package + */ +export const generatePolicy = (): PolicyConfig => { + return { + windows: { + events: { + process: true, + network: true, + }, + malware: { + mode: 'prevent', + }, + logging: { + stdout: 'debug', + file: 'info', + }, + advanced: { + elasticsearch: { + indices: { + control: 'control-index', + event: 'event-index', + logging: 'logging-index', + }, + kernel: { + connect: true, + process: true, + }, + }, + }, + }, + mac: { + events: { + process: true, + }, + malware: { + mode: 'detect', + }, + logging: { + stdout: 'debug', + file: 'info', + }, + advanced: { + elasticsearch: { + indices: { + control: 'control-index', + event: 'event-index', + logging: 'logging-index', + }, + kernel: { + connect: true, + process: true, + }, + }, + }, + }, + linux: { + events: { + process: true, + }, + logging: { + stdout: 'debug', + file: 'info', + }, + advanced: { + elasticsearch: { + indices: { + control: 'control-index', + event: 'event-index', + logging: 'logging-index', + }, + kernel: { + connect: true, + process: true, + }, + }, + }, + }, + }; +}; diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/models/policy_details_config.ts b/x-pack/plugins/endpoint/public/applications/endpoint/models/policy_details_config.ts index 1900516cb539b..1145d1d19242a 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/models/policy_details_config.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/models/policy_details_config.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { PolicyConfig } from '../types'; +import { UIPolicyConfig } from '../types'; /** * A typed Object.entries() function where the keys and values are typed based on the given object @@ -14,10 +14,10 @@ const entries = (o: T): Array<[keyof T, T[keyof T]]> => type DeepPartial = { [K in keyof T]?: DeepPartial }; /** - * Returns a deep copy of PolicyDetailsConfig + * Returns a deep copy of `UIPolicyConfig` object */ -export function clone(policyDetailsConfig: PolicyConfig): PolicyConfig { - const clonedConfig: DeepPartial = {}; +export function clone(policyDetailsConfig: UIPolicyConfig): UIPolicyConfig { + const clonedConfig: DeepPartial = {}; for (const [key, val] of entries(policyDetailsConfig)) { if (typeof val === 'object') { const valClone: Partial = {}; @@ -41,5 +41,5 @@ export function clone(policyDetailsConfig: PolicyConfig): PolicyConfig { /** * clonedConfig is typed as DeepPartial so we can construct the copy from an empty object */ - return clonedConfig as PolicyConfig; + return clonedConfig as UIPolicyConfig; } diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/services/ingest.ts b/x-pack/plugins/endpoint/public/applications/endpoint/services/ingest.ts index fbb92f8bbe915..583ebc55d896b 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/services/ingest.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/services/ingest.ts @@ -5,11 +5,17 @@ */ import { HttpFetchOptions, HttpStart } from 'kibana/public'; -import { GetDatasourcesRequest } from '../../../../../ingest_manager/common/types/rest_spec'; -import { PolicyData } from '../types'; +import { + CreateDatasourceResponse, + GetAgentStatusResponse, + GetDatasourcesRequest, +} from '../../../../../ingest_manager/common/types/rest_spec'; +import { NewPolicyData, PolicyData } from '../types'; const INGEST_API_ROOT = `/api/ingest_manager`; const INGEST_API_DATASOURCES = `${INGEST_API_ROOT}/datasources`; +const INGEST_API_FLEET = `${INGEST_API_ROOT}/fleet`; +const INGEST_API_FLEET_AGENT_STATUS = `${INGEST_API_FLEET}/agent-status`; // FIXME: Import from ingest after - https://github.com/elastic/kibana/issues/60677 export interface GetDatasourcesResponse { @@ -26,6 +32,11 @@ export interface GetDatasourceResponse { success: boolean; } +// FIXME: Import from Ingest after - https://github.com/elastic/kibana/issues/60677 +export type UpdateDatasourceResponse = CreateDatasourceResponse & { + item: PolicyData; +}; + /** * Retrieves a list of endpoint specific datasources (those created with a `package.name` of * `endpoint`) from Ingest @@ -60,3 +71,44 @@ export const sendGetDatasource = ( ) => { return http.get(`${INGEST_API_DATASOURCES}/${datasourceId}`, options); }; + +/** + * Updates a datasources + * + * @param http + * @param datasourceId + * @param datasource + * @param options + */ +export const sendPutDatasource = ( + http: HttpStart, + datasourceId: string, + datasource: NewPolicyData, + options: Exclude = {} +): Promise => { + return http.put(`${INGEST_API_DATASOURCES}/${datasourceId}`, { + ...options, + body: JSON.stringify(datasource), + }); +}; + +/** + * Get a status summary for all Agents that are currently assigned to a given agent configuration + * + * @param http + * @param configId + * @param options + */ +export const sendGetFleetAgentStatusForConfig = ( + http: HttpStart, + /** the Agent (fleet) configuration id */ + configId: string, + options: Exclude = {} +): Promise => { + return http.get(INGEST_API_FLEET_AGENT_STATUS, { + ...options, + query: { + configId, + }, + }); +}; diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/action.ts b/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/action.ts index e7e523a9287b8..9905145048a8a 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/action.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/action.ts @@ -4,7 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { PolicyData, PolicyConfig } from '../../types'; +import { PolicyData, PolicyDetailsState, ServerApiError, UIPolicyConfig } from '../../types'; +import { GetAgentStatusResponse } from '../../../../../../ingest_manager/common/types/rest_spec'; interface ServerReturnedPolicyDetailsData { type: 'serverReturnedPolicyDetailsData'; @@ -13,14 +14,50 @@ interface ServerReturnedPolicyDetailsData { }; } +interface ServerFailedToReturnPolicyDetailsData { + type: 'serverFailedToReturnPolicyDetailsData'; + payload: ServerApiError; +} + /** * When users change a policy via forms, this action is dispatched with a payload that modifies the configuration of a cloned policy config. */ interface UserChangedPolicyConfig { type: 'userChangedPolicyConfig'; payload: { - policyConfig: PolicyConfig; + policyConfig: UIPolicyConfig; + }; +} + +interface ServerReturnedPolicyDetailsAgentSummaryData { + type: 'serverReturnedPolicyDetailsAgentSummaryData'; + payload: { + agentStatusSummary: GetAgentStatusResponse['results']; + }; +} + +interface ServerReturnedPolicyDetailsUpdateFailure { + type: 'serverReturnedPolicyDetailsUpdateFailure'; + payload: PolicyDetailsState['updateStatus']; +} + +interface ServerReturnedUpdatedPolicyDetailsData { + type: 'serverReturnedUpdatedPolicyDetailsData'; + payload: { + policyItem: PolicyData; + updateStatus: PolicyDetailsState['updateStatus']; }; } -export type PolicyDetailsAction = ServerReturnedPolicyDetailsData | UserChangedPolicyConfig; +interface UserClickedPolicyDetailsSaveButton { + type: 'userClickedPolicyDetailsSaveButton'; +} + +export type PolicyDetailsAction = + | ServerReturnedPolicyDetailsData + | UserClickedPolicyDetailsSaveButton + | ServerReturnedPolicyDetailsAgentSummaryData + | ServerReturnedPolicyDetailsUpdateFailure + | ServerReturnedUpdatedPolicyDetailsData + | ServerFailedToReturnPolicyDetailsData + | UserChangedPolicyConfig; diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/index.test.ts b/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/index.test.ts index b20df84fdf575..cf14092953227 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/index.test.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/index.test.ts @@ -9,6 +9,7 @@ import { createStore, Dispatch, Store } from 'redux'; import { policyDetailsReducer, PolicyDetailsAction } from './index'; import { policyConfig, windowsEventing } from './selectors'; import { clone } from '../../models/policy_details_config'; +import { generatePolicy } from '../../models/policy'; describe('policy details: ', () => { let store: Store; @@ -30,7 +31,18 @@ describe('policy details: ', () => { config_id: '', enabled: true, output_id: '', - inputs: [], + inputs: [ + { + type: 'endpoint', + enabled: true, + streams: [], + config: { + policy: { + value: generatePolicy(), + }, + }, + }, + ], namespace: '', package: { name: '', @@ -39,32 +51,6 @@ describe('policy details: ', () => { }, revision: 1, }, - policyConfig: { - windows: { - malware: { - mode: 'detect', - }, - eventing: { - process: false, - network: false, - }, - }, - mac: { - malware: { - mode: '', - }, - eventing: { - process: false, - network: false, - }, - }, - linux: { - eventing: { - process: false, - network: false, - }, - }, - }, }, }); }); @@ -77,7 +63,7 @@ describe('policy details: ', () => { } const newPayload1 = clone(config); - newPayload1.windows.eventing.process = true; + newPayload1.windows.events.process = true; dispatch({ type: 'userChangedPolicyConfig', diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/middleware.ts b/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/middleware.ts index 1942538aa9df9..18248e272aada 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/middleware.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/middleware.ts @@ -4,9 +4,15 @@ * you may not use this file except in compliance with the Elastic License. */ -import { MiddlewareFactory, PolicyDetailsState } from '../../types'; -import { policyIdFromParams, isOnPolicyDetailsPage } from './selectors'; -import { sendGetDatasource } from '../../services/ingest'; +import { MiddlewareFactory, PolicyData, PolicyDetailsState } from '../../types'; +import { policyIdFromParams, isOnPolicyDetailsPage, policyDetails } from './selectors'; +import { + sendGetDatasource, + sendGetFleetAgentStatusForConfig, + sendPutDatasource, + UpdateDatasourceResponse, +} from '../../services/ingest'; +import { generatePolicy } from '../../models/policy'; export const policyDetailsMiddlewareFactory: MiddlewareFactory = coreStart => { const http = coreStart.http; @@ -17,25 +23,78 @@ export const policyDetailsMiddlewareFactory: MiddlewareFactory { return { policyItem: undefined, - policyConfig: undefined, isLoading: false, + agentStatusSummary: { + error: 0, + events: 0, + offline: 0, + online: 0, + total: 0, + }, }; }; @@ -20,7 +27,10 @@ export const policyDetailsReducer: Reducer = ( state = initialPolicyDetailsState(), action ) => { - if (action.type === 'serverReturnedPolicyDetailsData') { + if ( + action.type === 'serverReturnedPolicyDetailsData' || + action.type === 'serverReturnedUpdatedPolicyDetailsData' + ) { return { ...state, ...action.payload, @@ -28,19 +38,67 @@ export const policyDetailsReducer: Reducer = ( }; } - if (action.type === 'userChangedUrl') { + if (action.type === 'serverFailedToReturnPolicyDetailsData') { return { ...state, - location: action.payload, + isLoading: false, + apiError: action.payload, }; } - if (action.type === 'userChangedPolicyConfig') { + if (action.type === 'serverReturnedPolicyDetailsAgentSummaryData') { + return { + ...state, + ...action.payload, + }; + } + + if (action.type === 'serverReturnedPolicyDetailsUpdateFailure') { + return { + ...state, + isLoading: false, + updateStatus: action.payload, + }; + } + + if (action.type === 'userClickedPolicyDetailsSaveButton') { return { ...state, - policyConfig: action.payload.policyConfig, + isLoading: true, + updateApiError: undefined, }; } + if (action.type === 'userChangedUrl') { + const newState = { + ...state, + location: action.payload, + }; + + if (isOnPolicyDetailsPage(newState)) { + return newState; + } + return { + ...initialPolicyDetailsState(), + location: action.payload, + }; + } + + if (action.type === 'userChangedPolicyConfig') { + const newState = { ...state, policyItem: { ...(state.policyItem as PolicyData) } }; + const newPolicy = (newState.policyItem.inputs[0].config.policy.value = { + ...fullPolicy(state), + }); + + Object.entries(action.payload.policyConfig).forEach(([section, newSettings]) => { + newPolicy[section as keyof UIPolicyConfig] = { + ...newPolicy[section as keyof UIPolicyConfig], + ...newSettings, + }; + }); + + return newState; + } + return state; }; diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/selectors.ts b/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/selectors.ts index 6a5d4077b3c32..0d505931c9ec5 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/selectors.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/store/policy_details/selectors.ts @@ -5,8 +5,8 @@ */ import { createSelector } from 'reselect'; -import { PolicyDetailsState } from '../../types'; -import { Immutable } from '../../../../../common/types'; +import { PolicyConfig, PolicyDetailsState, UIPolicyConfig } from '../../types'; +import { generatePolicy } from '../../models/policy'; /** Returns the policy details */ export const policyDetails = (state: PolicyDetailsState) => state.policyItem; @@ -32,20 +32,64 @@ export const policyIdFromParams: (state: PolicyDetailsState) => string = createS } ); +/** + * Returns the full Endpoint Policy, which will include private settings not shown on the UI. + * Note: this will return a default full policy if the `policyItem` is `undefined` + */ +export const fullPolicy: (s: PolicyDetailsState) => PolicyConfig = createSelector( + policyDetails, + policyData => { + return policyData?.inputs[0]?.config?.policy?.value ?? generatePolicy(); + } +); + +const fullWindowsPolicySettings: ( + s: PolicyDetailsState +) => PolicyConfig['windows'] = createSelector(fullPolicy, policy => policy?.windows); + +const fullMacPolicySettings: (s: PolicyDetailsState) => PolicyConfig['mac'] = createSelector( + fullPolicy, + policy => policy?.mac +); + +const fullLinuxPolicySettings: (s: PolicyDetailsState) => PolicyConfig['linux'] = createSelector( + fullPolicy, + policy => policy?.linux +); + /** Returns the policy configuration */ -export const policyConfig = (state: Immutable) => state.policyConfig; +export const policyConfig: (s: PolicyDetailsState) => UIPolicyConfig = createSelector( + fullWindowsPolicySettings, + fullMacPolicySettings, + fullLinuxPolicySettings, + (windows, mac, linux) => { + return { + windows: { + events: windows.events, + malware: windows.malware, + }, + mac: { + events: mac.events, + malware: mac.malware, + }, + linux: { + events: linux.events, + }, + }; + } +); /** Returns an object of all the windows eventing configuration */ export const windowsEventing = (state: PolicyDetailsState) => { const config = policyConfig(state); - return config && config.windows.eventing; + return config && config.windows.events; }; /** Returns the total number of possible windows eventing configurations */ export const totalWindowsEventing = (state: PolicyDetailsState): number => { const config = policyConfig(state); if (config) { - return Object.keys(config.windows.eventing).length; + return Object.keys(config.windows.events).length; } return 0; }; @@ -54,9 +98,21 @@ export const totalWindowsEventing = (state: PolicyDetailsState): number => { export const selectedWindowsEventing = (state: PolicyDetailsState): number => { const config = policyConfig(state); if (config) { - return Object.values(config.windows.eventing).reduce((count, event) => { + return Object.values(config.windows.events).reduce((count, event) => { return event === true ? count + 1 : count; }, 0); } return 0; }; + +/** is there an api call in flight */ +export const isLoading = (state: PolicyDetailsState) => state.isLoading; + +/** API error when fetching Policy data */ +export const apiError = (state: PolicyDetailsState) => state.apiError; + +/** Policy Agent Summary Stats */ +export const agentStatusSummary = (state: PolicyDetailsState) => state.agentStatusSummary; + +/** Status for an update to the policy */ +export const updateStatus = (state: PolicyDetailsState) => state.updateStatus; diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/types.ts b/x-pack/plugins/endpoint/public/applications/endpoint/types.ts index 7947a35068234..4215edb4d6810 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/types.ts +++ b/x-pack/plugins/endpoint/public/applications/endpoint/types.ts @@ -17,7 +17,8 @@ import { import { EndpointPluginStartDependencies } from '../../plugin'; import { AppAction } from './store/action'; import { CoreStart } from '../../../../../../src/core/public'; -import { Datasource } from '../../../../ingest_manager/common/types/models'; +import { Datasource, NewDatasource } from '../../../../ingest_manager/common/types/models'; +import { GetAgentStatusResponse } from '../../../../ingest_manager/common/types/rest_spec'; export { AppAction }; export type MiddlewareFactory = ( @@ -53,9 +54,27 @@ export interface ServerApiError { } /** - * An Endpoint Policy. + * New policy data. Used when updating the policy record via ingest APIs */ -export type PolicyData = Datasource; +export type NewPolicyData = NewDatasource & { + inputs: [ + { + type: 'endpoint'; + enabled: boolean; + streams: []; + config: { + policy: { + value: PolicyConfig; + }; + }; + } + ]; +}; + +/** + * Endpoint Policy data, which extends Ingest's `Datasource` type + */ +export type PolicyData = Datasource & NewPolicyData; /** * Policy list store state @@ -81,57 +100,100 @@ export interface PolicyListState { export interface PolicyDetailsState { /** A single policy item */ policyItem?: PolicyData; - /** data is being retrieved from server */ - policyConfig?: PolicyConfig; + /** API error if loading data failed */ + apiError?: ServerApiError; isLoading: boolean; /** current location of the application */ location?: Immutable; + /** A summary of stats for the agents associated with a given Fleet Agent Configuration */ + agentStatusSummary: GetAgentStatusResponse['results']; + /** Status of an update to the policy */ + updateStatus?: { + success: boolean; + error?: ServerApiError; + }; } /** - * Policy Details configuration + * Endpoint Policy configuration */ export interface PolicyConfig { - windows: WindowsPolicyConfig; - mac: MacPolicyConfig; - linux: LinuxPolicyConfig; + windows: { + events: { + process: boolean; + network: boolean; + }; + /** malware mode can be detect, prevent or prevent and notify user */ + malware: { + mode: string; + }; + logging: { + stdout: string; + file: string; + }; + advanced: PolicyConfigAdvancedOptions; + }; + mac: { + events: { + process: boolean; + }; + malware: { + mode: string; + }; + logging: { + stdout: string; + file: string; + }; + advanced: PolicyConfigAdvancedOptions; + }; + linux: { + events: { + process: boolean; + }; + logging: { + stdout: string; + file: string; + }; + advanced: PolicyConfigAdvancedOptions; + }; } -/** - * Windows-specific policy configuration - */ -interface WindowsPolicyConfig { - /** malware mode can be detect, prevent or prevent and notify user */ - malware: { - mode: string; - }; - eventing: { - process: boolean; - network: boolean; +interface PolicyConfigAdvancedOptions { + elasticsearch: { + indices: { + control: string; + event: string; + logging: string; + }; + kernel: { + connect: boolean; + process: boolean; + }; }; } /** - * Mac-specific policy configuration + * Windows-specific policy configuration that is supported via the UI */ -interface MacPolicyConfig { - /** malware mode can be detect, prevent or prevent and notify user */ - malware: { - mode: string; - }; - eventing: { - process: boolean; - network: boolean; - }; -} +type WindowsPolicyConfig = Pick; + /** - * Linux-specific policy configuration + * Mac-specific policy configuration that is supported via the UI */ -interface LinuxPolicyConfig { - eventing: { - process: boolean; - network: boolean; - }; +type MacPolicyConfig = Pick; + +/** + * Linux-specific policy configuration that is supported via the UI + */ +type LinuxPolicyConfig = Pick; + +/** + * The set of Policy configuration settings that are show/edited via the UI + */ +export interface UIPolicyConfig { + windows: WindowsPolicyConfig; + mac: MacPolicyConfig; + linux: LinuxPolicyConfig; } /** OS used in Policy */ diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/agents_summary.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/agents_summary.tsx new file mode 100644 index 0000000000000..d0751cf9fb886 --- /dev/null +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/agents_summary.tsx @@ -0,0 +1,88 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React, { memo, useMemo } from 'react'; +import { + EuiDescriptionList, + EuiFlexGroup, + EuiFlexItem, + EuiHealth, + EuiI18nNumber, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +export interface AgentsSummaryProps { + total: number; + online: number; + offline: number; + error: number; +} + +/** + * Display a summary of stats (counts) associated with a group of agents (ex. those associated with a Policy) + */ +export const AgentsSummary = memo(props => { + const stats = useMemo< + Array<{ key: keyof AgentsSummaryProps; title: string; health: string }> + >(() => { + return [ + { + key: 'total', + title: i18n.translate('xpack.endpoint.policyDetails.agentsSummary.totalTitle', { + defaultMessage: 'Hosts', + }), + health: '', + }, + { + key: 'online', + title: i18n.translate('xpack.endpoint.policyDetails.agentsSummary.onlineTitle', { + defaultMessage: 'Online', + }), + health: 'success', + }, + { + key: 'offline', + title: i18n.translate('xpack.endpoint.policyDetails.agentsSummary.offlineTitle', { + defaultMessage: 'Offline', + }), + health: 'warning', + }, + { + key: 'error', + title: i18n.translate('xpack.endpoint.policyDetails.agentsSummary.errorTitle', { + defaultMessage: 'Error', + }), + health: 'danger', + }, + ]; + }, []); + + return ( + + {stats.map(({ key, title, health }) => { + return ( + + + {health && } + + + ), + }, + ]} + /> + + ); + })} + + ); +}); diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_details.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_details.tsx index a64b3293ec6cd..f2c79155f3c23 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_details.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_details.tsx @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import React from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import { EuiFlexGroup, EuiFlexItem, @@ -12,32 +12,154 @@ import { EuiButtonEmpty, EuiText, EuiSpacer, + EuiOverlayMask, + EuiConfirmModal, + EuiCallOut, + EuiLoadingSpinner, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { i18n } from '@kbn/i18n'; +import { useDispatch } from 'react-redux'; +import { useHistory } from 'react-router-dom'; import { usePolicyDetailsSelector } from './policy_hooks'; -import { policyDetails } from '../../store/policy_details/selectors'; +import { + policyDetails, + agentStatusSummary, + updateStatus, + isLoading, + apiError, +} from '../../store/policy_details/selectors'; import { WindowsEventing } from './policy_forms/eventing/windows'; -import { PageView } from '../../components/page_view'; +import { PageView, PageViewHeaderTitle } from '../../components/page_view'; +import { AppAction } from '../../types'; +import { useKibana } from '../../../../../../../../src/plugins/kibana_react/public'; +import { AgentsSummary } from './agents_summary'; +import { VerticalDivider } from './vertical_divider'; export const PolicyDetails = React.memo(() => { + const dispatch = useDispatch<(action: AppAction) => void>(); + const { notifications, services } = useKibana(); + const history = useHistory(); + + // Store values const policyItem = usePolicyDetailsSelector(policyDetails); + const policyAgentStatusSummary = usePolicyDetailsSelector(agentStatusSummary); + const policyUpdateStatus = usePolicyDetailsSelector(updateStatus); + const isPolicyLoading = usePolicyDetailsSelector(isLoading); + const policyApiError = usePolicyDetailsSelector(apiError); + + // Local state + const [showConfirm, setShowConfirm] = useState(false); + const policyName = policyItem?.name ?? ''; - const headerLeftContent = - policyItem?.name ?? - i18n.translate('xpack.endpoint.policyDetails.notFound', { - defaultMessage: 'Policy Not Found', + // Handle showing udpate statuses + useEffect(() => { + if (policyUpdateStatus) { + if (policyUpdateStatus.success) { + notifications.toasts.success({ + toastLifeTimeMs: 10000, + title: i18n.translate('xpack.endpoint.policy.details.updateSuccessTitle', { + defaultMessage: 'Success!', + }), + body: ( + + ), + }); + } else { + notifications.toasts.danger({ + toastLifeTimeMs: 10000, + title: i18n.translate('xpack.endpoint.policy.details.updateErrorTitle', { + defaultMessage: 'Failed!', + }), + body: <>{policyUpdateStatus.error!.message}, + }); + } + } + }, [notifications.toasts, policyItem, policyName, policyUpdateStatus]); + + const handleBackToListOnClick = useCallback( + ev => { + ev.preventDefault(); + history.push(`/policy`); + }, + [history] + ); + + const handleSaveOnClick = useCallback(() => { + setShowConfirm(true); + }, []); + + const handleSaveConfirmation = useCallback(() => { + dispatch({ + type: 'userClickedPolicyDetailsSaveButton', }); + setShowConfirm(false); + }, [dispatch]); + + const handleSaveCancel = useCallback(() => { + setShowConfirm(false); + }, []); + + // Before proceeding - check if we have a policy data. + // If not, and we are still loading, show spinner. + // Else, if we have an error, then show error on the page. + if (!policyItem) { + return ( + + {isPolicyLoading ? ( + + ) : policyApiError ? ( + + {policyApiError?.message} + + ) : null} + + ); + } + + const headerLeftContent = ( +
+ {/* eslint-disable-next-line @elastic/eui/href-or-on-click */} + + + + {policyItem.name} +
+ ); const headerRightContent = ( - + + + + + + + - + @@ -45,18 +167,85 @@ export const PolicyDetails = React.memo(() => { ); return ( - - -

- -

-
- - -
+ <> + {showConfirm && ( + + )} + + +

+ +

+
+ + +
+ + ); +}); + +const ConfirmUpdate = React.memo<{ + hostCount: number; + onConfirm: () => void; + onCancel: () => void; +}>(({ hostCount, onCancel, onConfirm }) => { + return ( + + + {hostCount > 0 && ( + <> + + + + + + )} +

+ +

+
+
); }); diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_forms/eventing/checkbox.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_forms/eventing/checkbox.tsx index add137ea57a5e..8b7fb89ed1646 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_forms/eventing/checkbox.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_forms/eventing/checkbox.tsx @@ -27,7 +27,11 @@ export const EventingCheckbox: React.FC<{ (event: React.ChangeEvent) => { if (policyDetailsConfig) { const newPayload = clone(policyDetailsConfig); - newPayload[os].eventing[protectionField] = event.target.checked; + if (os === OS.linux || os === OS.mac) { + newPayload[os].events.process = event.target.checked; + } else { + newPayload[os].events[protectionField] = event.target.checked; + } dispatch({ type: 'userChangedPolicyConfig', diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_list.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_list.tsx index 7af302de8576e..5ee1539ce9788 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_list.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/policy/policy_list.tsx @@ -151,6 +151,7 @@ export const PolicyList = React.memo(() => { return ( ` + width: 0; + height: 100%; + border-left: ${props => { + return props.theme.eui.euiBorderThin; + }}; + margin-left: ${props => props.theme.eui.paddingSizes[props?.spacing ?? 'none'] || 0}; + margin-right: ${props => props.theme.eui.paddingSizes[props?.spacing ?? 'none'] || 0}; +`; diff --git a/x-pack/plugins/endpoint/scripts/README.md b/x-pack/plugins/endpoint/scripts/README.md index 34d0a1ecd8ede..f0c8c5a9b0b66 100644 --- a/x-pack/plugins/endpoint/scripts/README.md +++ b/x-pack/plugins/endpoint/scripts/README.md @@ -3,7 +3,11 @@ The default behavior is to create 1 endpoint with 1 alert and a moderate number A seed value can be provided as a string for the random number generator for repeatable behavior, useful for demos etc. Use the `-d` option if you want to delete and remake the indices, otherwise it will add documents to existing indices. -Example command sequence to get ES and kibana running with sample data: +The sample data generator script depends on ts-node, install with npm: + +```npm install -g ts-node``` + +Example command sequence to get ES and kibana running with sample data after installing ts-node: ```yarn es snapshot``` -> starts ES diff --git a/x-pack/plugins/infra/public/components/alerting/metrics/alert_dropdown.tsx b/x-pack/plugins/infra/public/components/alerting/metrics/alert_dropdown.tsx index 0a464d91fbe06..bb664f4067662 100644 --- a/x-pack/plugins/infra/public/components/alerting/metrics/alert_dropdown.tsx +++ b/x-pack/plugins/infra/public/components/alerting/metrics/alert_dropdown.tsx @@ -38,7 +38,7 @@ export const AlertDropdown = () => { 'kibana#/management/kibana/triggersActions/alerts' )} > - + , ]; }, [kibana.services]); diff --git a/x-pack/plugins/infra/public/components/alerting/metrics/metric_threshold_alert_type.ts b/x-pack/plugins/infra/public/components/alerting/metrics/metric_threshold_alert_type.ts index d3b5aaa7c8796..60c4e013d79ac 100644 --- a/x-pack/plugins/infra/public/components/alerting/metrics/metric_threshold_alert_type.ts +++ b/x-pack/plugins/infra/public/components/alerting/metrics/metric_threshold_alert_type.ts @@ -15,10 +15,20 @@ export function getAlertType(): AlertTypeModel { return { id: METRIC_THRESHOLD_ALERT_TYPE_ID, name: i18n.translate('xpack.infra.metrics.alertFlyout.alertName', { - defaultMessage: 'Alert Trigger', + defaultMessage: 'Metric Threshold', }), iconClass: 'bell', alertParamsExpression: Expressions, validate: validateMetricThreshold, + defaultActionMessage: i18n.translate( + 'xpack.infra.metrics.alerting.threshold.defaultActionMessage', + { + defaultMessage: `\\{\\{alertName\\}\\} - \\{\\{context.group\\}\\} + +\\{\\{context.metricOf.condition0\\}\\} has crossed a threshold of \\{\\{context.thresholdOf.condition0\\}\\} +Current value is \\{\\{context.valueOf.condition0\\}\\} +`, + } + ), }; } diff --git a/x-pack/plugins/infra/server/features.ts b/x-pack/plugins/infra/server/features.ts index 5301e1e9cbd0b..fa228e03194a9 100644 --- a/x-pack/plugins/infra/server/features.ts +++ b/x-pack/plugins/infra/server/features.ts @@ -20,22 +20,40 @@ export const METRICS_FEATURE = { all: { app: ['infra', 'kibana'], catalogue: ['infraops'], - api: ['infra'], + api: ['infra', 'actions-read', 'actions-all', 'alerting-read', 'alerting-all'], savedObject: { - all: ['infrastructure-ui-source'], + all: ['infrastructure-ui-source', 'alert', 'action', 'action_task_params'], read: ['index-pattern'], }, - ui: ['show', 'configureSource', 'save'], + ui: [ + 'show', + 'configureSource', + 'save', + 'alerting:show', + 'actions:show', + 'alerting:save', + 'actions:save', + 'alerting:delete', + 'actions:delete', + ], }, read: { app: ['infra', 'kibana'], catalogue: ['infraops'], - api: ['infra'], + api: ['infra', 'actions-read', 'actions-all', 'alerting-read', 'alerting-all'], savedObject: { - all: [], + all: ['alert', 'action', 'action_task_params'], read: ['infrastructure-ui-source', 'index-pattern'], }, - ui: ['show'], + ui: [ + 'show', + 'alerting:show', + 'actions:show', + 'alerting:save', + 'actions:save', + 'alerting:delete', + 'actions:delete', + ], }, }, }; diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts index feaa404ae960a..09f1702349542 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts @@ -126,6 +126,14 @@ describe('The metric threshold alert type', () => { expect(alertInstances.get(instanceID).mostRecentAction).toBe(undefined); expect(alertInstances.get(instanceID).state.alertState).toBe(AlertStates.OK); }); + test('reports expected values to the action context', async () => { + await execute(Comparator.GT, [0.75]); + const mostRecentAction = alertInstances.get(instanceID).mostRecentAction; + expect(mostRecentAction.action.group).toBe('*'); + expect(mostRecentAction.action.valueOf.condition0).toBe(1); + expect(mostRecentAction.action.thresholdOf.condition0).toStrictEqual([0.75]); + expect(mostRecentAction.action.metricOf.condition0).toBe('test.metric.1'); + }); }); describe('querying with a groupBy parameter', () => { @@ -166,6 +174,11 @@ describe('The metric threshold alert type', () => { expect(alertInstances.get(instanceIdB).mostRecentAction).toBe(undefined); expect(alertInstances.get(instanceIdB).state.alertState).toBe(AlertStates.OK); }); + test('reports group values to the action context', async () => { + await execute(Comparator.GT, [0.75]); + expect(alertInstances.get(instanceIdA).mostRecentAction.action.group).toBe('a'); + expect(alertInstances.get(instanceIdB).mostRecentAction.action.group).toBe('b'); + }); }); describe('querying with multiple criteria', () => { @@ -215,6 +228,17 @@ describe('The metric threshold alert type', () => { expect(alertInstances.get(instanceIdB).mostRecentAction).toBe(undefined); expect(alertInstances.get(instanceIdB).state.alertState).toBe(AlertStates.OK); }); + test('sends all criteria to the action context', async () => { + const instanceID = 'test-*'; + await execute(Comparator.GT_OR_EQ, [1.0], [3.0]); + const mostRecentAction = alertInstances.get(instanceID).mostRecentAction; + expect(mostRecentAction.action.valueOf.condition0).toBe(1); + expect(mostRecentAction.action.valueOf.condition1).toBe(3.5); + expect(mostRecentAction.action.thresholdOf.condition0).toStrictEqual([1.0]); + expect(mostRecentAction.action.thresholdOf.condition1).toStrictEqual([3.0]); + expect(mostRecentAction.action.metricOf.condition0).toBe('test.metric.1'); + expect(mostRecentAction.action.metricOf.condition1).toBe('test.metric.2'); + }); }); describe('querying with the count aggregator', () => { const instanceID = 'test-*'; diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts index bfe04b82b95fc..60bba61b75ef1 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts @@ -223,6 +223,17 @@ const comparatorMap = { [Comparator.LT_OR_EQ]: (a: number, [b]: number[]) => a <= b, }; +const mapToConditionsLookup = ( + list: any[], + mapFn: (value: any, index: number, array: any[]) => unknown +) => + list + .map(mapFn) + .reduce( + (result: Record, value, i) => ({ ...result, [`condition${i}`]: value }), + {} + ); + export const createMetricThresholdExecutor = (alertUUID: string) => async function({ services, params }: AlertExecutorOptions) { const { criteria, groupBy, filterQuery } = params as { @@ -261,7 +272,9 @@ export const createMetricThresholdExecutor = (alertUUID: string) => if (shouldAlertFire) { alertInstance.scheduleActions(FIRED_ACTIONS.id, { group, - value: alertResults.map(result => result[group].currentValue), + valueOf: mapToConditionsLookup(alertResults, result => result[group].currentValue), + thresholdOf: mapToConditionsLookup(criteria, criterion => criterion.threshold), + metricOf: mapToConditionsLookup(criteria, criterion => criterion.metric), }); } // Future use: ability to fetch display current alert state diff --git a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts index ed3a9b2f4fe36..57f9124db923c 100644 --- a/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts +++ b/x-pack/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_alert_type.ts @@ -3,6 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ +import { i18n } from '@kbn/i18n'; import uuid from 'uuid'; import { schema } from '@kbn/config-schema'; import { PluginSetupContract } from '../../../../../alerting/server'; @@ -49,6 +50,37 @@ export async function registerMetricThresholdAlertType(alertingPlugin: PluginSet metric: schema.never(), }); + const groupActionVariableDescription = i18n.translate( + 'xpack.infra.metrics.alerting.threshold.alerting.groupActionVariableDescription', + { + defaultMessage: 'Name of the group reporting data', + } + ); + + const valueOfActionVariableDescription = i18n.translate( + 'xpack.infra.metrics.alerting.threshold.alerting.valueOfActionVariableDescription', + { + defaultMessage: + 'Record of the current value of the watched metric; grouped by condition, i.e valueOf.condition0, valueOf.condition1, etc.', + } + ); + + const thresholdOfActionVariableDescription = i18n.translate( + 'xpack.infra.metrics.alerting.threshold.alerting.thresholdOfActionVariableDescription', + { + defaultMessage: + 'Record of the alerting threshold; grouped by condition, i.e thresholdOf.condition0, thresholdOf.condition1, etc.', + } + ); + + const metricOfActionVariableDescription = i18n.translate( + 'xpack.infra.metrics.alerting.threshold.alerting.metricOfActionVariableDescription', + { + defaultMessage: + 'Record of the watched metric; grouped by condition, i.e metricOf.condition0, metricOf.condition1, etc.', + } + ); + alertingPlugin.registerType({ id: METRIC_THRESHOLD_ALERT_TYPE_ID, name: 'Metric Alert - Threshold', @@ -62,5 +94,13 @@ export async function registerMetricThresholdAlertType(alertingPlugin: PluginSet defaultActionGroupId: FIRED_ACTIONS.id, actionGroups: [FIRED_ACTIONS], executor: createMetricThresholdExecutor(alertUUID), + actionVariables: { + context: [ + { name: 'group', description: groupActionVariableDescription }, + { name: 'valueOf', description: valueOfActionVariableDescription }, + { name: 'thresholdOf', description: thresholdOfActionVariableDescription }, + { name: 'metricOf', description: metricOfActionVariableDescription }, + ], + }, }); } diff --git a/x-pack/plugins/ingest_manager/README.md b/x-pack/plugins/ingest_manager/README.md index 241138880780f..07acdf8affd49 100644 --- a/x-pack/plugins/ingest_manager/README.md +++ b/x-pack/plugins/ingest_manager/README.md @@ -15,13 +15,17 @@ See the Kibana docs for [how to set up your dev environment](https://github.com/ One common development workflow is: + - Bootstrap Kibana + ``` + yarn kbn bootstrap + ``` - Start Elasticsearch in one shell ``` yarn es snapshot -E xpack.security.authc.api_key.enabled=true ``` - Start Kibana in another shell ``` - yarn start --xpack.ingestManager.enabled=true --xpack.ingestManager.epm.enabled=true --xpack.ingestManager.fleet.enabled=true + yarn start --xpack.ingestManager.enabled=true --xpack.ingestManager.epm.enabled=true --xpack.ingestManager.fleet.enabled=true --no-base-path --xpack.endpoint.enabled=true ``` This plugin follows the `common`, `server`, `public` structure from the [Architecture Style Guide diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/constants/index.ts b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/constants/index.ts index b313dbf629f32..282ea8dbee3a2 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/constants/index.ts +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/constants/index.ts @@ -15,5 +15,6 @@ export const AGENT_CONFIG_DETAILS_PATH = `${AGENT_CONFIG_PATH}/`; export const FLEET_PATH = '/fleet'; export const FLEET_AGENTS_PATH = `${FLEET_PATH}/agents`; export const FLEET_AGENT_DETAIL_PATH = `${FLEET_AGENTS_PATH}/`; +export const FLEET_ENROLLMENT_TOKENS_PATH = `/fleet/enrollment-tokens`; export const INDEX_NAME = '.kibana'; diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/hooks/use_request/enrollment_api_keys.ts b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/hooks/use_request/enrollment_api_keys.ts index 2640f36423a0c..e4abb4ccd22cb 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/hooks/use_request/enrollment_api_keys.ts +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/hooks/use_request/enrollment_api_keys.ts @@ -4,9 +4,13 @@ * you may not use this file except in compliance with the Elastic License. */ -import { useRequest, UseRequestConfig } from './use_request'; +import { useRequest, UseRequestConfig, sendRequest } from './use_request'; import { enrollmentAPIKeyRouteService } from '../../services'; -import { GetOneEnrollmentAPIKeyResponse, GetEnrollmentAPIKeysResponse } from '../../types'; +import { + GetOneEnrollmentAPIKeyResponse, + GetEnrollmentAPIKeysResponse, + GetEnrollmentAPIKeysRequest, +} from '../../types'; type RequestOptions = Pick, 'pollIntervalMs'>; @@ -18,10 +22,30 @@ export function useGetOneEnrollmentAPIKey(keyId: string, options?: RequestOption }); } -export function useGetEnrollmentAPIKeys(options?: RequestOptions) { +export function sendGetOneEnrollmentAPIKey(keyId: string, options?: RequestOptions) { + return sendRequest({ + method: 'get', + path: enrollmentAPIKeyRouteService.getInfoPath(keyId), + ...options, + }); +} + +export function sendDeleteOneEnrollmentAPIKey(keyId: string, options?: RequestOptions) { + return sendRequest({ + method: 'delete', + path: enrollmentAPIKeyRouteService.getDeletePath(keyId), + ...options, + }); +} + +export function useGetEnrollmentAPIKeys( + query: GetEnrollmentAPIKeysRequest['query'], + options?: RequestOptions +) { return useRequest({ method: 'get', path: enrollmentAPIKeyRouteService.getListPath(), + query, ...options, }); } diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/components/yaml/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/components/yaml/index.tsx index 79f85b0eecdf6..c1cdde730837f 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/components/yaml/index.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/agent_config/details_page/components/yaml/index.tsx @@ -31,7 +31,10 @@ export const ConfigYamlView = memo<{ config: AgentConfig }>(({ config }) => { const core = useCore(); const fullConfigRequest = useGetOneAgentConfigFull(config.id); - const apiKeysRequest = useGetEnrollmentAPIKeys(); + const apiKeysRequest = useGetEnrollmentAPIKeys({ + page: 1, + perPage: 1000, + }); const apiKeyRequest = useGetOneEnrollmentAPIKey(apiKeysRequest.data?.list?.[0]?.id as string); if (fullConfigRequest.isLoading && !fullConfigRequest.data) { diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/components/enrollment_api_keys/hooks.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/components/enrollment_api_keys/hooks.tsx index 957e1201fd43b..41c6b5912cd31 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/components/enrollment_api_keys/hooks.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/components/enrollment_api_keys/hooks.tsx @@ -12,7 +12,10 @@ import { } from '../../../../../hooks'; export function useEnrollmentApiKeys(pagination: Pagination) { - const request = useGetEnrollmentAPIKeys(); + const request = useGetEnrollmentAPIKeys({ + page: pagination.currentPage, + perPage: pagination.pageSize, + }); return { data: request.data, diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/index.tsx index 14a579eb72598..22314b6231d1e 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/index.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/agent_list_page/index.tsx @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ import React, { useState, useCallback } from 'react'; -import styled, { CSSProperties } from 'styled-components'; import { EuiBasicTable, EuiButton, @@ -17,12 +16,7 @@ import { EuiLink, EuiPopover, EuiSpacer, - EuiSwitch, EuiText, - EuiTitle, - EuiStat, - EuiI18nNumber, - EuiHealth, EuiButtonIcon, EuiContextMenuPanel, EuiContextMenuItem, @@ -30,8 +24,8 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage, FormattedRelative } from '@kbn/i18n/react'; +import { CSSProperties } from 'styled-components'; import { AgentEnrollmentFlyout } from './components'; -import { WithHeaderLayout } from '../../../layouts'; import { Agent } from '../../../types'; import { usePagination, @@ -45,17 +39,9 @@ import { ConnectedLink } from '../components'; import { SearchBar } from '../../../components/search_bar'; import { AgentHealth } from '../components/agent_health'; import { AgentUnenrollProvider } from '../components/agent_unenroll_provider'; -import { DonutChart } from './components/donut_chart'; -import { useGetAgentStatus } from '../../agent_config/details_page/hooks'; import { AgentStatusKueryHelper } from '../../../services'; import { FLEET_AGENT_DETAIL_PATH, AGENT_CONFIG_DETAILS_PATH } from '../../../constants'; -const Divider = styled.div` - width: 0; - height: 100%; - border-left: ${props => props.theme.eui.euiBorderThin}; - height: 45px; -`; const NO_WRAP_TRUNCATE_STYLE: CSSProperties = Object.freeze({ overflow: 'hidden', textOverflow: 'ellipsis', @@ -204,11 +190,6 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { .join(' or '); } - const agentStatusRequest = useGetAgentStatus(undefined, { - pollIntervalMs: REFRESH_INTERVAL_MS, - }); - const agentStatus = agentStatusRequest.data?.results; - const agentsRequest = useGetAgents( { page: pagination.currentPage, @@ -399,154 +380,15 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { } /> ); - const headerRightColumn = ( - - - } - description={i18n.translate('xpack.ingestManager.agentListStatus.totalLabel', { - defaultMessage: 'Agents', - })} - /> - - - - - - - {' '} - - - } - description={i18n.translate('xpack.ingestManager.agentListStatus.onlineLabel', { - defaultMessage: 'Online', - })} - /> - - - } - description={i18n.translate('xpack.ingestManager.agentListStatus.offlineLabel', { - defaultMessage: 'Offline', - })} - /> - - - } - description={i18n.translate('xpack.ingestManager.agentListStatus.errorLabel', { - defaultMessage: 'Error', - })} - /> - - {hasWriteCapabilites && ( - <> - - - - - setIsEnrollmentFlyoutOpen(true)}> - - - - - )} - - ); - const headerLeftColumn = ( - - - -

- -

-
-
- - -

- -

-
-
-
- ); return ( - + <> {isEnrollmentFlyoutOpen ? ( setIsEnrollmentFlyoutOpen(false)} /> ) : null} - -

- -

-
- - - - - - - - - - - setShowInactive(!showInactive)} - /> - - - - {selectedAgents.length ? ( @@ -591,7 +433,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { ) : null} - + { @@ -604,7 +446,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { fieldPrefix="agents" /> - + = () => { ))}
+ setShowInactive(!showInactive)} + > + + @@ -747,6 +598,6 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { setPagination(newPagination); }} /> - + ); }; diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/components/list_layout.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/components/list_layout.tsx new file mode 100644 index 0000000000000..61306e823f2a8 --- /dev/null +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/components/list_layout.tsx @@ -0,0 +1,191 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n/react'; +import styled from 'styled-components'; +import { + EuiHealth, + EuiText, + EuiFlexGroup, + EuiFlexItem, + EuiStat, + EuiI18nNumber, + EuiButton, +} from '@elastic/eui'; +import { Props as EuiTabProps } from '@elastic/eui/src/components/tabs/tab'; +import { useRouteMatch } from 'react-router-dom'; +import { DonutChart } from '../agent_list_page/components/donut_chart'; +import { useGetAgentStatus } from '../../agent_config/details_page/hooks'; +import { useCapabilities, useLink, useGetAgentConfigs } from '../../../hooks'; +import { WithHeaderLayout } from '../../../layouts'; +import { FLEET_ENROLLMENT_TOKENS_PATH, FLEET_AGENTS_PATH } from '../../../constants'; +import { AgentEnrollmentFlyout } from '../agent_list_page/components'; + +const REFRESH_INTERVAL_MS = 5000; + +const Divider = styled.div` + width: 0; + height: 100%; + border-left: ${props => props.theme.eui.euiBorderThin}; + height: 45px; +`; + +export const ListLayout: React.FunctionComponent<{}> = ({ children }) => { + const hasWriteCapabilites = useCapabilities().write; + const agentStatusRequest = useGetAgentStatus(undefined, { + pollIntervalMs: REFRESH_INTERVAL_MS, + }); + const agentStatus = agentStatusRequest.data?.results; + + // Agent enrollment flyout state + const [isEnrollmentFlyoutOpen, setIsEnrollmentFlyoutOpen] = React.useState(false); + + const headerRightColumn = ( + + + } + description={i18n.translate('xpack.ingestManager.agentListStatus.totalLabel', { + defaultMessage: 'Agents', + })} + /> + + + + + + + + + } + description={i18n.translate('xpack.ingestManager.agentListStatus.onlineLabel', { + defaultMessage: 'Online', + })} + /> + + + } + description={i18n.translate('xpack.ingestManager.agentListStatus.offlineLabel', { + defaultMessage: 'Offline', + })} + /> + + + } + description={i18n.translate('xpack.ingestManager.agentListStatus.errorLabel', { + defaultMessage: 'Error', + })} + /> + + {hasWriteCapabilites && ( + <> + + + + + setIsEnrollmentFlyoutOpen(true)}> + + + + + )} + + ); + const headerLeftColumn = ( + + + +

+ +

+
+
+ + +

+ +

+
+
+
+ ); + + const agentConfigsRequest = useGetAgentConfigs({ + page: 1, + perPage: 1000, + }); + + const agentConfigs = agentConfigsRequest.data ? agentConfigsRequest.data.items : []; + + const routeMatch = useRouteMatch(); + + return ( + + ), + isSelected: routeMatch.path === FLEET_AGENTS_PATH, + href: useLink(FLEET_AGENTS_PATH), + }, + { + name: ( + + ), + isSelected: routeMatch.path === FLEET_ENROLLMENT_TOKENS_PATH, + href: useLink(FLEET_ENROLLMENT_TOKENS_PATH), + }, + ] as unknown) as EuiTabProps[] + } + > + {isEnrollmentFlyoutOpen ? ( + setIsEnrollmentFlyoutOpen(false)} + /> + ) : null} + {children} + + ); +}; diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/enrollment_token_list_page/components/confirm_delete_modal.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/enrollment_token_list_page/components/confirm_delete_modal.tsx new file mode 100644 index 0000000000000..d2092f070a22a --- /dev/null +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/enrollment_token_list_page/components/confirm_delete_modal.tsx @@ -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; + * you may not use this file except in compliance with the Elastic License. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { EuiConfirmModal, EuiCallOut, EuiOverlayMask } from '@elastic/eui'; +import { EnrollmentAPIKey } from '../../../../types'; + +interface Props { + onCancel: () => void; + onConfirm: () => void; + enrollmentKey: EnrollmentAPIKey; +} + +export const ConfirmEnrollmentTokenDelete = (props: Props) => { + const { onCancel, onConfirm, enrollmentKey } = props; + return ( + + + + + + ); +}; diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/enrollment_token_list_page/components/new_enrollment_key_flyout.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/enrollment_token_list_page/components/new_enrollment_key_flyout.tsx new file mode 100644 index 0000000000000..b9c07c800635d --- /dev/null +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/enrollment_token_list_page/components/new_enrollment_key_flyout.tsx @@ -0,0 +1,153 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ +import React, { useState } from 'react'; +import { i18n } from '@kbn/i18n'; +import { + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutHeader, + EuiTitle, + EuiFlexGroup, + EuiFlexItem, + EuiButtonEmpty, + EuiButton, + EuiFlyoutFooter, + EuiForm, + EuiFormRow, + EuiFieldText, + EuiSelect, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; +import { AgentConfig } from '../../../../types'; +import { useInput, useCore, sendRequest } from '../../../../hooks'; +import { enrollmentAPIKeyRouteService } from '../../../../services'; + +function useCreateApiKeyForm( + configDefaultValue: string | undefined, + onSuccess: (keyId: string) => void +) { + const { notifications } = useCore(); + const [isLoading, setIsLoading] = useState(false); + const apiKeyNameInput = useInput(''); + const configIdInput = useInput(configDefaultValue); + + const onSubmit = async (event: React.FormEvent) => { + event.preventDefault(); + setIsLoading(true); + try { + const res = await sendRequest({ + method: 'post', + path: enrollmentAPIKeyRouteService.getCreatePath(), + body: JSON.stringify({ + name: apiKeyNameInput.value, + config_id: configIdInput.value, + }), + }); + configIdInput.clear(); + apiKeyNameInput.clear(); + setIsLoading(false); + onSuccess(res.data.item.id); + notifications.toasts.addSuccess( + i18n.translate('xpack.ingestManager.newEnrollmentKey.keyCreatedToasts', { + defaultMessage: 'Enrollment token created.', + }) + ); + } catch (err) { + notifications.toasts.addError(err as Error, { + title: 'Error', + }); + setIsLoading(false); + } + }; + + return { + isLoading, + onSubmit, + configIdInput, + apiKeyNameInput, + }; +} + +interface Props { + onClose: () => void; + agentConfigs: AgentConfig[]; +} + +export const NewEnrollmentTokenFlyout: React.FunctionComponent = ({ + onClose, + agentConfigs = [], +}) => { + const configDefaultValue = agentConfigs.find(config => config.is_default)?.id; + const form = useCreateApiKeyForm(configDefaultValue, () => { + onClose(); + }); + + const body = ( + +
+ + + + + + ({ value: config.id, text: config.name }))} + /> + + + + +
+
+ ); + + return ( + + + +

+ +

+
+
+ {body} + + + + + + + + + +
+ ); +}; diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/enrollment_token_list_page/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/enrollment_token_list_page/index.tsx new file mode 100644 index 0000000000000..e4f7202aeee10 --- /dev/null +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/enrollment_token_list_page/index.tsx @@ -0,0 +1,304 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { i18n } from '@kbn/i18n'; +import React, { useState } from 'react'; +import { CSSProperties } from 'styled-components'; +import { + EuiSpacer, + EuiBasicTable, + EuiFlexGroup, + EuiFlexItem, + EuiButton, + EuiButtonEmpty, + EuiIcon, + EuiText, +} from '@elastic/eui'; +import { FormattedMessage, FormattedDate } from '@kbn/i18n/react'; +import { + usePagination, + useGetEnrollmentAPIKeys, + useGetAgentConfigs, + sendGetOneEnrollmentAPIKey, + useCore, + sendDeleteOneEnrollmentAPIKey, +} from '../../../hooks'; +import { EnrollmentAPIKey } from '../../../types'; +import { SearchBar } from '../../../components/search_bar'; +import { NewEnrollmentTokenFlyout } from './components/new_enrollment_key_flyout'; +import {} from '@elastic/eui'; +import { ConfirmEnrollmentTokenDelete } from './components/confirm_delete_modal'; + +const NO_WRAP_TRUNCATE_STYLE: CSSProperties = Object.freeze({ + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', +}); + +const ApiKeyField: React.FunctionComponent<{ apiKeyId: string }> = ({ apiKeyId }) => { + const { notifications } = useCore(); + const [state, setState] = useState<'VISIBLE' | 'HIDDEN' | 'LOADING'>('HIDDEN'); + const [key, setKey] = useState(); + + const toggleKey = async () => { + if (state === 'VISIBLE') { + setState('HIDDEN'); + } else if (state === 'HIDDEN') { + try { + setState('LOADING'); + const res = await sendGetOneEnrollmentAPIKey(apiKeyId); + if (res.error) { + throw res.error; + } + setKey(res.data?.item.api_key); + setState('VISIBLE'); + } catch (err) { + notifications.toasts.addError(err as Error, { + title: 'Error', + }); + setState('HIDDEN'); + } + } + }; + + return ( + + + {state === 'VISIBLE' ? ( + + {key} + + ) : ( + •••••••••••••••••••••••••• + )} + + + + + + ); +}; + +const DeleteButton: React.FunctionComponent<{ apiKey: EnrollmentAPIKey; refresh: () => void }> = ({ + apiKey, + refresh, +}) => { + const { notifications } = useCore(); + const [state, setState] = useState<'CONFIRM_VISIBLE' | 'CONFIRM_HIDDEN'>('CONFIRM_HIDDEN'); + + const onCancel = () => setState('CONFIRM_HIDDEN'); + const onConfirm = async () => { + try { + const res = await sendDeleteOneEnrollmentAPIKey(apiKey.id); + if (res.error) { + throw res.error; + } + } catch (err) { + notifications.toasts.addError(err as Error, { + title: 'Error', + }); + } + setState('CONFIRM_HIDDEN'); + refresh(); + }; + return ( + <> + {state === 'CONFIRM_VISIBLE' && ( + + )} + setState('CONFIRM_VISIBLE')} iconType="trash" color="danger" /> + + ); +}; + +export const EnrollmentTokenListPage: React.FunctionComponent<{}> = () => { + const [flyoutOpen, setFlyoutOpen] = useState(false); + const [search, setSearch] = useState(''); + const { pagination, setPagination, pageSizeOptions } = usePagination(); + + const enrollmentAPIKeysRequest = useGetEnrollmentAPIKeys({ + page: pagination.currentPage, + perPage: pagination.pageSize, + kuery: search.trim() !== '' ? search : undefined, + }); + const agentConfigsRequest = useGetAgentConfigs({ + page: 1, + perPage: 1000, + }); + + const agentConfigs = agentConfigsRequest.data ? agentConfigsRequest.data.items : []; + + const total = enrollmentAPIKeysRequest?.data?.total ?? 0; + const items = enrollmentAPIKeysRequest?.data?.list ?? []; + + const columns = [ + { + field: 'name', + name: i18n.translate('xpack.ingestManager.enrollmentTokensList.nameTitle', { + defaultMessage: 'Name', + }), + truncateText: true, + width: '300px', + textOnly: true, + render: (name: string) => { + return ( + + {name} + + ); + }, + }, + { + field: 'id', + name: i18n.translate('xpack.ingestManager.enrollmentTokensList.secretTitle', { + defaultMessage: 'Secret', + }), + width: '245px', + render: (apiKeyId: string) => { + return ; + }, + }, + { + field: 'config_id', + name: i18n.translate('xpack.ingestManager.enrollmentTokensList.configTitle', { + defaultMessage: 'Config', + }), + render: (configId: string) => { + const config = agentConfigs.find(c => c.id === configId); + return <>{config ? config.name : configId}; + }, + }, + { + field: 'created_at', + name: i18n.translate('xpack.ingestManager.enrollmentTokensList.createdAtTitle', { + defaultMessage: 'Created on', + }), + width: '200px', + render: (createdAt: string) => { + return createdAt ? ( + + ) : null; + }, + }, + { + field: 'active', + name: i18n.translate('xpack.ingestManager.enrollmentTokensList.activeTitle', { + defaultMessage: 'Active', + }), + width: '80px', + render: (active: boolean) => { + return ( + + + + ); + }, + }, + { + field: 'actions', + name: i18n.translate('xpack.ingestManager.enrollmentTokensList.actionsTitle', { + defaultMessage: 'Actions', + }), + width: '100px', + render: (_: any, apiKey: EnrollmentAPIKey) => { + return ( + apiKey.active && ( + enrollmentAPIKeysRequest.sendRequest()} /> + ) + ); + }, + }, + ]; + + return ( + <> + {flyoutOpen && ( + { + setFlyoutOpen(false); + enrollmentAPIKeysRequest.sendRequest(); + }} + /> + )} + + + + + + + { + setPagination({ + ...pagination, + currentPage: 1, + }); + setSearch(newSearch); + }} + fieldPrefix="enrollment_api_keys" + /> + + + setFlyoutOpen(true)}> + + + + + + + loading={enrollmentAPIKeysRequest.isLoading && enrollmentAPIKeysRequest.isInitialRequest} + hasActions={true} + noItemsMessage={ + enrollmentAPIKeysRequest.isLoading && enrollmentAPIKeysRequest.isInitialRequest ? ( + + ) : ( + + ) + } + items={total ? items : []} + itemId="id" + columns={columns} + pagination={{ + pageIndex: pagination.currentPage - 1, + pageSize: pagination.pageSize, + totalItemCount: total, + pageSizeOptions, + }} + onChange={({ page }: { page: { index: number; size: number } }) => { + const newPagination = { + ...pagination, + currentPage: page.index + 1, + pageSize: page.size, + }; + setPagination(newPagination); + }} + /> + + ); +}; diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/index.tsx b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/index.tsx index edc2b5b7eb87f..fac81ecc19cd1 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/index.tsx +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/sections/fleet/index.tsx @@ -12,6 +12,8 @@ import { SetupPage } from './setup_page'; import { AgentDetailsPage } from './agent_details_page'; import { NoAccessPage } from './error_pages/no_access'; import { fleetSetupRouteService } from '../../services'; +import { EnrollmentTokenListPage } from './enrollment_token_list_page'; +import { ListLayout } from './components/list_layout'; export const FleetApp: React.FunctionComponent = () => { const core = useCore(); @@ -48,7 +50,14 @@ export const FleetApp: React.FunctionComponent = () => { - + + + + + + + + diff --git a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/types/index.ts b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/types/index.ts index a59fb06145a3a..333a9b049fa85 100644 --- a/x-pack/plugins/ingest_manager/public/applications/ingest_manager/types/index.ts +++ b/x-pack/plugins/ingest_manager/public/applications/ingest_manager/types/index.ts @@ -40,6 +40,7 @@ export { GetAgentStatusResponse, // API schemas - Enrollment API Keys GetEnrollmentAPIKeysResponse, + GetEnrollmentAPIKeysRequest, GetOneEnrollmentAPIKeyResponse, // EPM types AssetReference, diff --git a/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts b/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts index 5960441635524..a6a2db8be4e9d 100644 --- a/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts +++ b/x-pack/plugins/ingest_manager/server/services/api_keys/enrollment_api_key.ts @@ -26,6 +26,8 @@ export async function listEnrollmentApiKeys( type: ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE, page, perPage, + sortField: 'created_at', + sortOrder: 'DESC', filter: kuery && kuery !== '' ? kuery.replace(/enrollment_api_keys\./g, 'enrollment_api_keys.attributes.') @@ -48,12 +50,19 @@ export async function getEnrollmentAPIKey(soClient: SavedObjectsClientContract, ); } +/** + * Invalidate an api key and mark it as inactive + * @param soClient + * @param id + */ export async function deleteEnrollmentApiKey(soClient: SavedObjectsClientContract, id: string) { const enrollmentApiKey = await getEnrollmentAPIKey(soClient, id); await invalidateAPIKey(soClient, enrollmentApiKey.api_key_id); - await soClient.delete(ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE, id); + await soClient.update(ENROLLMENT_API_KEYS_SAVED_OBJECT_TYPE, id, { + active: false, + }); } export async function deleteEnrollmentApiKeyForConfigId( @@ -90,9 +99,7 @@ export async function generateEnrollmentAPIKey( const id = uuid.v4(); const { name: providedKeyName } = data; const configId = data.configId ?? (await agentConfigService.getDefaultAgentConfigId(soClient)); - const name = providedKeyName ? `${providedKeyName} (${id})` : id; - const key = await createAPIKey(soClient, name, { // Useless role to avoid to have the privilege of the user that created the key 'fleet-apikey-enroll': { @@ -120,6 +127,7 @@ export async function generateEnrollmentAPIKey( api_key: apiKey, name, config_id: configId, + created_at: new Date().toISOString(), }) ); } diff --git a/x-pack/plugins/ingest_manager/server/services/api_keys/index.ts b/x-pack/plugins/ingest_manager/server/services/api_keys/index.ts index 5c05d5612e200..7f3f9f5281f0c 100644 --- a/x-pack/plugins/ingest_manager/server/services/api_keys/index.ts +++ b/x-pack/plugins/ingest_manager/server/services/api_keys/index.ts @@ -22,7 +22,7 @@ export async function generateOutputApiKey( cluster: ['monitor'], index: [ { - names: ['logs-*', 'metrics-*', 'events-*', 'metricbeat*'], + names: ['logs-*', 'metrics-*', 'events-*'], privileges: ['write', 'create_index'], }, ], diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/hooks/use_explore_data/use_explore_data.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/hooks/use_explore_data/use_explore_data.ts index 30f2139a263f7..a0a9eb8312499 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/hooks/use_explore_data/use_explore_data.ts +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/hooks/use_explore_data/use_explore_data.ts @@ -27,6 +27,7 @@ import { DataFrameAnalyticsConfig, EsFieldName, INDEX_STATUS, + MAX_COLUMNS, defaultSearchQuery, } from '../../../../common'; import { isKeywordAndTextType } from '../../../../common/fields'; @@ -198,7 +199,7 @@ export const useExploreData = (jobId: string): UseExploreDataReturnType => { if (selectedFields.length === 0) { const newSelectedFields = getDefaultSelectableFields(docs, resultsField); - setSelectedFields(newSelectedFields); + setSelectedFields(newSelectedFields.sort().splice(0, MAX_COLUMNS)); } // Create a version of the doc's source with flattened field names. diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx index 7b386e25e1bac..d2e5f582d23f6 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/analytics_list.tsx @@ -189,6 +189,14 @@ export const DataFrameAnalyticsList: FC = ({ .filter(m => (m && m.count) >= clauses.length) .map(m => m.analytics); + let pageStart = pageIndex * pageSize; + if (pageStart >= filtered.length && filtered.length !== 0) { + // if the page start is larger than the number of items due to + // filters being applied, calculate a new page start + pageStart = Math.floor((filtered.length - 1) / pageSize) * pageSize; + setPageIndex(pageStart / pageSize); + } + setFilteredAnalytics(filtered); setIsLoading(false); }; diff --git a/x-pack/plugins/task_manager/server/task_manager.ts b/x-pack/plugins/task_manager/server/task_manager.ts index 641826de615b1..c3f24a4aae88a 100644 --- a/x-pack/plugins/task_manager/server/task_manager.ts +++ b/x-pack/plugins/task_manager/server/task_manager.ts @@ -411,7 +411,7 @@ export async function claimAvailableTasks( } } else { performance.mark('claimAvailableTasks.noAvailableWorkers'); - logger.info( + logger.debug( `[Task Ownership]: Task Manager has skipped Claiming Ownership of available tasks at it has ran out Available Workers.` ); } diff --git a/x-pack/plugins/transform/public/app/common/data_grid.ts b/x-pack/plugins/transform/public/app/common/data_grid.ts index 0783839afee83..0e9cceefb3156 100644 --- a/x-pack/plugins/transform/public/app/common/data_grid.ts +++ b/x-pack/plugins/transform/public/app/common/data_grid.ts @@ -6,6 +6,8 @@ import { EuiDataGridStyle } from '@elastic/eui'; +export const INIT_MAX_COLUMNS = 20; + export const euiDataGridStyle: EuiDataGridStyle = { border: 'all', fontSize: 's', diff --git a/x-pack/plugins/transform/public/app/common/index.ts b/x-pack/plugins/transform/public/app/common/index.ts index f2b31bb5da865..daeddaa801828 100644 --- a/x-pack/plugins/transform/public/app/common/index.ts +++ b/x-pack/plugins/transform/public/app/common/index.ts @@ -5,7 +5,7 @@ */ export { AggName, isAggName } from './aggregations'; -export { euiDataGridStyle, euiDataGridToolbarSettings } from './data_grid'; +export { euiDataGridStyle, euiDataGridToolbarSettings, INIT_MAX_COLUMNS } from './data_grid'; export { getDefaultSelectableFields, getFlattenedFields, diff --git a/x-pack/plugins/transform/public/app/common/request.ts b/x-pack/plugins/transform/public/app/common/request.ts index 79fb3acb9fcaf..7e965dbe802c0 100644 --- a/x-pack/plugins/transform/public/app/common/request.ts +++ b/x-pack/plugins/transform/public/app/common/request.ts @@ -81,7 +81,7 @@ export function getPreviewRequestBody( }, }; - if (!isDefaultQuery(query)) { + if (!isDefaultQuery(query) && !isMatchAllQuery(query)) { request.source.query = query; } diff --git a/x-pack/plugins/transform/public/app/components/pivot_preview/pivot_preview.tsx b/x-pack/plugins/transform/public/app/components/pivot_preview/pivot_preview.tsx index 7965eeb779a3f..c0c85f74418fc 100644 --- a/x-pack/plugins/transform/public/app/components/pivot_preview/pivot_preview.tsx +++ b/x-pack/plugins/transform/public/app/components/pivot_preview/pivot_preview.tsx @@ -37,6 +37,7 @@ import { PivotGroupByConfig, PivotGroupByConfigDict, PivotQuery, + INIT_MAX_COLUMNS, } from '../../common'; import { SearchItems } from '../../hooks/use_search_items'; @@ -131,12 +132,12 @@ export const PivotPreview: FC = React.memo( columnKeys.sort(sortColumns(groupByArr)); // Column visibility - const [visibleColumns, setVisibleColumns] = useState(columnKeys); + const [visibleColumns, setVisibleColumns] = useState([]); useEffect(() => { - setVisibleColumns(columnKeys); + setVisibleColumns(columnKeys.splice(0, INIT_MAX_COLUMNS)); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [JSON.stringify(columnKeys)]); + }, [columnKeys.join()]); const [pagination, setPagination] = useState(defaultPagination); diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/source_index_preview/source_index_preview.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/source_index_preview/source_index_preview.tsx index 06ae4c81efa18..c56263b721032 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/source_index_preview/source_index_preview.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/source_index_preview/source_index_preview.tsx @@ -5,7 +5,7 @@ */ import moment from 'moment-timezone'; -import React, { useCallback, useMemo, useState } from 'react'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; @@ -32,6 +32,7 @@ import { euiDataGridToolbarSettings, EsFieldName, PivotQuery, + INIT_MAX_COLUMNS, } from '../../../../common'; import { SearchItems } from '../../../../hooks/use_search_items'; import { useToastNotifications } from '../../../../app_dependencies'; @@ -76,7 +77,12 @@ export const SourceIndexPreview: React.FC = React.memo(({ indexPattern, q }); // Column visibility - const [visibleColumns, setVisibleColumns] = useState(indexPatternFields); + const [visibleColumns, setVisibleColumns] = useState([]); + + useEffect(() => { + setVisibleColumns(indexPatternFields.splice(0, INIT_MAX_COLUMNS)); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [indexPatternFields.join()]); const { errorMessage, diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx index df22c3f3eb2e2..5e0eb7ee08361 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx @@ -705,6 +705,7 @@ export const StepDefineForm: FC = React.memo(({ overrides = {}, onChange, width="100%" value={advancedEditorSourceConfig} onChange={(d: string) => { + setSearchString(undefined); setAdvancedEditorSourceConfig(d); // Disable the "Apply"-Button if the config hasn't changed. diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx index 54cc1e8c071fa..f31514e67003b 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx @@ -17,7 +17,7 @@ import { EuiText, } from '@elastic/eui'; -import { getPivotQuery } from '../../../../common'; +import { getPivotQuery, isDefaultQuery, isMatchAllQuery } from '../../../../common'; import { PivotPreview } from '../../../../components/pivot_preview'; import { SearchItems } from '../../../../hooks/use_search_items'; @@ -60,24 +60,29 @@ export const StepDefineSummary: FC = ({ {searchString} )} - {typeof searchString === 'undefined' && ( - - - {JSON.stringify(searchQuery, null, 2)} - - - )} + + {JSON.stringify(pivotQuery, null, 2)} + + + )} )} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx index 96513f0563ad0..5bbec1221a3ac 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx @@ -145,6 +145,13 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent { + setIndexPopoverOpen(false); + if (timeField === undefined) { + setAlertParams('timeField', ''); + } + }; + useEffect(() => { const indexPatternsFunction = async () => { setIndexPatterns(await getIndexPatterns()); @@ -293,18 +300,16 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent 0 ? index.join(' ') : firstFieldOption.text} isActive={indexPopoverOpen} onClick={() => { setIndexPopoverOpen(true); }} - color={index ? 'secondary' : 'danger'} + color={index && index.length > 0 && timeField !== '' ? 'secondary' : 'danger'} /> } isOpen={indexPopoverOpen} - closePopover={() => { - setIndexPopoverOpen(false); - }} + closePopover={closeIndexPopover} ownFocus withTitle anchorPosition="downLeft" @@ -331,9 +336,7 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent { - setIndexPopoverOpen(false); - }} + onClick={closeIndexPopover} /> diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/capabilities.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/capabilities.ts index f8102189c425c..a216498d68b55 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/capabilities.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/capabilities.ts @@ -12,7 +12,7 @@ type Capabilities = Record; -const apps = ['apm', 'siem']; +const apps = ['apm', 'siem', 'uptime', 'infrastructure']; function hasCapability(capabilities: Capabilities, capability: string) { return apps.some(app => capabilities[app]?.[capability]); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_flyout.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_flyout.test.tsx index c25cae832006a..fc10b150ca9d9 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_flyout.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_flyout.test.tsx @@ -42,20 +42,7 @@ describe('connector_add_flyout', () => { }); it('renders action type menu on flyout open', () => { - const actionType = { - id: 'my-action-type', - iconClass: 'test', - selectMessage: 'test', - validateConnector: (): ValidationResult => { - return { errors: {} }; - }, - validateParams: (): ValidationResult => { - const validationResult = { errors: {} }; - return validationResult; - }, - actionConnectorFields: null, - actionParamsFields: null, - }; + const actionType = createActionType(); actionTypeRegistry.get.mockReturnValueOnce(actionType); actionTypeRegistry.has.mockReturnValue(true); @@ -88,6 +75,83 @@ describe('connector_add_flyout', () => { ); expect(wrapper.find('ActionTypeMenu')).toHaveLength(1); - expect(wrapper.find('[data-test-subj="my-action-type-card"]').exists()).toBeTruthy(); + expect(wrapper.find(`[data-test-subj="${actionType.id}-card"]`).exists()).toBeTruthy(); + }); + + it('renders banner with subscription links when features are disbaled due to licensing ', () => { + const actionType = createActionType(); + const disabledActionType = createActionType(); + + actionTypeRegistry.get.mockReturnValueOnce(actionType); + actionTypeRegistry.has.mockReturnValue(true); + + const wrapper = mountWithIntl( + { + return new Promise(() => {}); + }, + }} + > + {}} + actionTypes={[ + { + id: actionType.id, + enabled: true, + name: 'Test', + enabledInConfig: true, + enabledInLicense: true, + minimumLicenseRequired: 'basic', + }, + { + id: disabledActionType.id, + enabled: true, + name: 'Test', + enabledInConfig: true, + enabledInLicense: false, + minimumLicenseRequired: 'gold', + }, + ]} + /> + + ); + const callout = wrapper.find('UpgradeYourLicenseCallOut'); + expect(callout).toHaveLength(1); + + const manageLink = callout.find('EuiButton'); + expect(manageLink).toHaveLength(1); + expect(manageLink.getElements()[0].props.href).toMatchInlineSnapshot( + `"/app/kibana#/management/elasticsearch/license_management/"` + ); + + const subscriptionLink = callout.find('EuiButtonEmpty'); + expect(subscriptionLink).toHaveLength(1); + expect(subscriptionLink.getElements()[0].props.href).toMatchInlineSnapshot( + `"https://www.elastic.co/subscriptions"` + ); }); }); + +let count = 0; +function createActionType() { + return { + id: `my-action-type-${++count}`, + iconClass: 'test', + selectMessage: 'test', + validateConnector: (): ValidationResult => { + return { errors: {} }; + }, + validateParams: (): ValidationResult => { + const validationResult = { errors: {} }; + return validationResult; + }, + actionConnectorFields: null, + actionParamsFields: null, + }; +} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_flyout.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_flyout.tsx index 6b4a461bad24d..834a15f072f96 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_flyout.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_flyout.tsx @@ -19,9 +19,9 @@ import { EuiFlyoutBody, EuiBetaBadge, EuiCallOut, - EuiLink, EuiSpacer, } from '@elastic/eui'; +import { HttpSetup } from 'kibana/public'; import { i18n } from '@kbn/i18n'; import { ActionTypeMenu } from './action_type_menu'; import { ActionConnectorForm, validateBaseProperties } from './action_connector_form'; @@ -32,6 +32,7 @@ import { createActionConnector } from '../../lib/action_connector_api'; import { useActionsConnectorsContext } from '../../context/actions_connectors_context'; import { VIEW_LICENSE_OPTIONS_LINK } from '../../../common/constants'; import { PLUGIN } from '../../constants/plugin'; +import { BASE_PATH as LICENSE_MANAGEMENT_BASE_PATH } from '../../../../../license_management/common/constants'; export interface ConnectorAddFlyoutProps { addFlyoutVisible: boolean; @@ -217,7 +218,13 @@ export const ConnectorAddFlyout = ({ + ) : ( + + ) + } > {currentForm} @@ -269,23 +276,44 @@ export const ConnectorAddFlyout = ({ ); }; -const upgradeYourLicenseCallOut = ( +const UpgradeYourLicenseCallOut = ({ http }: { http: HttpSetup }) => ( - - - - + + + + + + + + + + + + + ); diff --git a/x-pack/plugins/uptime/server/kibana.index.ts b/x-pack/plugins/uptime/server/kibana.index.ts index c206cfa06e272..725b53aeca02d 100644 --- a/x-pack/plugins/uptime/server/kibana.index.ts +++ b/x-pack/plugins/uptime/server/kibana.index.ts @@ -39,22 +39,47 @@ export const initServerWithKibana = (server: UptimeCoreSetup, plugins: UptimeCor all: { app: ['uptime', 'kibana'], catalogue: ['uptime'], - api: ['uptime-read', 'uptime-write'], + api: [ + 'uptime-read', + 'uptime-write', + 'actions-read', + 'actions-all', + 'alerting-read', + 'alerting-all', + ], savedObject: { - all: [umDynamicSettings.name], + all: [umDynamicSettings.name, 'alert', 'action', 'action_task_params'], read: [], }, - ui: ['save', 'configureSettings', 'show'], + ui: [ + 'save', + 'configureSettings', + 'show', + 'alerting:show', + 'actions:show', + 'alerting:save', + 'actions:save', + 'alerting:delete', + 'actions:delete', + ], }, read: { app: ['uptime', 'kibana'], catalogue: ['uptime'], - api: ['uptime-read'], + api: ['uptime-read', 'actions-read', 'actions-all', 'alerting-read', 'alerting-all'], savedObject: { - all: [], + all: ['alert', 'action', 'action_task_params'], read: [umDynamicSettings.name], }, - ui: ['show'], + ui: [ + 'show', + 'alerting:show', + 'actions:show', + 'alerting:save', + 'actions:save', + 'alerting:delete', + 'actions:delete', + ], }, }, }); diff --git a/x-pack/plugins/uptime/server/lib/alerts/__tests__/status_check.test.ts b/x-pack/plugins/uptime/server/lib/alerts/__tests__/status_check.test.ts index 609d84cb521fc..9c99da63c3952 100644 --- a/x-pack/plugins/uptime/server/lib/alerts/__tests__/status_check.test.ts +++ b/x-pack/plugins/uptime/server/lib/alerts/__tests__/status_check.test.ts @@ -56,6 +56,14 @@ const mockSavedObjectsClient = { get: jest.fn() }; mockSavedObjectsClient.get.mockReturnValue(defaultDynamicSettings); describe('status check alert', () => { + let toISOStringSpy: jest.SpyInstance; + beforeEach(() => { + toISOStringSpy = jest.spyOn(Date.prototype, 'toISOString'); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); describe('executor', () => { it('does not trigger when there are no monitors down', async () => { expect.assertions(4); @@ -86,6 +94,7 @@ describe('status check alert', () => { }); it('triggers when monitors are down and provides expected state', async () => { + toISOStringSpy.mockImplementation(() => 'foo date string'); const mockGetter = jest.fn(); mockGetter.mockReturnValue([ { @@ -137,6 +146,13 @@ describe('status check alert', () => { expect(mockReplaceState.mock.calls[0]).toMatchInlineSnapshot(` Array [ Object { + "currentTriggerStarted": "foo date string", + "firstCheckedAt": "foo date string", + "firstTriggeredAt": "foo date string", + "isTriggered": true, + "lastCheckedAt": "foo date string", + "lastResolvedAt": undefined, + "lastTriggeredAt": "foo date string", "monitors": Array [ Object { "count": 234, @@ -159,11 +175,8 @@ describe('status check alert', () => { Array [ "xpack.uptime.alerts.actionGroups.monitorStatus", Object { - "completeIdList": "first from fairbanks; first from harrisburg; ", + "downMonitorsWithGeo": "first from fairbanks; first from harrisburg; ", "message": "Down monitor: first", - "server": Object { - "route": Object {}, - }, }, ] `); @@ -555,7 +568,7 @@ describe('status check alert', () => { ]; }); - it('creates a set of unique IDs from a list of composite-unique objects', () => { + it('creates a set of unique IDs from a list of composite unique objects', () => { expect(uniqueMonitorIds(items)).toEqual( new Set(['first', 'second', 'third', 'fourth', 'fifth']) ); diff --git a/x-pack/plugins/uptime/server/lib/alerts/status_check.ts b/x-pack/plugins/uptime/server/lib/alerts/status_check.ts index d999f0fda3937..2c731687c52fc 100644 --- a/x-pack/plugins/uptime/server/lib/alerts/status_check.ts +++ b/x-pack/plugins/uptime/server/lib/alerts/status_check.ts @@ -104,7 +104,11 @@ export const fullListByIdAndLocation = ( return -1; }) .slice(0, sizeLimit) - .reduce((cur, { monitor_id: id, location }) => cur + `${id} from ${location}; `, '') + + .reduce( + (cur, { monitor_id: id, location }) => + cur + `${id} from ${location ?? 'Unnamed location'}; `, + '' + ) + (sizeLimit < list.length ? i18n.translate('xpack.uptime.alerts.message.fullListOverflow', { defaultMessage: '...and {overflowCount} other {pluralizedMonitor}', @@ -192,6 +196,95 @@ export const statusCheckAlertFactory: UptimeAlertTypeFactory = (server, libs) => name: MONITOR_STATUS.name, }, ], + actionVariables: { + context: [ + { + name: 'message', + description: i18n.translate( + 'xpack.uptime.alerts.monitorStatus.actionVariables.context.message.description', + { + defaultMessage: 'A generated message summarizing the currently down monitors', + } + ), + }, + { + name: 'downMonitorsWithGeo', + description: i18n.translate( + 'xpack.uptime.alerts.monitorStatus.actionVariables.context.downMonitorsWithGeo.description', + { + defaultMessage: + 'A generated summary that shows some or all of the monitors detected as "down" by the alert', + } + ), + }, + ], + state: [ + { + name: 'firstCheckedAt', + description: i18n.translate( + 'xpack.uptime.alerts.monitorStatus.actionVariables.state.firstCheckedAt', + { + defaultMessage: 'Timestamp indicating when this alert first checked', + } + ), + }, + { + name: 'firstTriggeredAt', + description: i18n.translate( + 'xpack.uptime.alerts.monitorStatus.actionVariables.state.firstTriggeredAt', + { + defaultMessage: 'Timestamp indicating when the alert first triggered', + } + ), + }, + { + name: 'currentTriggerStarted', + description: i18n.translate( + 'xpack.uptime.alerts.monitorStatus.actionVariables.state.currentTriggerStarted', + { + defaultMessage: + 'Timestamp indicating when the current trigger state began, if alert is triggered', + } + ), + }, + { + name: 'isTriggered', + description: i18n.translate( + 'xpack.uptime.alerts.monitorStatus.actionVariables.state.isTriggered', + { + defaultMessage: `Flag indicating if the alert is currently triggering`, + } + ), + }, + { + name: 'lastCheckedAt', + description: i18n.translate( + 'xpack.uptime.alerts.monitorStatus.actionVariables.state.lastCheckedAt', + { + defaultMessage: `Timestamp indicating the alert's most recent check time`, + } + ), + }, + { + name: 'lastResolvedAt', + description: i18n.translate( + 'xpack.uptime.alerts.monitorStatus.actionVariables.state.lastResolvedAt', + { + defaultMessage: `Timestamp indicating the most recent resolution time for this alert`, + } + ), + }, + { + name: 'lastTriggeredAt', + description: i18n.translate( + 'xpack.uptime.alerts.monitorStatus.actionVariables.state.lastTriggeredAt', + { + defaultMessage: `Timestamp indicating the alert's most recent trigger time`, + } + ), + }, + ], + }, async executor(options: AlertExecutorOptions) { const { params: rawParams } = options; const decoded = StatusCheckExecutorParamsType.decode(rawParams); @@ -204,8 +297,7 @@ export const statusCheckAlertFactory: UptimeAlertTypeFactory = (server, libs) => const params = decoded.right; const dynamicSettings = await savedObjectsAdapter.getUptimeDynamicSettings( - options.services.savedObjectsClient, - undefined + options.services.savedObjectsClient ); /* This is called `monitorsByLocation` but it's really * monitors by location by status. The query we run to generate this @@ -224,16 +316,14 @@ export const statusCheckAlertFactory: UptimeAlertTypeFactory = (server, libs) => alertInstance.replaceState({ ...options.state, monitors: monitorsByLocation, + ...updateState(options.state, true), }); alertInstance.scheduleActions(MONITOR_STATUS.id, { message: contextMessage(Array.from(uniqueIds.keys()), DEFAULT_MAX_MESSAGE_ROWS), - server, - completeIdList: fullListByIdAndLocation(monitorsByLocation), + downMonitorsWithGeo: fullListByIdAndLocation(monitorsByLocation), }); } - // this stateful data is at the cluster level, not an alert instance level, - // so any alert of this type will flush/overwrite the state when they return return updateState(options.state, monitorsByLocation.length > 0); }, }); diff --git a/x-pack/test/api_integration/apis/endpoint/alerts.ts b/x-pack/test/api_integration/apis/endpoint/alerts.ts index f947520620a8c..5d42e85645b2d 100644 --- a/x-pack/test/api_integration/apis/endpoint/alerts.ts +++ b/x-pack/test/api_integration/apis/endpoint/alerts.ts @@ -93,7 +93,7 @@ export default function({ getService }: FtrProviderContext) { .expect(404); }); - it('should return one entry for each alert with default paging', async () => { + it.skip('should return one entry for each alert with default paging', async () => { const { body } = await supertest .get('/api/endpoint/alerts') .set('kbn-xsrf', 'xxx') @@ -111,7 +111,7 @@ export default function({ getService }: FtrProviderContext) { expect(body.result_from_index).to.eql(0); }); - it('should return the page_size and page_index specified in the query params', async () => { + it.skip('should return the page_size and page_index specified in the query params', async () => { const pageSize = 1; const pageIndex = 1; const { body } = await supertest @@ -140,7 +140,7 @@ export default function({ getService }: FtrProviderContext) { .expect(200); body = response.body; }); - it('should return accurate total counts', async () => { + it.skip('should return accurate total counts', async () => { expect(body.total).to.eql(numberOfAlertsInFixture); /** * Nothing was returned due to pagination. @@ -160,7 +160,7 @@ export default function({ getService }: FtrProviderContext) { expect(body.message).to.contain('Value must be equal to or greater than [1]'); }); - it('should return links to the next and previous pages using cursor-based pagination', async () => { + it.skip('should return links to the next and previous pages using cursor-based pagination', async () => { const { body } = await supertest .get('/api/endpoint/alerts?page_index=0') .set('kbn-xsrf', 'xxx') @@ -346,7 +346,7 @@ export default function({ getService }: FtrProviderContext) { expect(valid).to.eql(true); }); - it('should filter results of alert data using rison-encoded filters', async () => { + it.skip('should filter results of alert data using rison-encoded filters', async () => { const hostname = 'Host-abmfhmc5ku'; const { body } = await supertest .get( @@ -361,7 +361,7 @@ export default function({ getService }: FtrProviderContext) { expect(body.result_from_index).to.eql(0); }); - it('should filter results of alert data using KQL', async () => { + it.skip('should filter results of alert data using KQL', async () => { const agentID = '7cf9f7a3-28a6-4d1e-bb45-005aa28f18d0'; const { body } = await supertest .get( @@ -376,7 +376,7 @@ export default function({ getService }: FtrProviderContext) { expect(body.result_from_index).to.eql(0); }); - it('should return alert details by id, getting last alert', async () => { + it.skip('should return alert details by id, getting last alert', async () => { const documentID = 'zbNm0HABdD75WLjLYgcB'; const prevDocumentID = '2rNm0HABdD75WLjLYgcU'; const { body } = await supertest diff --git a/x-pack/test/api_integration/apis/endpoint/metadata.ts b/x-pack/test/api_integration/apis/endpoint/metadata.ts index 49e527fa3e7e8..a363f17df9faa 100644 --- a/x-pack/test/api_integration/apis/endpoint/metadata.ts +++ b/x-pack/test/api_integration/apis/endpoint/metadata.ts @@ -112,7 +112,7 @@ export default function({ getService }: FtrProviderContext) { const { body } = await supertest .post('/api/endpoint/metadata') .set('kbn-xsrf', 'xxx') - .send({ filter: 'not host.ip:10.100.170.247' }) + .send({ filter: 'not host.ip:10.46.229.234' }) .expect(200); expect(body.total).to.eql(2); expect(body.hosts.length).to.eql(2); @@ -121,7 +121,7 @@ export default function({ getService }: FtrProviderContext) { }); it('metadata api should return page based on filters and paging passed.', async () => { - const notIncludedIp = '10.100.170.247'; + const notIncludedIp = '10.46.229.234'; const { body } = await supertest .post('/api/endpoint/metadata') .set('kbn-xsrf', 'xxx') @@ -142,12 +142,10 @@ export default function({ getService }: FtrProviderContext) { ...body.hosts.map((metadata: Record) => metadata.host.ip) ); expect(resultIps).to.eql([ - '10.48.181.222', - '10.116.62.62', - '10.102.83.30', - '10.198.70.21', - '10.252.10.66', - '10.128.235.38', + '10.192.213.130', + '10.70.28.129', + '10.101.149.26', + '2606:a000:ffc0:39:11ef:37b9:3371:578c', ]); expect(resultIps).not.include.eql(notIncludedIp); expect(body.hosts.length).to.eql(2); @@ -164,18 +162,18 @@ export default function({ getService }: FtrProviderContext) { filter: `host.os.variant.keyword:${variantValue}`, }) .expect(200); - expect(body.total).to.eql(1); + expect(body.total).to.eql(2); const resultOsVariantValue: Set = new Set( body.hosts.map((metadata: Record) => metadata.host.os.variant) ); expect(Array.from(resultOsVariantValue)).to.eql([variantValue]); - expect(body.hosts.length).to.eql(1); + expect(body.hosts.length).to.eql(2); expect(body.request_page_size).to.eql(10); expect(body.request_page_index).to.eql(0); }); it('metadata api should return the latest event for all the events for an endpoint', async () => { - const targetEndpointIp = '10.100.170.247'; + const targetEndpointIp = '10.46.229.234'; const { body } = await supertest .post('/api/endpoint/metadata') .set('kbn-xsrf', 'xxx') @@ -188,7 +186,7 @@ export default function({ getService }: FtrProviderContext) { (ip: string) => ip === targetEndpointIp ); expect(resultIp).to.eql([targetEndpointIp]); - expect(body.hosts[0].event.created).to.eql(1584044335459); + expect(body.hosts[0].event.created).to.eql(1579881969541); expect(body.hosts.length).to.eql(1); expect(body.request_page_size).to.eql(10); expect(body.request_page_index).to.eql(0); diff --git a/x-pack/test/api_integration/apis/fleet/enrollment_api_keys/crud.ts b/x-pack/test/api_integration/apis/fleet/enrollment_api_keys/crud.ts index 89e05573da1c6..602ec6ca9d9e4 100644 --- a/x-pack/test/api_integration/apis/fleet/enrollment_api_keys/crud.ts +++ b/x-pack/test/api_integration/apis/fleet/enrollment_api_keys/crud.ts @@ -14,6 +14,7 @@ const ENROLLMENT_KEY_ID = 'ed22ca17-e178-4cfe-8b02-54ea29fbd6d0'; export default function(providerContext: FtrProviderContext) { const { getService } = providerContext; const esArchiver = getService('esArchiver'); + const es = getService('es'); const supertest = getService('supertest'); describe('fleet_enrollment_api_keys_crud', () => { @@ -45,14 +46,35 @@ export default function(providerContext: FtrProviderContext) { }); }); - describe('GET /fleet/enrollment-api-keys/{id}', async () => { - it('should allow to retrieve existing api keys', async () => { + describe('DELETE /fleet/enrollment-api-keys/{id}', async () => { + let keyId: string; + let esApiKeyId: string; + before(async () => { const { body: apiResponse } = await supertest - .delete(`/api/ingest_manager/fleet/enrollment-api-keys/${ENROLLMENT_KEY_ID}`) + .post(`/api/ingest_manager/fleet/enrollment-api-keys`) + .set('kbn-xsrf', 'xxx') + .send({ + config_id: 'policy1', + }) + .expect(200); + keyId = apiResponse.item.id; + esApiKeyId = apiResponse.item.api_key_id; + }); + + it('should invalide an existing api keys', async () => { + const { body: apiResponse } = await supertest + .delete(`/api/ingest_manager/fleet/enrollment-api-keys/${keyId}`) .set('kbn-xsrf', 'xxx') .expect(200); expect(apiResponse.success).to.eql(true); + + const { + body: { api_keys: apiKeys }, + } = await es.security.getApiKey({ id: esApiKeyId }); + + expect(apiKeys).length(1); + expect(apiKeys[0].invalidated).eql(true); }); }); diff --git a/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts b/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts index c36621a9a6403..975a10c2aed2a 100644 --- a/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts +++ b/x-pack/test/api_integration/apis/ml/calculate_model_memory_limit.ts @@ -48,7 +48,7 @@ export default ({ getService }: FtrProviderContext) => { }, }, { - testTitleSuffix: 'with 1 metrics and 1 influencers same as split field', + testTitleSuffix: 'with 1 metric and 1 influencer same as split field', user: USER.ML_POWERUSER, requestBody: { indexPattern: 'ecommerce', @@ -57,7 +57,7 @@ export default ({ getService }: FtrProviderContext) => { detectors: [ { function: 'avg', - field_name: 'geoip.city_name', + field_name: 'taxless_total_price', by_field_name: 'geoip.city_name', }, ], @@ -84,7 +84,7 @@ export default ({ getService }: FtrProviderContext) => { { function: 'mean', by_field_name: 'geoip.city_name', - field_name: 'geoip.city_name', + field_name: 'taxless_total_price', }, ], influencers: ['geoip.city_name', 'customer_gender', 'customer_full_name.keyword'], @@ -100,7 +100,8 @@ export default ({ getService }: FtrProviderContext) => { }, }, { - testTitleSuffix: '4 influencers, split by customer_id and filtering by country code', + testTitleSuffix: + '2 detectors split by city and manufacturer, 4 influencers, filtering by country code', user: USER.ML_POWERUSER, requestBody: { indexPattern: 'ecommerce', @@ -109,13 +110,13 @@ export default ({ getService }: FtrProviderContext) => { detectors: [ { function: 'mean', - by_field_name: 'customer_id.city_name', - field_name: 'customer_id.city_name', + by_field_name: 'geoip.city_name', + field_name: 'taxless_total_price', }, { function: 'avg', by_field_name: 'manufacturer.keyword', - field_name: 'manufacturer.keyword', + field_name: 'taxless_total_price', }, ], influencers: [ diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts index f1404b79a07af..7b725a7830c56 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/tests/utils.ts @@ -18,6 +18,8 @@ export const removeServerGeneratedProperties = ( created_at, updated_at, id, + last_failure_at, + last_failure_message, last_success_at, last_success_message, status, diff --git a/x-pack/test/functional/apps/endpoint/host_list.ts b/x-pack/test/functional/apps/endpoint/host_list.ts index baace0f7670e1..6eca8cc3bcce9 100644 --- a/x-pack/test/functional/apps/endpoint/host_list.ts +++ b/x-pack/test/functional/apps/endpoint/host_list.ts @@ -14,6 +14,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('host list', function() { this.tags('ciGroup7'); + const sleep = (ms = 100) => new Promise(resolve => setTimeout(resolve, ms)); before(async () => { await esArchiver.load('endpoint/metadata/api_feature'); await pageObjects.common.navigateToUrlWithBrowserHistory('endpoint', '/hosts'); @@ -37,32 +38,32 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { 'Last Active', ], [ - 'Host-cxz5glsoup', + 'cadmann-4.example.com', 'Policy Name', 'Policy Status', '0', - 'windows 6.2', - '10.48.181.222, 10.116.62.62, 10.102.83.30', + 'windows 10.0', + '10.192.213.130, 10.70.28.129', 'version', 'xxxx', ], [ - 'Host-frl2otafoa', + 'thurlow-9.example.com', 'Policy Name', 'Policy Status', '0', 'windows 10.0', - '10.198.70.21, 10.252.10.66, 10.128.235.38', + '10.46.229.234', 'version', 'xxxx', ], [ - 'Host-abmfhmc5ku', + 'rezzani-7.example.com', 'Policy Name', 'Policy Status', '0', - 'windows 6.2', - '10.100.170.247, 10.113.203.29, 10.83.81.146', + 'windows 10.0', + '10.101.149.26, 2606:a000:ffc0:39:11ef:37b9:3371:578c', 'version', 'xxxx', ], @@ -71,21 +72,60 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { expect(tableData).to.eql(expectedData); }); + it('no details flyout when host page displayed', async () => { + await testSubjects.missingOrFail('hostDetailsFlyout'); + }); + it('display details flyout when the hostname is clicked on', async () => { await (await testSubjects.find('hostnameCellLink')).click(); await testSubjects.existOrFail('hostDetailsUpperList'); await testSubjects.existOrFail('hostDetailsLowerList'); }); - it('displays no items found when empty', async () => { - // clear out the data and reload the page - await esArchiver.unload('endpoint/metadata/api_feature'); - await pageObjects.common.navigateToUrlWithBrowserHistory('endpoint', '/hosts'); - // get the table data and verify no entries appear - const tableData = await pageObjects.endpoint.getEndpointAppTableData('hostListTable'); - expect(tableData[1][0]).to.equal('No items found'); - // reload the data so the other tests continue to pass - await esArchiver.load('endpoint/metadata/api_feature'); + it('update details flyout when new hostname is clicked on', async () => { + // display flyout for the first host in the list + await (await testSubjects.findAll('hostnameCellLink'))[0].click(); + await testSubjects.existOrFail('hostDetailsFlyoutTitle'); + const hostDetailTitle0 = await testSubjects.getVisibleText('hostDetailsFlyoutTitle'); + // select the 2nd host in the host list + await (await testSubjects.findAll('hostnameCellLink'))[1].click(); + await pageObjects.endpoint.waitForVisibleTextToChange( + 'hostDetailsFlyoutTitle', + hostDetailTitle0 + ); + const hostDetailTitle1 = await testSubjects.getVisibleText('hostDetailsFlyoutTitle'); + expect(hostDetailTitle1).to.not.eql(hostDetailTitle0); + }); + + it('details flyout remains the same when current hostname is clicked on', async () => { + // display flyout for the first host in the list + await (await testSubjects.findAll('hostnameCellLink'))[1].click(); + await testSubjects.existOrFail('hostDetailsFlyoutTitle'); + const hostDetailTitleInitial = await testSubjects.getVisibleText('hostDetailsFlyoutTitle'); + // select the same host in the host list + await (await testSubjects.findAll('hostnameCellLink'))[1].click(); + await sleep(500); // give page time to refresh and verify it did not change + const hostDetailTitleNew = await testSubjects.getVisibleText('hostDetailsFlyoutTitle'); + expect(hostDetailTitleNew).to.eql(hostDetailTitleInitial); + }); + + describe('no data', () => { + before(async () => { + // clear out the data and reload the page + await esArchiver.unload('endpoint/metadata/api_feature'); + await pageObjects.common.navigateToUrlWithBrowserHistory('endpoint', '/hosts'); + }); + after(async () => { + // reload the data so the other tests continue to pass + await esArchiver.load('endpoint/metadata/api_feature'); + }); + it('displays no items found when empty', async () => { + // get the host list table data and verify message + const [, [noItemsFoundMessage]] = await pageObjects.endpoint.getEndpointAppTableData( + 'hostListTable' + ); + expect(noItemsFoundMessage).to.equal('No items found'); + }); }); describe('has a url with a host id', () => { @@ -93,7 +133,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.common.navigateToUrlWithBrowserHistory( 'endpoint', '/hosts', - 'selected_host=cbe80003-6964-4e0f-aba1-f94c32b44e95' + 'selected_host=fc0ff548-feba-41b6-8367-65e8790d0eaf' ); }); @@ -120,14 +160,14 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const values = await pageObjects.endpoint.hostFlyoutDescriptionValues('hostDetailsFlyout'); expect(values).to.eql([ - 'Windows Server 2012', + 'Windows 10', '', '0', - 'C2A9093E-E289-4C0A-AA44-8C32A414FA7A', + '00000000-0000-0000-0000-000000000000', 'active', - '10.48.181.22210.116.62.6210.102.83.30', - 'Host-cxz5glsoup', - '6.6.9', + '10.101.149.262606:a000:ffc0:39:11ef:37b9:3371:578c', + 'rezzani-7.example.com', + '6.8.0', ]); }); }); diff --git a/x-pack/test/functional/apps/maps/documents_source/docvalue_fields.js b/x-pack/test/functional/apps/maps/documents_source/docvalue_fields.js index fdacd89722d3c..a313508e5d06e 100644 --- a/x-pack/test/functional/apps/maps/documents_source/docvalue_fields.js +++ b/x-pack/test/functional/apps/maps/documents_source/docvalue_fields.js @@ -29,26 +29,26 @@ export default function({ getPageObjects, getService }) { await PageObjects.maps.loadSavedMap('document example'); const response = await getResponse(); const firstHit = response.hits.hits[0]; - expect(Object.keys(firstHit).join(',')).to.equal('_index,_id,_score,fields'); - expect(Object.keys(firstHit.fields).join(',')).to.equal('geo.coordinates'); + expect(firstHit).to.only.have.keys(['_id', '_index', '_score', 'fields']); + expect(firstHit.fields).to.only.have.keys(['geo.coordinates']); }); it('should only fetch geo_point field and data driven styling fields', async () => { await PageObjects.maps.loadSavedMap('document example with data driven styles'); const response = await getResponse(); const firstHit = response.hits.hits[0]; - expect(Object.keys(firstHit).join(',')).to.equal('_index,_id,_score,fields'); - expect(Object.keys(firstHit.fields).join(',')).to.equal('geo.coordinates,bytes,hour_of_day'); + expect(firstHit).to.only.have.keys(['_id', '_index', '_score', 'fields']); + expect(firstHit.fields).to.only.have.keys(['bytes', 'geo.coordinates', 'hour_of_day']); }); it('should format date fields as epoch_millis when data driven styling is applied to a date field', async () => { await PageObjects.maps.loadSavedMap('document example with data driven styles on date field'); const response = await getResponse(); const firstHit = response.hits.hits[0]; - expect(Object.keys(firstHit).join(',')).to.equal('_index,_id,_score,fields'); - expect(Object.keys(firstHit.fields).join(',')).to.equal('geo.coordinates,bytes,@timestamp'); + expect(firstHit).to.only.have.keys(['_id', '_index', '_score', 'fields']); + expect(firstHit.fields).to.only.have.keys(['@timestamp', 'bytes', 'geo.coordinates']); expect(firstHit.fields['@timestamp']).to.be.an('array'); - expect(firstHit.fields['@timestamp'][0]).to.equal('1442709321445'); + expect(firstHit.fields['@timestamp'][0]).to.eql('1442709321445'); }); }); } diff --git a/x-pack/test/functional/apps/transform/creation_index_pattern.ts b/x-pack/test/functional/apps/transform/creation_index_pattern.ts index ae3617db9e517..f3cc4ab8d7601 100644 --- a/x-pack/test/functional/apps/transform/creation_index_pattern.ts +++ b/x-pack/test/functional/apps/transform/creation_index_pattern.ts @@ -89,7 +89,7 @@ export default function({ getService }: FtrProviderContext) { progress: '100', }, sourcePreview: { - columns: 45, + columns: 20, rows: 5, }, }, @@ -143,7 +143,7 @@ export default function({ getService }: FtrProviderContext) { progress: '100', }, sourcePreview: { - columns: 45, + columns: 20, rows: 5, }, }, diff --git a/x-pack/test/functional/apps/uptime/locations.ts b/x-pack/test/functional/apps/uptime/locations.ts index 7f6932ab50319..bbf50344f3493 100644 --- a/x-pack/test/functional/apps/uptime/locations.ts +++ b/x-pack/test/functional/apps/uptime/locations.ts @@ -4,17 +4,24 @@ * you may not use this file except in compliance with the Elastic License. */ +import moment from 'moment'; import { makeChecksWithStatus } from '../../../api_integration/apis/uptime/graphql/helpers/make_checks'; import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { - const pageObjects = getPageObjects(['uptime']); + const { uptime: uptimePage } = getPageObjects(['uptime']); + const uptime = getService('uptime'); - describe('location', () => { - const start = new Date().toISOString(); - const end = new Date().toISOString(); + const monitor = () => uptime.monitor; + + describe('Observer location', () => { + const start = moment() + .subtract('15', 'm') + .toISOString(); + const end = moment().toISOString(); const MONITOR_ID = 'location-testing-id'; + beforeEach(async () => { /** * This mogrify function will strip the documents of their location @@ -38,11 +45,17 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { 'up', mogrifyNoLocation ); + await uptime.navigation.goToUptime(); + + await uptimePage.loadDataAndGoToMonitorPage(start, end, MONITOR_ID); + }); + + it('renders the location panel and canvas', async () => { + await monitor().locationMapIsRendered(); }); it('renders the location missing popover when monitor has location name, but no geo data', async () => { - await pageObjects.uptime.loadDataAndGoToMonitorPage(start, end, MONITOR_ID); - await pageObjects.uptime.locationMissingIsDisplayed(); + await monitor().locationMissingExists(); }); }); }; diff --git a/x-pack/test/functional/apps/uptime/monitor.ts b/x-pack/test/functional/apps/uptime/monitor.ts index 034ccad4815a1..e15750eb6157b 100644 --- a/x-pack/test/functional/apps/uptime/monitor.ts +++ b/x-pack/test/functional/apps/uptime/monitor.ts @@ -8,22 +8,28 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const esArchiver = getService('esArchiver'); - const pageObjects = getPageObjects(['uptime']); + const uptimeService = getService('uptime'); + const { uptime } = getPageObjects(['uptime']); const archive = 'uptime/full_heartbeat'; describe('monitor page', function() { this.tags(['skipFirefox']); + const dateStart = 'Sep 10, 2019 @ 12:40:08.078'; + const dateEnd = 'Sep 11, 2019 @ 19:40:08.078'; + const monitorId = '0000-intermittent'; + const monitorName = '0000-intermittent'; + before(async () => { - await esArchiver.load(archive); + await esArchiver.loadIfNeeded(archive); + await uptimeService.navigation.goToUptime(); + }); + + after(async () => { + await esArchiver.unload(archive); }); - after(async () => await esArchiver.unload(archive)); + it('loads and displays uptime data based on date range', async () => { - await pageObjects.uptime.loadDataAndGoToMonitorPage( - 'Sep 10, 2019 @ 12:40:08.078', - 'Sep 11, 2019 @ 19:40:08.078', - '0000-intermittent', - '0000-intermittent' - ); + await uptime.loadDataAndGoToMonitorPage(dateStart, dateEnd, monitorId, monitorName); }); }); }; diff --git a/x-pack/test/functional/apps/uptime/overview.ts b/x-pack/test/functional/apps/uptime/overview.ts index f3b587b9bc1e2..8195e6bbb6035 100644 --- a/x-pack/test/functional/apps/uptime/overview.ts +++ b/x-pack/test/functional/apps/uptime/overview.ts @@ -8,14 +8,14 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { - const pageObjects = getPageObjects(['uptime']); + const { uptime } = getPageObjects(['uptime']); const retry = getService('retry'); describe('overview page', function() { const DEFAULT_DATE_START = 'Sep 10, 2019 @ 12:40:08.078'; const DEFAULT_DATE_END = 'Sep 11, 2019 @ 19:40:08.078'; it('loads and displays uptime data based on date range', async () => { - await pageObjects.uptime.goToUptimeOverviewAndLoadData( + await uptime.goToUptimeOverviewAndLoadData( DEFAULT_DATE_START, DEFAULT_DATE_END, 'monitor-page-link-0000-intermittent' @@ -23,20 +23,18 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); it('runs filter query without issues', async () => { - await pageObjects.uptime.inputFilterQuery( - 'monitor.status:up and monitor.id:"0000-intermittent"' - ); - await pageObjects.uptime.pageHasExpectedIds(['0000-intermittent']); + await uptime.inputFilterQuery('monitor.status:up and monitor.id:"0000-intermittent"'); + await uptime.pageHasExpectedIds(['0000-intermittent']); }); it('applies filters for multiple fields', async () => { - await pageObjects.uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END); - await pageObjects.uptime.selectFilterItems({ + await uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END); + await uptime.selectFilterItems({ location: ['mpls'], port: ['5678'], scheme: ['http'], }); - await pageObjects.uptime.pageHasExpectedIds([ + await uptime.pageHasExpectedIds([ '0000-intermittent', '0001-up', '0002-up', @@ -51,9 +49,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); it('pagination is cleared when filter criteria changes', async () => { - await pageObjects.uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END); - await pageObjects.uptime.changePage('next'); - await pageObjects.uptime.pageHasExpectedIds([ + await uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END); + await uptime.changePage('next'); + await uptime.pageHasExpectedIds([ '0010-down', '0011-up', '0012-up', @@ -66,9 +64,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { '0019-up', ]); // there should now be pagination data in the URL - await pageObjects.uptime.pageUrlContains('pagination'); - await pageObjects.uptime.setStatusFilter('up'); - await pageObjects.uptime.pageHasExpectedIds([ + await uptime.pageUrlContains('pagination'); + await uptime.setStatusFilter('up'); + await uptime.pageHasExpectedIds([ '0000-intermittent', '0001-up', '0002-up', @@ -81,21 +79,21 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { '0009-up', ]); // ensure that pagination is removed from the URL - await pageObjects.uptime.pageUrlContains('pagination', false); + await uptime.pageUrlContains('pagination', false); }); it('clears pagination parameters when size changes', async () => { - await pageObjects.uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END); - await pageObjects.uptime.changePage('next'); - await pageObjects.uptime.pageUrlContains('pagination'); - await pageObjects.uptime.setMonitorListPageSize(50); + await uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END); + await uptime.changePage('next'); + await uptime.pageUrlContains('pagination'); + await uptime.setMonitorListPageSize(50); // the pagination parameter should be cleared after a size change - await pageObjects.uptime.pageUrlContains('pagination', false); + await uptime.pageUrlContains('pagination', false); }); it('pagination size updates to reflect current selection', async () => { - await pageObjects.uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END); - await pageObjects.uptime.pageHasExpectedIds([ + await uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END); + await uptime.pageHasExpectedIds([ '0000-intermittent', '0001-up', '0002-up', @@ -107,8 +105,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { '0008-up', '0009-up', ]); - await pageObjects.uptime.setMonitorListPageSize(50); - await pageObjects.uptime.pageHasExpectedIds([ + await uptime.setMonitorListPageSize(50); + await uptime.pageHasExpectedIds([ '0000-intermittent', '0001-up', '0002-up', @@ -164,26 +162,20 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('snapshot counts', () => { it('updates the snapshot count when status filter is set to down', async () => { - await pageObjects.uptime.goToUptimePageAndSetDateRange( - DEFAULT_DATE_START, - DEFAULT_DATE_END - ); - await pageObjects.uptime.setStatusFilter('down'); + await uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END); + await uptime.setStatusFilter('down'); await retry.tryForTime(12000, async () => { - const counts = await pageObjects.uptime.getSnapshotCount(); + const counts = await uptime.getSnapshotCount(); expect(counts).to.eql({ up: '0', down: '7' }); }); }); it('updates the snapshot count when status filter is set to up', async () => { - await pageObjects.uptime.goToUptimePageAndSetDateRange( - DEFAULT_DATE_START, - DEFAULT_DATE_END - ); - await pageObjects.uptime.setStatusFilter('up'); + await uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END); + await uptime.setStatusFilter('up'); await retry.tryForTime(12000, async () => { - const counts = await pageObjects.uptime.getSnapshotCount(); + const counts = await uptime.getSnapshotCount(); expect(counts).to.eql({ up: '93', down: '0' }); }); }); diff --git a/x-pack/test/functional/apps/uptime/settings.ts b/x-pack/test/functional/apps/uptime/settings.ts index 477eeb84ae5c3..3294d928b61b3 100644 --- a/x-pack/test/functional/apps/uptime/settings.ts +++ b/x-pack/test/functional/apps/uptime/settings.ts @@ -9,64 +9,71 @@ import { FtrProviderContext } from '../../ftr_provider_context'; import { defaultDynamicSettings, DynamicSettings, -} from '../../../../legacy/plugins/uptime/common/runtime_types/dynamic_settings'; +} from '../../../../legacy/plugins/uptime/common/runtime_types'; import { makeChecks } from '../../../api_integration/apis/uptime/graphql/helpers/make_checks'; export default ({ getPageObjects, getService }: FtrProviderContext) => { - const pageObjects = getPageObjects(['uptime']); + const { uptime: uptimePage } = getPageObjects(['uptime']); + const uptimeService = getService('uptime'); + const es = getService('es'); // Flaky https://github.com/elastic/kibana/issues/60866 describe('uptime settings page', () => { - const settingsPage = () => pageObjects.uptime.settings; beforeEach('navigate to clean app root', async () => { // make 10 checks await makeChecks(es, 'myMonitor', 1, 1, 1); - await pageObjects.uptime.goToRoot(); + await uptimePage.goToRoot(); }); it('loads the default settings', async () => { - await pageObjects.uptime.settings.go(); + const settings = uptimeService.settings; + + await settings.go(); - const fields = await settingsPage().loadFields(); + const fields = await settings.loadFields(); expect(fields).to.eql(defaultDynamicSettings); }); it('should disable the apply button when invalid or unchanged', async () => { - await pageObjects.uptime.settings.go(); + const settings = uptimeService.settings; + + await settings.go(); // Disabled because it's the original value - expect(await settingsPage().applyButtonIsDisabled()).to.eql(true); + expect(await settings.applyButtonIsDisabled()).to.eql(true); // Enabled because it's a new, different, value - await settingsPage().changeHeartbeatIndicesInput('somethingNew'); - expect(await settingsPage().applyButtonIsDisabled()).to.eql(false); + await settings.changeHeartbeatIndicesInput('somethingNew'); + expect(await settings.applyButtonIsDisabled()).to.eql(false); // Disabled because it's blank - await settingsPage().changeHeartbeatIndicesInput(''); - expect(await settingsPage().applyButtonIsDisabled()).to.eql(true); + await settings.changeHeartbeatIndicesInput(''); + expect(await settings.applyButtonIsDisabled()).to.eql(true); }); // Failing: https://github.com/elastic/kibana/issues/60863 it('changing index pattern setting is reflected elsewhere in UI', async () => { - const originalCount = await pageObjects.uptime.getSnapshotCount(); + const settings = uptimeService.settings; + + const originalCount = await uptimePage.getSnapshotCount(); // We should find 1 monitor up with the default index pattern expect(originalCount.up).to.eql(1); - await pageObjects.uptime.settings.go(); + await settings.go(); const newFieldValues: DynamicSettings = { heartbeatIndices: 'new*' }; - await settingsPage().changeHeartbeatIndicesInput(newFieldValues.heartbeatIndices); - await settingsPage().apply(); + await settings.changeHeartbeatIndicesInput(newFieldValues.heartbeatIndices); + await settings.apply(); - await pageObjects.uptime.goToRoot(); + await uptimePage.goToRoot(); // We should no longer find any monitors since the new pattern matches nothing - await pageObjects.uptime.pageHasDataMissing(); + await uptimePage.pageHasDataMissing(); // Verify that the settings page shows the value we previously saved - await pageObjects.uptime.settings.go(); - const fields = await settingsPage().loadFields(); + await settings.go(); + const fields = await settings.loadFields(); expect(fields).to.eql(newFieldValues); }); }); diff --git a/x-pack/test/functional/es_archives/endpoint/alerts/api_feature/mappings.json b/x-pack/test/functional/es_archives/endpoint/alerts/api_feature/mappings.json index 47bb1868e7065..e0a7068e1149a 100644 --- a/x-pack/test/functional/es_archives/endpoint/alerts/api_feature/mappings.json +++ b/x-pack/test/functional/es_archives/endpoint/alerts/api_feature/mappings.json @@ -1,8 +1,7 @@ { "type": "index", "value": { - "aliases": { - }, + "aliases": {}, "index": "events-endpoint-1", "mappings": { "_meta": { @@ -2370,4 +2369,4 @@ } } } -} \ No newline at end of file +} diff --git a/x-pack/test/functional/es_archives/endpoint/metadata/api_feature/data.json b/x-pack/test/functional/es_archives/endpoint/metadata/api_feature/data.json new file mode 100644 index 0000000000000..56c58a2baa039 --- /dev/null +++ b/x-pack/test/functional/es_archives/endpoint/metadata/api_feature/data.json @@ -0,0 +1,382 @@ +{ + "type": "doc", + "value": { + "id": "3KVN2G8BYQH1gtPUuYk7", + "index": "endpoint-agent-1", + "source": { + "@timestamp": 1579881969541, + "agent": { + "id": "963b081e-60d1-482c-befd-a5815fa8290f", + "version": "6.6.1", + "name" : "Elastic Endpoint" + }, + "endpoint": { + "policy": { + "id": "C2A9093E-E289-4C0A-AA44-8C32A414FA7A" + } + }, + "event": { + "created": 1579881969541 + }, + "host": { + "architecture": "x86", + "hostname": "cadmann-4.example.com", + "id": "1fb3e58f-6ab0-4406-9d2a-91911207a712", + "ip": [ + "10.192.213.130", + "10.70.28.129" + ], + "mac": [ + "a9-71-6a-cc-93-85", + "f7-31-84-d3-21-68", + "2-95-12-39-ca-71" + ], + "os": { + "full": "Windows 10", + "name": "windows 10.0", + "version": "10.0", + "variant" : "Windows Pro" + } + } + } + } +} + +{ + "type": "doc", + "value": { + "id": "3aVN2G8BYQH1gtPUuYk7", + "index": "endpoint-agent-1", + "source": { + "@timestamp": 1579881969541, + "agent": { + "id": "b3412d6f-b022-4448-8fee-21cc936ea86b", + "version": "6.0.0", + "name" : "Elastic Endpoint" + }, + "endpoint": { + "policy": { + "id": "C2A9093E-E289-4C0A-AA44-8C32A414FA7A" + } + }, + "event": { + "created": 1579881969541 + }, + "host": { + "architecture": "x86_64", + "hostname": "thurlow-9.example.com", + "id": "2f735e3d-be14-483b-9822-bad06e9045ca", + "ip": [ + "10.46.229.234" + ], + "mac": [ + "30-8c-45-55-69-b8", + "e5-36-7e-8f-a3-84", + "39-a1-37-20-18-74" + ], + "os": { + "full": "Windows Server 2016", + "name": "windows 10.0", + "version": "10.0", + "variant" : "Windows Server" + } + } + } + } +} + +{ + "type": "doc", + "value": { + "id": "3qVN2G8BYQH1gtPUuYk7", + "index": "endpoint-agent-1", + "source": { + "@timestamp": 1579881969541, + "agent": { + "id": "3838df35-a095-4af4-8fce-0b6d78793f2e", + "version": "6.8.0", + "name" : "Elastic Endpoint" + }, + "endpoint": { + "policy": { + "id": "00000000-0000-0000-0000-000000000000" + } + }, + "event": { + "created": 1579881969541 + }, + "host": { + "hostname": "rezzani-7.example.com", + "id": "fc0ff548-feba-41b6-8367-65e8790d0eaf", + "ip": [ + "10.101.149.26", + "2606:a000:ffc0:39:11ef:37b9:3371:578c" + ], + "mac": [ + "e2-6d-f9-0-46-2e" + ], + "os": { + "full": "Windows 10", + "name": "windows 10.0", + "version": "10.0", + "variant" : "Windows Pro" + } + } + } + } +} + +{ + "type": "doc", + "value": { + "id": "36VN2G8BYQH1gtPUuYk7", + "index": "endpoint-agent-1", + "source": { + "@timestamp": 1579878369541, + "agent": { + "id": "963b081e-60d1-482c-befd-a5815fa8290f", + "version": "6.6.1", + "name" : "Elastic Endpoint" + }, + "endpoint": { + "policy": { + "id": "C2A9093E-E289-4C0A-AA44-8C32A414FA7A" + } + }, + "event": { + "created": 1579878369541 + }, + "host": { + "architecture": "x86", + "hostname": "cadmann-4.example.com", + "id": "1fb3e58f-6ab0-4406-9d2a-91911207a712", + "ip": [ + "10.192.213.130", + "10.70.28.129" + ], + "mac": [ + "a9-71-6a-cc-93-85", + "f7-31-84-d3-21-68", + "2-95-12-39-ca-71" + ], + "os": { + "full": "Windows Server 2016", + "name": "windows 10.0", + "version": "10.0", + "variant" : "Windows Server 2016" + } + } + } + } +} + +{ + "type": "doc", + "value": { + "id": "4KVN2G8BYQH1gtPUuYk7", + "index": "endpoint-agent-1", + "source": { + "@timestamp": 1579878369541, + "agent": { + "id": "b3412d6f-b022-4448-8fee-21cc936ea86b", + "version": "6.0.0", + "name" : "Elastic Endpoint" + }, + "endpoint": { + "policy": { + "id": "C2A9093E-E289-4C0A-AA44-8C32A414FA7A" + } + }, + "event": { + "created": 1579878369541 + }, + "host": { + "hostname": "thurlow-9.example.com", + "id": "2f735e3d-be14-483b-9822-bad06e9045ca", + "ip": [ + "10.46.229.234" + ], + "mac": [ + "30-8c-45-55-69-b8", + "e5-36-7e-8f-a3-84", + "39-a1-37-20-18-74" + ], + "os": { + "full": "Windows Server 2012", + "name": "windows 6.2", + "version": "6.2", + "variant" : "Windows Server 2012" + } + } + } + } +} + +{ + "type": "doc", + "value": { + "id": "4aVN2G8BYQH1gtPUuYk7", + "index": "endpoint-agent-1", + "source": { + "@timestamp": 1579878369541, + "agent": { + "id": "3838df35-a095-4af4-8fce-0b6d78793f2e", + "version": "6.8.0", + "name" : "Elastic Endpoint" + }, + "endpoint": { + "policy": { + "id": "00000000-0000-0000-0000-000000000000" + } + }, + "event": { + "created": 1579878369541 + }, + "host": { + "architecture": "x86", + "hostname": "rezzani-7.example.com", + "id": "fc0ff548-feba-41b6-8367-65e8790d0eaf", + "ip": [ + "10.101.149.26", + "2606:a000:ffc0:39:11ef:37b9:3371:578c" + ], + "mac": [ + "e2-6d-f9-0-46-2e" + ], + "os": { + "full": "Windows Server 2012", + "name": "windows 6.2", + "version": "6.2", + "variant" : "Windows Server 2012" + } + } + } + } +} + +{ + "type": "doc", + "value": { + "id": "4qVN2G8BYQH1gtPUuYk7", + "index": "endpoint-agent-1", + "source": { + "@timestamp": 1579874769541, + "agent": { + "id": "963b081e-60d1-482c-befd-a5815fa8290f", + "version": "6.6.1", + "name" : "Elastic Endpoint" + }, + "endpoint": { + "policy": { + "id": "00000000-0000-0000-0000-000000000000" + } + }, + "event": { + "created": 1579874769541 + }, + "host": { + "hostname": "cadmann-4.example.com", + "id": "1fb3e58f-6ab0-4406-9d2a-91911207a712", + "ip": [ + "10.192.213.130", + "10.70.28.129" + ], + "mac": [ + "a9-71-6a-cc-93-85", + "f7-31-84-d3-21-68", + "2-95-12-39-ca-71" + ], + "os": { + "full": "Windows Server 2012R2", + "name": "windows 6.3", + "version": "6.3", + "variant" : "Windows Server 2012 R2" + } + } + } + } +} + +{ + "type": "doc", + "value": { + "id": "46VN2G8BYQH1gtPUuYk7", + "index": "endpoint-agent-1", + "source": { + "@timestamp": 1579874769541, + "agent": { + "id": "b3412d6f-b022-4448-8fee-21cc936ea86b", + "version": "6.0.0", + "name" : "Elastic Endpoint" + }, + "endpoint": { + "policy": { + "id": "C2A9093E-E289-4C0A-AA44-8C32A414FA7A" + } + }, + "event": { + "created": 1579874769541 + }, + "host": { + "hostname": "thurlow-9.example.com", + "id": "2f735e3d-be14-483b-9822-bad06e9045ca", + "ip": [ + "10.46.229.234" + ], + "mac": [ + "30-8c-45-55-69-b8", + "e5-36-7e-8f-a3-84", + "39-a1-37-20-18-74" + ], + "os": { + "full": "Windows Server 2012R2", + "name": "windows 6.3", + "version": "6.3", + "variant" : "Windows Server 2012 R2" + } + } + } + } +} + +{ + "type": "doc", + "value": { + "id": "5KVN2G8BYQH1gtPUuYk7", + "index": "endpoint-agent-1", + "source": { + "@timestamp": 1579874769541, + "agent": { + "id": "3838df35-a095-4af4-8fce-0b6d78793f2e", + "version": "6.8.0", + "name" : "Elastic Endpoint" + }, + "endpoint": { + "policy": { + "id": "00000000-0000-0000-0000-000000000000" + } + }, + "event": { + "created": 1579874769541 + }, + "host": { + "architecture": "x86", + "hostname": "rezzani-7.example.com", + "id": "fc0ff548-feba-41b6-8367-65e8790d0eaf", + "ip": [ + "10.101.149.26", + "2606:a000:ffc0:39:11ef:37b9:3371:578c" + ], + "mac": [ + "e2-6d-f9-0-46-2e" + ], + "os": { + "full": "Windows Server 2012", + "name": "windows 6.2", + "version": "6.2", + "variant" : "Windows Server 2012" + } + } + } + } +} \ No newline at end of file diff --git a/x-pack/test/functional/es_archives/endpoint/metadata/api_feature/data.json.gz b/x-pack/test/functional/es_archives/endpoint/metadata/api_feature/data.json.gz deleted file mode 100644 index 94a96c54ee9cb..0000000000000 Binary files a/x-pack/test/functional/es_archives/endpoint/metadata/api_feature/data.json.gz and /dev/null differ diff --git a/x-pack/test/functional/page_objects/endpoint_page.ts b/x-pack/test/functional/page_objects/endpoint_page.ts index 4becbf797abc0..bb98adabca23d 100644 --- a/x-pack/test/functional/page_objects/endpoint_page.ts +++ b/x-pack/test/functional/page_objects/endpoint_page.ts @@ -70,6 +70,13 @@ export function EndpointPageProvider({ getService }: FtrProviderContext) { }); }, + async waitForVisibleTextToChange(dataTestSubj: string, currentText: string) { + await retry.waitForWithTimeout('visible text to change', 2000, async () => { + const detailFlyoutTitle = await testSubjects.getVisibleText(dataTestSubj); + return detailFlyoutTitle !== currentText; + }); + }, + async hostFlyoutDescriptionKeys(dataTestSubj: string) { await testSubjects.exists(dataTestSubj); const detailsData: WebElementWrapper = await testSubjects.find(dataTestSubj); diff --git a/x-pack/test/functional/page_objects/uptime_page.ts b/x-pack/test/functional/page_objects/uptime_page.ts index 0b8e994ba8095..fcf2b77dbd624 100644 --- a/x-pack/test/functional/page_objects/uptime_page.ts +++ b/x-pack/test/functional/page_objects/uptime_page.ts @@ -9,14 +9,10 @@ import { FtrProviderContext } from '../ftr_provider_context'; export function UptimePageProvider({ getPageObjects, getService }: FtrProviderContext) { const pageObjects = getPageObjects(['common', 'timePicker']); - const uptimeService = getService('uptime'); + const { common: commonService, navigation, alerts } = getService('uptime'); const retry = getService('retry'); return new (class UptimePage { - public get settings() { - return uptimeService.settings; - } - public async goToRoot() { await pageObjects.common.navigateToApp('uptime'); } @@ -37,7 +33,7 @@ export function UptimePageProvider({ getPageObjects, getService }: FtrProviderCo await pageObjects.common.navigateToApp('uptime'); await pageObjects.timePicker.setAbsoluteRange(datePickerStartValue, datePickerEndValue); if (monitorIdToCheck) { - await uptimeService.monitorIdExists(monitorIdToCheck); + await commonService.monitorIdExists(monitorIdToCheck); } } @@ -47,50 +43,43 @@ export function UptimePageProvider({ getPageObjects, getService }: FtrProviderCo monitorId: string, monitorName?: string ) { - await pageObjects.common.navigateToApp('uptime'); await pageObjects.timePicker.setAbsoluteRange(datePickerStartValue, datePickerEndValue); - await uptimeService.navigateToMonitorWithId(monitorId); - if ( - monitorName && - (await uptimeService.getMonitorNameDisplayedOnPageTitle()) !== monitorName - ) { - throw new Error('Expected monitor name not found'); - } + await navigation.goToMonitor(monitorId, monitorName); } public async inputFilterQuery(filterQuery: string) { - await uptimeService.setFilterText(filterQuery); + await commonService.setFilterText(filterQuery); } public async pageHasDataMissing() { - return await uptimeService.pageHasDataMissing(); + return await commonService.pageHasDataMissing(); } public async pageHasExpectedIds(monitorIdsToCheck: string[]): Promise { return retry.tryForTime(15000, async () => { - await Promise.all(monitorIdsToCheck.map(id => uptimeService.monitorPageLinkExists(id))); + await Promise.all(monitorIdsToCheck.map(id => commonService.monitorPageLinkExists(id))); }); } public async pageUrlContains(value: string, expected: boolean = true): Promise { return retry.tryForTime(12000, async () => { - expect(await uptimeService.urlContains(value)).to.eql(expected); + expect(await commonService.urlContains(value)).to.eql(expected); }); } public async changePage(direction: 'next' | 'prev') { if (direction === 'next') { - await uptimeService.goToNextPage(); + await commonService.goToNextPage(); } else if (direction === 'prev') { - await uptimeService.goToPreviousPage(); + await commonService.goToPreviousPage(); } } public async setStatusFilter(value: 'up' | 'down') { if (value === 'up') { - await uptimeService.setStatusFilterUp(); + await commonService.setStatusFilterUp(); } else if (value === 'down') { - await uptimeService.setStatusFilterDown(); + await commonService.setStatusFilterDown(); } } @@ -99,18 +88,14 @@ export function UptimePageProvider({ getPageObjects, getService }: FtrProviderCo if (filters.hasOwnProperty(key)) { const values = filters[key]; for (let i = 0; i < values.length; i++) { - await uptimeService.selectFilterItem(key, values[i]); + await commonService.selectFilterItem(key, values[i]); } } } } public async getSnapshotCount() { - return await uptimeService.getSnapshotCount(); - } - - public locationMissingIsDisplayed() { - return uptimeService.locationMissingExists(); + return await commonService.getSnapshotCount(); } public async openAlertFlyoutAndCreateMonitorStatusAlert({ @@ -130,7 +115,7 @@ export function UptimePageProvider({ getPageObjects, getService }: FtrProviderCo alertTimerangeSelection: string; filters?: string; }) { - const { alerts, setKueryBarText } = uptimeService; + const { setKueryBarText } = commonService; await alerts.openFlyout(); await alerts.openMonitorStatusAlertType(); await alerts.setAlertName(alertName); @@ -148,8 +133,8 @@ export function UptimePageProvider({ getPageObjects, getService }: FtrProviderCo } public async setMonitorListPageSize(size: number): Promise { - await uptimeService.openPageSizeSelectPopover(); - return uptimeService.clickPageSizeSelectPopoverItem(size); + await commonService.openPageSizeSelectPopover(); + return commonService.clickPageSizeSelectPopoverItem(size); } })(); } diff --git a/x-pack/test/functional/services/uptime.ts b/x-pack/test/functional/services/uptime.ts deleted file mode 100644 index 5a24a51f967fd..0000000000000 --- a/x-pack/test/functional/services/uptime.ts +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { FtrProviderContext } from '../ftr_provider_context'; - -export function UptimeProvider({ getService }: FtrProviderContext) { - const testSubjects = getService('testSubjects'); - const browser = getService('browser'); - const retry = getService('retry'); - - const settings = { - go: async () => { - await testSubjects.click('settings-page-link', 5000); - }, - changeHeartbeatIndicesInput: async (text: string) => { - const input = await testSubjects.find('heartbeat-indices-input-loaded', 5000); - await input.clearValueWithKeyboard(); - await input.type(text); - }, - loadFields: async () => { - const input = await testSubjects.find('heartbeat-indices-input-loaded', 5000); - const heartbeatIndices = await input.getAttribute('value'); - - return { heartbeatIndices }; - }, - applyButtonIsDisabled: async () => { - return !!(await (await testSubjects.find('apply-settings-button')).getAttribute('disabled')); - }, - apply: async () => { - await (await testSubjects.find('apply-settings-button')).click(); - await retry.waitFor('submit to succeed', async () => { - // When the form submit is complete the form will no longer be disabled - const disabled = await ( - await testSubjects.find('heartbeat-indices-input-loaded', 5000) - ).getAttribute('disabled'); - return disabled === null; - }); - }, - }; - - return { - settings, - alerts: { - async openFlyout() { - await testSubjects.click('xpack.uptime.alertsPopover.toggleButton', 5000); - await testSubjects.click('xpack.uptime.toggleAlertFlyout', 5000); - }, - async openMonitorStatusAlertType() { - return testSubjects.click('xpack.uptime.alerts.monitorStatus-SelectOption', 5000); - }, - async setAlertTags(tags: string[]) { - for (let i = 0; i < tags.length; i += 1) { - await testSubjects.click('comboBoxSearchInput', 5000); - await testSubjects.setValue('comboBoxInput', tags[i]); - await browser.pressKeys(browser.keys.ENTER); - } - }, - async setAlertName(name: string) { - return testSubjects.setValue('alertNameInput', name); - }, - async setAlertInterval(value: string) { - return testSubjects.setValue('intervalInput', value); - }, - async setAlertThrottleInterval(value: string) { - return testSubjects.setValue('throttleInput', value); - }, - async setAlertExpressionValue( - expressionAttribute: string, - fieldAttribute: string, - value: string - ) { - await testSubjects.click(expressionAttribute); - await testSubjects.setValue(fieldAttribute, value); - return browser.pressKeys(browser.keys.ESCAPE); - }, - async setAlertStatusNumTimes(value: string) { - return this.setAlertExpressionValue( - 'xpack.uptime.alerts.monitorStatus.numTimesExpression', - 'xpack.uptime.alerts.monitorStatus.numTimesField', - value - ); - }, - async setAlertTimerangeSelection(value: string) { - return this.setAlertExpressionValue( - 'xpack.uptime.alerts.monitorStatus.timerangeValueExpression', - 'xpack.uptime.alerts.monitorStatus.timerangeValueField', - value - ); - }, - async setAlertExpressionSelectable( - expressionAttribute: string, - selectableAttribute: string, - optionAttributes: string[] - ) { - await testSubjects.click(expressionAttribute, 5000); - await testSubjects.click(selectableAttribute, 5000); - for (let i = 0; i < optionAttributes.length; i += 1) { - await testSubjects.click(optionAttributes[i], 5000); - } - return browser.pressKeys(browser.keys.ESCAPE); - }, - async setMonitorStatusSelectableToHours() { - return this.setAlertExpressionSelectable( - 'xpack.uptime.alerts.monitorStatus.timerangeUnitExpression', - 'xpack.uptime.alerts.monitorStatus.timerangeUnitSelectable', - ['xpack.uptime.alerts.monitorStatus.timerangeUnitSelectable.hoursOption'] - ); - }, - async setLocationsSelectable() { - await testSubjects.click( - 'xpack.uptime.alerts.monitorStatus.locationsSelectionExpression', - 5000 - ); - await testSubjects.click( - 'xpack.uptime.alerts.monitorStatus.locationsSelectionSwitch', - 5000 - ); - await testSubjects.click( - 'xpack.uptime.alerts.monitorStatus.locationsSelectionSelectable', - 5000 - ); - return browser.pressKeys(browser.keys.ESCAPE); - }, - async clickSaveAlertButtion() { - return testSubjects.click('saveAlertButton'); - }, - }, - async assertExists(key: string) { - if (!(await testSubjects.exists(key))) { - throw new Error(`Couldn't find expected element with key "${key}".`); - } - }, - async monitorIdExists(key: string) { - await retry.tryForTime(10000, async () => { - await testSubjects.existOrFail(key); - }); - }, - async monitorPageLinkExists(monitorId: string) { - await testSubjects.existOrFail(`monitor-page-link-${monitorId}`); - }, - async urlContains(expected: string) { - const url = await browser.getCurrentUrl(); - return url.indexOf(expected) >= 0; - }, - async navigateToMonitorWithId(monitorId: string) { - await testSubjects.click(`monitor-page-link-${monitorId}`, 5000); - }, - async getMonitorNameDisplayedOnPageTitle() { - return await testSubjects.getVisibleText('monitor-page-title'); - }, - async pageHasDataMissing() { - return await testSubjects.find('data-missing', 5000); - }, - async setKueryBarText(attribute: string, value: string) { - await testSubjects.click(attribute); - await testSubjects.setValue(attribute, value); - await browser.pressKeys(browser.keys.ENTER); - }, - async setFilterText(filterQuery: string) { - await this.setKueryBarText('xpack.uptime.filterBar', filterQuery); - }, - async goToNextPage() { - await testSubjects.click('xpack.uptime.monitorList.nextButton', 5000); - }, - async goToPreviousPage() { - await testSubjects.click('xpack.uptime.monitorList.prevButton', 5000); - }, - async setStatusFilterUp() { - await testSubjects.click('xpack.uptime.filterBar.filterStatusUp'); - }, - async setStatusFilterDown() { - await testSubjects.click('xpack.uptime.filterBar.filterStatusDown'); - }, - async selectFilterItem(filterType: string, option: string) { - const popoverId = `filter-popover_${filterType}`; - const optionId = `filter-popover-item_${option}`; - await testSubjects.existOrFail(popoverId); - await testSubjects.click(popoverId); - await testSubjects.existOrFail(optionId); - await testSubjects.click(optionId); - await testSubjects.click(popoverId); - }, - async getSnapshotCount() { - return { - up: await testSubjects.getVisibleText('xpack.uptime.snapshot.donutChart.up'), - down: await testSubjects.getVisibleText('xpack.uptime.snapshot.donutChart.down'), - }; - }, - async locationMissingExists() { - return await testSubjects.existOrFail('xpack.uptime.locationMap.locationMissing', { - timeout: 3000, - }); - }, - async openPageSizeSelectPopover(): Promise { - return testSubjects.click('xpack.uptime.monitorList.pageSizeSelect.popoverOpen', 5000); - }, - async clickPageSizeSelectPopoverItem(size: number = 10): Promise { - return testSubjects.click( - `xpack.uptime.monitorList.pageSizeSelect.sizeSelectItem${size.toString()}`, - 5000 - ); - }, - }; -} diff --git a/x-pack/test/functional/services/uptime/alerts.ts b/x-pack/test/functional/services/uptime/alerts.ts new file mode 100644 index 0000000000000..5ee444adec82f --- /dev/null +++ b/x-pack/test/functional/services/uptime/alerts.ts @@ -0,0 +1,95 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function UptimeAlertsProvider({ getService }: FtrProviderContext) { + const testSubjects = getService('testSubjects'); + const browser = getService('browser'); + + return { + async openFlyout() { + await testSubjects.click('xpack.uptime.alertsPopover.toggleButton', 5000); + await testSubjects.click('xpack.uptime.toggleAlertFlyout', 5000); + }, + async openMonitorStatusAlertType() { + return testSubjects.click('xpack.uptime.alerts.monitorStatus-SelectOption', 5000); + }, + async setAlertTags(tags: string[]) { + for (let i = 0; i < tags.length; i += 1) { + await testSubjects.click('comboBoxSearchInput', 5000); + await testSubjects.setValue('comboBoxInput', tags[i]); + await browser.pressKeys(browser.keys.ENTER); + } + }, + async setAlertName(name: string) { + return testSubjects.setValue('alertNameInput', name); + }, + async setAlertInterval(value: string) { + return testSubjects.setValue('intervalInput', value); + }, + async setAlertThrottleInterval(value: string) { + return testSubjects.setValue('throttleInput', value); + }, + async setAlertExpressionValue( + expressionAttribute: string, + fieldAttribute: string, + value: string + ) { + await testSubjects.click(expressionAttribute); + await testSubjects.setValue(fieldAttribute, value); + return browser.pressKeys(browser.keys.ESCAPE); + }, + async setAlertStatusNumTimes(value: string) { + return this.setAlertExpressionValue( + 'xpack.uptime.alerts.monitorStatus.numTimesExpression', + 'xpack.uptime.alerts.monitorStatus.numTimesField', + value + ); + }, + async setAlertTimerangeSelection(value: string) { + return this.setAlertExpressionValue( + 'xpack.uptime.alerts.monitorStatus.timerangeValueExpression', + 'xpack.uptime.alerts.monitorStatus.timerangeValueField', + value + ); + }, + async setAlertExpressionSelectable( + expressionAttribute: string, + selectableAttribute: string, + optionAttributes: string[] + ) { + await testSubjects.click(expressionAttribute, 5000); + await testSubjects.click(selectableAttribute, 5000); + for (let i = 0; i < optionAttributes.length; i += 1) { + await testSubjects.click(optionAttributes[i], 5000); + } + return browser.pressKeys(browser.keys.ESCAPE); + }, + async setMonitorStatusSelectableToHours() { + return this.setAlertExpressionSelectable( + 'xpack.uptime.alerts.monitorStatus.timerangeUnitExpression', + 'xpack.uptime.alerts.monitorStatus.timerangeUnitSelectable', + ['xpack.uptime.alerts.monitorStatus.timerangeUnitSelectable.hoursOption'] + ); + }, + async setLocationsSelectable() { + await testSubjects.click( + 'xpack.uptime.alerts.monitorStatus.locationsSelectionExpression', + 5000 + ); + await testSubjects.click('xpack.uptime.alerts.monitorStatus.locationsSelectionSwitch', 5000); + await testSubjects.click( + 'xpack.uptime.alerts.monitorStatus.locationsSelectionSelectable', + 5000 + ); + return browser.pressKeys(browser.keys.ESCAPE); + }, + async clickSaveAlertButtion() { + return testSubjects.click('saveAlertButton'); + }, + }; +} diff --git a/x-pack/test/functional/services/uptime/common.ts b/x-pack/test/functional/services/uptime/common.ts new file mode 100644 index 0000000000000..ed465eee343f9 --- /dev/null +++ b/x-pack/test/functional/services/uptime/common.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; + * you may not use this file except in compliance with the Elastic License. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function UptimeCommonProvider({ getService }: FtrProviderContext) { + const testSubjects = getService('testSubjects'); + const browser = getService('browser'); + const retry = getService('retry'); + + return { + async assertExists(key: string) { + if (!(await testSubjects.exists(key))) { + throw new Error(`Couldn't find expected element with key "${key}".`); + } + }, + async monitorIdExists(key: string) { + await retry.tryForTime(10000, async () => { + await testSubjects.existOrFail(key); + }); + }, + async monitorPageLinkExists(monitorId: string) { + await testSubjects.existOrFail(`monitor-page-link-${monitorId}`); + }, + async urlContains(expected: string) { + const url = await browser.getCurrentUrl(); + return url.indexOf(expected) >= 0; + }, + async pageHasDataMissing() { + return await testSubjects.find('data-missing', 5000); + }, + async setKueryBarText(attribute: string, value: string) { + await testSubjects.click(attribute); + await testSubjects.setValue(attribute, value); + await browser.pressKeys(browser.keys.ENTER); + }, + async setFilterText(filterQuery: string) { + await this.setKueryBarText('xpack.uptime.filterBar', filterQuery); + }, + async goToNextPage() { + await testSubjects.click('xpack.uptime.monitorList.nextButton', 5000); + }, + async goToPreviousPage() { + await testSubjects.click('xpack.uptime.monitorList.prevButton', 5000); + }, + async setStatusFilterUp() { + await testSubjects.click('xpack.uptime.filterBar.filterStatusUp'); + }, + async setStatusFilterDown() { + await testSubjects.click('xpack.uptime.filterBar.filterStatusDown'); + }, + async selectFilterItem(filterType: string, option: string) { + const popoverId = `filter-popover_${filterType}`; + const optionId = `filter-popover-item_${option}`; + await testSubjects.existOrFail(popoverId); + await testSubjects.click(popoverId); + await testSubjects.existOrFail(optionId); + await testSubjects.click(optionId); + await testSubjects.click(popoverId); + }, + async getSnapshotCount() { + return { + up: await testSubjects.getVisibleText('xpack.uptime.snapshot.donutChart.up'), + down: await testSubjects.getVisibleText('xpack.uptime.snapshot.donutChart.down'), + }; + }, + async openPageSizeSelectPopover(): Promise { + return testSubjects.click('xpack.uptime.monitorList.pageSizeSelect.popoverOpen', 5000); + }, + async clickPageSizeSelectPopoverItem(size: number = 10): Promise { + return testSubjects.click( + `xpack.uptime.monitorList.pageSizeSelect.sizeSelectItem${size.toString()}`, + 5000 + ); + }, + }; +} diff --git a/x-pack/test/functional/services/uptime/index.ts b/x-pack/test/functional/services/uptime/index.ts new file mode 100644 index 0000000000000..57999066d038e --- /dev/null +++ b/x-pack/test/functional/services/uptime/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +export { UptimeProvider } from './uptime'; diff --git a/x-pack/test/functional/services/uptime/monitor.ts b/x-pack/test/functional/services/uptime/monitor.ts new file mode 100644 index 0000000000000..3bdec4b6749d4 --- /dev/null +++ b/x-pack/test/functional/services/uptime/monitor.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function UptimeMonitorProvider({ getService }: FtrProviderContext) { + const testSubjects = getService('testSubjects'); + const retry = getService('retry'); + const find = getService('find'); + + return { + async locationMissingExists() { + return await testSubjects.existOrFail('xpack.uptime.locationMap.locationMissing', { + timeout: 3000, + }); + }, + async locationMapIsRendered() { + return retry.tryForTime(15000, async () => { + await testSubjects.existOrFail('xpack.uptime.locationMap.embeddedPanel', { + timeout: 3000, + }); + const mapPanel = await testSubjects.find('xpack.uptime.locationMap.embeddedPanel'); + + await find.descendantExistsByCssSelector('canvas.mapboxgl-canvas', mapPanel); + }); + }, + }; +} diff --git a/x-pack/test/functional/services/uptime/navigation.ts b/x-pack/test/functional/services/uptime/navigation.ts new file mode 100644 index 0000000000000..c762ddf34be04 --- /dev/null +++ b/x-pack/test/functional/services/uptime/navigation.ts @@ -0,0 +1,45 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function UptimeNavigationProvider({ getService, getPageObjects }: FtrProviderContext) { + const retry = getService('retry'); + const testSubjects = getService('testSubjects'); + const PageObjects = getPageObjects(['common']); + + const goToUptimeRoot = async () => { + await retry.tryForTime(30 * 1000, async () => { + await PageObjects.common.navigateToApp('uptime'); + await testSubjects.existOrFail('uptimeOverviewPage', { timeout: 2000 }); + }); + }; + + return { + async goToUptime() { + await goToUptimeRoot(); + }, + + goToSettings: async () => { + await goToUptimeRoot(); + await testSubjects.click('settings-page-link', 5000); + await testSubjects.existOrFail('uptimeSettingsPage', { timeout: 2000 }); + }, + + goToMonitor: async (monitorId: string, monitorName?: string) => { + await testSubjects.click(`monitor-page-link-${monitorId}`, 5000); + if ( + monitorName && + (await testSubjects.getVisibleText('monitor-page-title')) !== monitorName + ) { + throw new Error('Expected monitor name not found'); + } + await testSubjects.existOrFail('uptimeMonitorPage', { + timeout: 30000, + }); + }, + }; +} diff --git a/x-pack/test/functional/services/uptime/settings.ts b/x-pack/test/functional/services/uptime/settings.ts new file mode 100644 index 0000000000000..a64d39cd62a6d --- /dev/null +++ b/x-pack/test/functional/services/uptime/settings.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export function UptimeSettingsProvider({ getService }: FtrProviderContext) { + const testSubjects = getService('testSubjects'); + const retry = getService('retry'); + + return { + go: async () => { + await testSubjects.click('settings-page-link', 5000); + }, + changeHeartbeatIndicesInput: async (text: string) => { + const input = await testSubjects.find('heartbeat-indices-input-loaded', 5000); + await input.clearValueWithKeyboard(); + await input.type(text); + }, + loadFields: async () => { + const input = await testSubjects.find('heartbeat-indices-input-loaded', 5000); + const heartbeatIndices = await input.getAttribute('value'); + + return { heartbeatIndices }; + }, + applyButtonIsDisabled: async () => { + return !!(await (await testSubjects.find('apply-settings-button')).getAttribute('disabled')); + }, + apply: async () => { + await (await testSubjects.find('apply-settings-button')).click(); + await retry.waitFor('submit to succeed', async () => { + // When the form submit is complete the form will no longer be disabled + const disabled = await ( + await testSubjects.find('heartbeat-indices-input-loaded', 5000) + ).getAttribute('disabled'); + return disabled === null; + }); + }, + }; +} diff --git a/x-pack/test/functional/services/uptime/uptime.ts b/x-pack/test/functional/services/uptime/uptime.ts new file mode 100644 index 0000000000000..c96bd0e0c4675 --- /dev/null +++ b/x-pack/test/functional/services/uptime/uptime.ts @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +import { UptimeSettingsProvider } from './settings'; +import { UptimeCommonProvider } from './common'; +import { UptimeMonitorProvider } from './monitor'; +import { UptimeNavigationProvider } from './navigation'; +import { UptimeAlertsProvider } from './alerts'; + +export function UptimeProvider(context: FtrProviderContext) { + const common = UptimeCommonProvider(context); + const settings = UptimeSettingsProvider(context); + const monitor = UptimeMonitorProvider(context); + const navigation = UptimeNavigationProvider(context); + const alerts = UptimeAlertsProvider(context); + + return { + common, + settings, + monitor, + navigation, + alerts, + }; +} diff --git a/yarn.lock b/yarn.lock index aa96a740cb3a9..a6b3154c89d05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1232,13 +1232,12 @@ once "^1.4.0" pump "^3.0.0" -"@elastic/ems-client@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@elastic/ems-client/-/ems-client-7.7.1.tgz#cda9277cb851b6d1aa0408fe2814de98f1474fb8" - integrity sha512-8ikEUbsM+wxENqi/cwrmo4+2vwZkVoFDPSIrw3bQG2mQaE3l+3w1eMPKxsvQq0r79ivzXJ51gkvr8CffBkBkGw== +"@elastic/ems-client@7.8.0": + version "7.8.0" + resolved "https://registry.yarnpkg.com/@elastic/ems-client/-/ems-client-7.8.0.tgz#8cc309bc8128c03a78e876b43bf04f4d2b4789c5" + integrity sha512-+6WjxZy/mhVWXTdSYjHd+ArsvH1s7GEummaGq9DlnCW6CyGIYkYxOISKpuytReeYhhMk7F06f/GKw+8ivi2zPQ== dependencies: lodash "^4.17.15" - node-fetch "^1.7.3" semver "^6.3.0" "@elastic/eslint-plugin-eui@0.0.2": @@ -2247,13 +2246,15 @@ supports-color "^5.4.0" tslib "^1" -"@oclif/command@1.5.16": - version "1.5.16" - resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.5.16.tgz#88b578d37e981034303effbcbdd73c332a6f5543" - integrity sha512-bzqNz9/EblkohokXbico/14r05oRe8aa06S3MLEo4GlmyOce2abIOx1oZfUDl8ekQuKO+Ycw9Jco+hN2aL423A== +"@oclif/command@1.5.19": + version "1.5.19" + resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.5.19.tgz#13f472450eb83bd6c6871a164c03eadb5e1a07ed" + integrity sha512-6+iaCMh/JXJaB2QWikqvGE9//wLEVYYwZd5sud8aLoLKog1Q75naZh2vlGVtg5Mq/NqpqGQvdIjJb3Bm+64AUQ== dependencies: + "@oclif/config" "^1" "@oclif/errors" "^1.2.2" - "@oclif/parser" "^3.7.3" + "@oclif/parser" "^3.8.3" + "@oclif/plugin-help" "^2" debug "^4.1.1" semver "^5.6.0" @@ -2300,6 +2301,15 @@ chalk "^2.4.2" tslib "^1.9.3" +"@oclif/parser@^3.8.3": + version "3.8.4" + resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.8.4.tgz#1a90fc770a42792e574fb896325618aebbe8c9e4" + integrity sha512-cyP1at3l42kQHZtqDS3KfTeyMvxITGwXwH1qk9ktBYvqgMp5h4vHT+cOD74ld3RqJUOZY/+Zi9lb4Tbza3BtuA== + dependencies: + "@oclif/linewrap" "^1.0.0" + chalk "^2.4.2" + tslib "^1.9.3" + "@oclif/plugin-help@^2": version "2.2.0" resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-2.2.0.tgz#8dfc1c80deae47a205fbc70b018747ba93f31cc3" @@ -2387,29 +2397,33 @@ universal-user-agent "^2.0.0" url-template "^2.0.8" -"@percy/agent@^0.11.0": - version "0.11.0" - resolved "https://registry.yarnpkg.com/@percy/agent/-/agent-0.11.0.tgz#70fa19c2649298ac318fce181713e366d5f687e0" - integrity sha512-i5BRRkeB+wfLnSWjiu82xiCKr7kC/ahg9uiKdtCHr+43fl6h9WIJSMRrfNeFxuT8sOTnRU0pdUQCT2O3+S9wlA== +"@percy/agent@^0.26.0": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@percy/agent/-/agent-0.26.0.tgz#9f06849d752df7368198835d0b5edc16c2d69a0c" + integrity sha512-PKah93vdcmHWlvDd2/QTir4iboqpLAcbAxhUDJYfp8rTzVy5kBstKyPrQk+8IifnGRWNSjsXOO6+qZr+cYHdjA== dependencies: - "@oclif/command" "1.5.16" + "@oclif/command" "1.5.19" "@oclif/config" "^1" "@oclif/plugin-help" "^2" "@oclif/plugin-not-found" "^1.2" - axios "^0.18.1" + axios "^0.19.0" body-parser "^1.18.3" colors "^1.3.2" cors "^2.8.4" + cosmiconfig "^5.2.1" cross-spawn "^6.0.5" deepmerge "^4.0.0" express "^4.16.3" + follow-redirects "1.9.0" generic-pool "^3.7.1" globby "^10.0.1" + image-size "^0.8.2" js-yaml "^3.13.1" - percy-client "^3.0.3" - puppeteer "^1.13.0" + percy-client "^3.2.0" + puppeteer "^2.0.0" retry-axios "^1.0.1" - winston "^2.0.0" + which "^2.0.1" + winston "^3.0.0" "@reach/router@^1.2.1": version "1.2.1" @@ -4221,6 +4235,11 @@ resolved "https://registry.yarnpkg.com/@types/mime-db/-/mime-db-1.27.0.tgz#9bc014a1fd1fdf47649c1a54c6dd7966b8284792" integrity sha1-m8AUof0f30dknBpUxt15ZrgoR5I= +"@types/mime-types@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.0.tgz#9ca52cda363f699c69466c2a6ccdaad913ea7a73" + integrity sha1-nKUs2jY/aZxpRmwqbM2q2RPqenM= + "@types/mime@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d" @@ -4603,6 +4622,11 @@ "@types/tough-cookie" "*" form-data "^2.5.0" +"@types/retry@^0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" + integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== + "@types/seedrandom@>=2.0.0 <4.0.0": version "2.4.28" resolved "https://registry.yarnpkg.com/@types/seedrandom/-/seedrandom-2.4.28.tgz#9ce8fa048c1e8c85cb71d7fe4d704e000226036f" @@ -4914,11 +4938,6 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-13.0.0.tgz#453743c5bbf9f1bed61d959baab5b06be029b2d0" integrity sha512-wBlsw+8n21e6eTd4yVv8YD/E3xq0O6nNnJIquutAsFGE7EyMKz7W6RNT6BRu1SmdgmlCZ9tb0X+j+D6HGr8pZw== -"@types/yargs-parser@^13.1.0": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-13.1.0.tgz#c563aa192f39350a1d18da36c5a8da382bbd8228" - integrity sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg== - "@types/yargs@^12.0.9": version "12.0.10" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.10.tgz#17a8ec65cd8e88f51b418ceb271af18d3137df67" @@ -5402,6 +5421,11 @@ agent-base@4: dependencies: es6-promisify "^5.0.0" +agent-base@5: + version "5.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" + integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== + agent-base@6: version "6.0.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a" @@ -6103,11 +6127,6 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - argparse@^1.0.7, argparse@~1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -6529,11 +6548,6 @@ async@^3.1.0: resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== -async@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9" - integrity sha1-+PwEyjoTeErenhZBr5hXjPvWR6k= - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -6609,7 +6623,7 @@ axe-core@^3.4.1: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-3.5.1.tgz#d8d5aaef73f003e8b766ea28bb078343f3622201" integrity sha512-mwpDgPwWB+5kMHyLjlxh4w25ClJfqSxi+c6LQ4ix349TdCUctMwJNPTkhPD1qP9SYIjFgjeVpVZWCvK9oBGwCg== -axios@^0.18.0, axios@^0.18.1: +axios@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== @@ -7182,25 +7196,24 @@ backo2@1.0.2: resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= -backport@4.9.0: - version "4.9.0" - resolved "https://registry.yarnpkg.com/backport/-/backport-4.9.0.tgz#01ca46af57f33f582801e20ef2111b8a2710f8fc" - integrity sha512-PueA741RIv3mK4mrCoTBa0oB4WTJOOkXlSXQojL/jBqZBfHQ8MRsW8qDygVe/Q9Z6na4gqqieMOZA8qHn8GVVw== +backport@5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/backport/-/backport-5.1.2.tgz#d9be0b0f89e5140fdcc778158db00beef92481ec" + integrity sha512-CexygdCdhUR7Br16CNUo/bfgvoa6ItKoEWJ9oPIFeIONWatYV2NA7U3uMpn74qmuJkDmrOi9SmDutxg96+qWPw== dependencies: - "@types/yargs-parser" "^13.1.0" - axios "^0.19.0" + axios "^0.19.2" + dedent "^0.7.0" del "^5.1.0" find-up "^4.1.0" - inquirer "^7.0.0" - lodash.flatten "^4.4.0" - lodash.get "^4.4.2" + inquirer "^7.1.0" lodash.isempty "^4.4.0" lodash.isstring "^4.0.1" - make-dir "^3.0.0" - ora "^3.4.0" + lodash.uniq "^4.5.0" + make-dir "^3.0.2" + ora "^4.0.3" strip-json-comments "^3.0.1" winston "^3.2.1" - yargs "^14.2.0" + yargs "^15.3.1" bail@^1.0.0: version "1.0.2" @@ -7232,11 +7245,6 @@ base64-js@^1.2.1, base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== -base64-js@^1.2.3: - version "1.3.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" - integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== - base64id@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/base64id/-/base64id-1.0.0.tgz#47688cb99bb6804f0e06d3e763b1c32e57d8e6b6" @@ -8727,6 +8735,11 @@ cli-spinners@^2.0.0: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.1.0.tgz#22c34b4d51f573240885b201efda4e4ec9fff3c7" integrity sha512-8B00fJOEh1HPrx4fo5eW16XmE1PcL1tGpGrxy63CXGP9nHdPBN63X75hA1zhvQuhVztJWLqV58Roj2qlNM7cAA== +cli-spinners@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.2.0.tgz#e8b988d9206c692302d8ee834e7a85c0144d8f77" + integrity sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ== + cli-table3@0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" @@ -9049,7 +9062,7 @@ colornames@^1.1.1: resolved "https://registry.yarnpkg.com/colornames/-/colornames-1.1.1.tgz#f8889030685c7c4ff9e2a559f5077eb76a816f96" integrity sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y= -colors@1.0.3, colors@1.0.x: +colors@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= @@ -9677,7 +9690,7 @@ cosmiconfig@^5.0.5: js-yaml "^3.9.0" parse-json "^4.0.0" -cosmiconfig@^5.2.0: +cosmiconfig@^5.2.0, cosmiconfig@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== @@ -10167,11 +10180,6 @@ custom-event@~1.0.0: resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" integrity sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU= -cycle@1.0.x: - version "1.0.3" - resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2" - integrity sha1-IegLK+hYD5i0aPN5QwZisEbDStI= - cyclist@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" @@ -10579,7 +10587,7 @@ debug@3.1.0, debug@=3.1.0, debug@~3.1.0: dependencies: ms "2.0.0" -debug@3.2.6, debug@3.X, debug@^3.1.0, debug@^3.2.5, debug@^3.2.6: +debug@3.2.6, debug@3.X, debug@^3.0.0, debug@^3.1.0, debug@^3.2.5, debug@^3.2.6: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -11365,6 +11373,11 @@ dotenv@^8.0.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.1.0.tgz#d811e178652bfb8a1e593c6dd704ec7e90d85ea2" integrity sha512-GUE3gqcDCaMltj2++g6bRQ5rBJWtkWTmqmD0fo1RnnMuUqHNCt2oTPeDnS9n6fKYvlhn7AeBkb38lymBtWBQdA== +dotenv@^8.1.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + dotignore@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/dotignore/-/dotignore-0.1.2.tgz#f942f2200d28c3a76fbdd6f0ee9f3257c8a2e905" @@ -13025,11 +13038,6 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -eyes@0.1.x: - version "0.1.8" - resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0" - integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A= - faker@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/faker/-/faker-1.1.0.tgz#230738ebd37edad9de4a421de12922bd8206a872" @@ -13659,6 +13667,13 @@ follow-redirects@1.5.10: dependencies: debug "=3.1.0" +follow-redirects@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.9.0.tgz#8d5bcdc65b7108fe1508649c79c12d732dcedb4f" + integrity sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A== + dependencies: + debug "^3.0.0" + follow-redirects@^1.0.0: version "1.7.0" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.7.0.tgz#489ebc198dc0e7f64167bd23b03c4c19b5784c76" @@ -15937,6 +15952,14 @@ https-proxy-agent@2.2.1, https-proxy-agent@^2.2.1: agent-base "^4.1.0" debug "^3.1.0" +https-proxy-agent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" + integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== + dependencies: + agent-base "5" + debug "4" + https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -16070,6 +16093,13 @@ ignore@^5.1.1: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.2.tgz#e28e584d43ad7e92f96995019cc43b9e1ac49558" integrity sha512-vdqWBp7MyzdmHkkRWV5nY+PfGRbYbahfuvsBCh277tq+w9zyNi7h5CYJCK0kmzti9kU+O/cB7sE8HvKv6aXAKQ== +image-size@^0.8.2: + version "0.8.3" + resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.8.3.tgz#f0b568857e034f29baffd37013587f2c0cad8b46" + integrity sha512-SMtq1AJ+aqHB45c3FsB4ERK0UCiA2d3H1uq8s+8T0Pf8A3W4teyBQyaFaktH6xvZqh+npwlKU7i4fJo0r7TYTg== + dependencies: + queue "6.0.1" + image-size@~0.5.0: version "0.5.5" resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" @@ -16429,6 +16459,25 @@ inquirer@^7.0.0: strip-ansi "^5.1.0" through "^2.3.6" +inquirer@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" + integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== + dependencies: + ansi-escapes "^4.2.1" + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.5.3" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + insight@0.10.1: version "0.10.1" resolved "https://registry.yarnpkg.com/insight/-/insight-0.10.1.tgz#a0ecf668484a95d66e9be59644964e719cc83380" @@ -16851,6 +16900,11 @@ is-integer@^1.0.6: dependencies: is-finite "^1.0.0" +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + is-invalid-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-invalid-path/-/is-invalid-path-0.1.0.tgz#307a855b3cf1a938b44ea70d2c61106053714f34" @@ -17281,7 +17335,7 @@ isomorphic-fetch@^2.1.1: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" -isstream@0.1.x, isstream@~0.1.2: +isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= @@ -19322,7 +19376,7 @@ log-symbols@2.2.0, log-symbols@^2.0.0, log-symbols@^2.1.0, log-symbols@^2.2.0: dependencies: chalk "^2.0.1" -log-symbols@3.0.0: +log-symbols@3.0.0, log-symbols@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== @@ -19555,10 +19609,12 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +make-dir@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" + integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== + dependencies: + semver "^6.0.0" make-iterator@^1.0.0: version "1.0.0" @@ -20051,6 +20107,13 @@ mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19: dependencies: mime-db "~1.37.0" +mime-types@^2.1.25, mime-types@~2.1.7: + version "2.1.26" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" + integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + dependencies: + mime-db "1.43.0" + mime-types@~2.1.24: version "2.1.24" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" @@ -20058,13 +20121,6 @@ mime-types@~2.1.24: dependencies: mime-db "1.40.0" -mime-types@~2.1.7: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== - dependencies: - mime-db "1.43.0" - mime@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" @@ -20855,7 +20911,7 @@ node-environment-flags@1.0.6: object.getownpropertydescriptors "^2.0.3" semver "^5.7.0" -node-fetch@1.7.3, node-fetch@^1.0.1, node-fetch@^1.7.3: +node-fetch@1.7.3, node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== @@ -21688,7 +21744,7 @@ ora@^1.3.0, ora@^1.4.0: cli-spinners "^1.0.1" log-symbols "^2.1.0" -ora@^3.0.0, ora@^3.4.0: +ora@^3.0.0: version "3.4.0" resolved "https://registry.yarnpkg.com/ora/-/ora-3.4.0.tgz#bf0752491059a3ef3ed4c85097531de9fdbcd318" integrity sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg== @@ -21700,6 +21756,20 @@ ora@^3.0.0, ora@^3.4.0: strip-ansi "^5.2.0" wcwidth "^1.0.1" +ora@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/ora/-/ora-4.0.3.tgz#752a1b7b4be4825546a7a3d59256fa523b6b6d05" + integrity sha512-fnDebVFyz309A73cqCipVL1fBZewq4vwgSHfxh43vVy31mbyoQ8sCH3Oeaog/owYOs/lLlGVPCISQonTneg6Pg== + dependencies: + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + mute-stream "0.0.8" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + ordered-read-streams@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" @@ -21924,6 +21994,14 @@ p-retry@^3.0.1: dependencies: retry "^0.12.0" +p-retry@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.2.0.tgz#ea9066c6b44f23cab4cd42f6147cdbbc6604da5d" + integrity sha512-jPH38/MRh263KKcq0wBNOGFJbm+U6784RilTmHjB/HM9kH9V8WlCpVUcdOmip9cjXOh6MxZ5yk1z2SjDUJfWmA== + dependencies: + "@types/retry" "^0.12.0" + retry "^0.12.0" + p-some@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/p-some/-/p-some-2.0.1.tgz#65d87c8b154edbcf5221d167778b6d2e150f6f06" @@ -22450,14 +22528,14 @@ pend@~1.2.0: resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= -percy-client@^3.0.3: - version "3.0.12" - resolved "https://registry.yarnpkg.com/percy-client/-/percy-client-3.0.12.tgz#325e7fded4860e61b8f219aa1a3653e72cbb1280" - integrity sha512-xpddmKn0C/nDDOJYP5dSfAefYzcge8P0FoZB2y1vWyZl587TAkdJCkG6/CF04QYfIfBxLYh4RV0G/h++LgxyzA== +percy-client@^3.2.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/percy-client/-/percy-client-3.7.0.tgz#780e7d780c7f646e59ffb6ee9d3d16e8237851ff" + integrity sha512-5levWR/nfVuSDL9YPN9Sn1M41I2/FmC/FndhD84s6W+mrVC4mB0cc9cT9F58hLuh7/133I/YvyI9Vc6NN41+2g== dependencies: - base64-js "^1.2.3" bluebird "^3.5.1" bluebird-retry "^0.11.0" + dotenv "^8.1.0" es6-promise-pool "^2.5.0" jssha "^2.1.0" regenerator-runtime "^0.13.1" @@ -23334,15 +23412,17 @@ puppeteer-core@^1.19.0: rimraf "^2.6.1" ws "^6.1.0" -puppeteer@^1.13.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.17.0.tgz#371957d227a2f450fa74b78e78a2dadb2be7f14f" - integrity sha512-3EXZSximCzxuVKpIHtyec8Wm2dWZn1fc5tQi34qWfiUgubEVYHjUvr0GOJojqf3mifI6oyKnCdrGxaOI+lWReA== +puppeteer@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-2.1.1.tgz#ccde47c2a688f131883b50f2d697bd25189da27e" + integrity sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg== dependencies: + "@types/mime-types" "^2.1.0" debug "^4.1.0" extract-zip "^1.6.6" - https-proxy-agent "^2.2.1" + https-proxy-agent "^4.0.0" mime "^2.0.3" + mime-types "^2.1.25" progress "^2.0.1" proxy-from-env "^1.0.0" rimraf "^2.6.1" @@ -23415,6 +23495,13 @@ querystringify@^2.1.1: resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA== +queue@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/queue/-/queue-6.0.1.tgz#abd5a5b0376912f070a25729e0b6a7d565683791" + integrity sha512-AJBQabRCCNr9ANq8v77RJEv73DPbn55cdTb+Giq4X0AVnNVZvMHlYp7XlQiN+1npCZj1DuSmaA2hYVUUDgxFDg== + dependencies: + inherits "~2.0.3" + quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" @@ -25817,6 +25904,13 @@ run-async@^2.0.0, run-async@^2.2.0: dependencies: is-promise "^2.1.0" +run-async@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" + integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== + dependencies: + is-promise "^2.1.0" + run-parallel@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" @@ -28798,17 +28892,6 @@ ts-log@2.1.4: resolved "https://registry.yarnpkg.com/ts-log/-/ts-log-2.1.4.tgz#063c5ad1cbab5d49d258d18015963489fb6fb59a" integrity sha512-P1EJSoyV+N3bR/IWFeAqXzKPZwHpnLY6j7j58mAvewHRipo+BQM2Y1f9Y9BjEQznKwgqqZm7H8iuixmssU7tYQ== -ts-node@^8.8.1: - version "8.8.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.8.1.tgz#7c4d3e9ed33aa703b64b28d7f9d194768be5064d" - integrity sha512-10DE9ONho06QORKAaCBpPiFCdW+tZJuY/84tyypGtl6r+/C7Asq0dhqbRZURuUlLQtZxxDvT8eoj8cGW0ha6Bg== - dependencies: - arg "^4.1.0" - diff "^4.0.1" - make-error "^1.1.1" - source-map-support "^0.5.6" - yn "3.1.1" - ts-pnp@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.1.4.tgz#ae27126960ebaefb874c6d7fa4729729ab200d90" @@ -31202,7 +31285,7 @@ winston-transport@^4.3.0: readable-stream "^2.3.6" triple-beam "^1.2.0" -winston@3.2.1, winston@^3.2.1: +winston@3.2.1, winston@^3.0.0, winston@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/winston/-/winston-3.2.1.tgz#63061377976c73584028be2490a1846055f77f07" integrity sha512-zU6vgnS9dAWCEKg/QYigd6cgMVVNwyTzKs81XZtTFuRwJOcDdBg7AU0mXVyNbs7O5RH2zdv+BdNZUlx7mXPuOw== @@ -31217,18 +31300,6 @@ winston@3.2.1, winston@^3.2.1: triple-beam "^1.3.0" winston-transport "^4.3.0" -winston@^2.0.0: - version "2.4.4" - resolved "https://registry.yarnpkg.com/winston/-/winston-2.4.4.tgz#a01e4d1d0a103cf4eada6fc1f886b3110d71c34b" - integrity sha512-NBo2Pepn4hK4V01UfcWcDlmiVTs7VTB1h7bgnB0rgP146bYhMxX0ypCz3lBOfNxCO4Zuek7yeT+y/zM1OfMw4Q== - dependencies: - async "~1.0.0" - colors "1.0.x" - cycle "1.0.x" - eyes "0.1.x" - isstream "0.1.x" - stack-trace "0.0.x" - with@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/with/-/with-5.1.1.tgz#fa4daa92daf32c4ea94ed453c81f04686b575dfe" @@ -31641,14 +31712,6 @@ yargs-parser@^11.1.1: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^15.0.0: - version "15.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" - integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@^18.1.1: version "18.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.1.tgz#bf7407b915427fc760fcbbccc6c82b4f0ffcbd37" @@ -31793,23 +31856,6 @@ yargs@^13.2.2, yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.1" -yargs@^14.2.0: - version "14.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.0.tgz#f116a9242c4ed8668790b40759b4906c276e76c3" - integrity sha512-/is78VKbKs70bVZH7w4YaZea6xcJWOAwkhbR0CFuZBmYtfTYF0xjGJF43AYd8g2Uii1yJwmS5GR2vBmrc32sbg== - dependencies: - cliui "^5.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^15.0.0" - yargs@^15.3.1: version "15.3.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" @@ -32011,11 +32057,6 @@ yeoman-generator@1.1.1: user-home "^2.0.0" yeoman-environment "^1.1.0" -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - yo@2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/yo/-/yo-2.0.6.tgz#7b562f68a0434237c24a1fd3982f235035839516"