diff --git a/.eslintrc.js b/.eslintrc.js index 2381a3071913..90e789d38e58 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -459,7 +459,7 @@ module.exports = { * Files that run BEFORE node version check */ { - files: ['scripts/**/*.js', 'src/setup_node_env/**/*.js'], + files: ['scripts/**/*.js', 'src/setup_node_env/**/!(*.test).js'], rules: { 'import/no-commonjs': 'off', 'prefer-object-spread/prefer-object-spread': 'off', diff --git a/.github/workflows/add-untriaged.yml b/.github/workflows/add-untriaged.yml new file mode 100644 index 000000000000..9dcc7020d245 --- /dev/null +++ b/.github/workflows/add-untriaged.yml @@ -0,0 +1,19 @@ +name: Apply 'untriaged' label during issue lifecycle + +on: + issues: + types: [opened, reopened, transferred] + +jobs: + apply-label: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v6 + with: + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['untriaged'] + }) diff --git a/.github/workflows/build_and_test_workflow.yml b/.github/workflows/build_and_test_workflow.yml index f2e1f5759d52..7abc1e639e7d 100644 --- a/.github/workflows/build_and_test_workflow.yml +++ b/.github/workflows/build_and_test_workflow.yml @@ -451,7 +451,7 @@ jobs: working-directory: ./artifacts strategy: matrix: - version: [ osd-2.0.0, osd-2.1.0, osd-2.2.0, osd-2.3.0, osd-2.4.0 ] + version: [ osd-2.0.0, osd-2.1.0, osd-2.2.0, osd-2.3.0, osd-2.4.0, osd-2.5.0 ] steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/.node-version b/.node-version index 285152276014..f46d5e394243 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -14.20.1 +14.21.3 diff --git a/.nvmrc b/.nvmrc index 285152276014..f46d5e394243 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14.20.1 +14.21.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index c06ea5f0030c..b9734f3d1de6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [CVE-2022-35256] Bumps node version from 14.20.0 to 14.20.1 [#3166](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3166)) - [CVE-2022-46175] Bumps json5 version from 1.0.1 and 2.2.1 to 1.0.2 and 2.2.3 ([#3201](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3201)) - [CVE-2022-25860] Bumps simple-git from 3.15.1 to 3.16.0 ([#3345](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3345)) +- [Security] Bumps hapi/statehood to 7.0.4 ([#3411](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3411)) +- [CVE-2023-25166] Bump formula to 3.0.1 ([#3416](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3416)) +- [CVE-2023-25653] Bump node-jose to 2.2.0 ([#3445](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3445)) +- [CVE-2023-26486][CVE-2023-26487] Bump vega from 5.22.1 to 5.23.0 ([#3533](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3533)) ### ๐Ÿ“ˆ Features/Enhancements @@ -58,6 +62,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Optimizer] Increase timeout waiting for the exiting of an optimizer worker ([#3193](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3193)) - [Data] Update `createAggConfig` so that newly created configs can be added to beginning of `aggConfig` array ([#3160](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3160)) - Add disablePrototypePoisoningProtection configuration to prevent JS client from erroring when cluster utilizes JS reserved words ([#2992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2992)) +- [Multiple DataSource] Add support for SigV4 authentication ([#3058](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3058)) +- Make build scripts find and use the latest version of Node.js that satisfies `engines.node` ([#3467](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3467)) +- [Multiple DataSource] Refactor test connection to support SigV4 auth type ([#3456](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3456)) +- [Darwin] Add support for Darwin for running OpenSearch snapshots with `yarn opensearch snapshot` ([#3537](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3537)) ### ๐Ÿ› Bug Fixes @@ -93,6 +101,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [VisBuilder] Fixes pipeline aggs ([#3137](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3137)) - [Region Maps] Fixes bug that prevents selected join field to be used ([#3213](Fix bug that prevents selected join field to be used)) - [Multi DataSource]Update test connection button text([#3247](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3247)) +- [Region Maps] Add ui setting to configure custom vector map's size parameter([#3399](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3399)) +- [Search Telemetry] Fixes search telemetry's observable object that won't be GC-ed([#3390](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3390)) ### ๐Ÿšž Infrastructure @@ -104,6 +114,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Add recording of functional test artifacts if they fail ([#3190](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3190)) - Improve yarn's performance in workflows by caching yarn's cache folder ([#3194](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3194)) - Fix detection of Chrome's version on Darwin during CI ([#3296](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3296)) +- Upgrade yarn version to be compatible with @openearch-project/opensearch ([#3443](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3443)) ### ๐Ÿ“ Documentation @@ -115,6 +126,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Doc] Add readme for global query persistence ([#3001](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3001)) - Updates NOTICE file, adds validation to GitHub CI ([#3051](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3051)) - [Doc] Add current plugin persistence implementation readme ([#3081](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3081)) +- [Doc] Improve DEVELOPER_GUIDE to make first time setup quicker and easier ([#3421](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3421)) +- Correct copyright date range of NOTICE file and notice generator ([#3308](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3308)) +- Simplify the in-code instructions for upgrading `re2` ([#3328](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3328)) ### ๐Ÿ›  Maintenance @@ -123,6 +137,11 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Remove `github-checks-reporter`, an unused dependency ([#3126](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3126)) - Upgrade `vega-lite` dependency to ^5.6.0 ([#3076](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3076)) - Bumps `re2` and `supertest` ([3018](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3018)) +- Bump `vega-tooltip` version from ^0.24.2 to ^0.30.0 ([#3358](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3358)) +- Allow relaxing the Node.js runtime version requirement ([3402](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3402)) +- Relax the Node.js requirement to `^14.20.1` ([3463](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3463)) +- Bump the version of Node.js installed by `nvm` to `14.21.3` ([3463](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3463)) +- Remove the unused `renovate.json5` file ([3489](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3489)) ### ๐Ÿช› Refactoring @@ -141,6 +160,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Correct the linting logic for `no-restricted-path` to ignore trailing slashes ([#3020](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3020)) - [Tests] Bumps `chromedriver` to v107 ([#3017](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3017)) - [Vis Builder] Adds field unit tests ([#3211](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3211)) +- [BWC Tests] Add BWC tests for 2.6.0 ([#3356](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3356)) +- Prevent primitive linting limitations from being applied to unit tests found under `src/setup_node_env` ([#3403](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3403)) ## [2.x] @@ -160,6 +181,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [CVE-2022-37599] Bump loader-utils to 2.0.4 ([#3031](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3031)) - [CVE-2022-37603] Bump loader-utils to 2.0.4 ([#3031](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3031)) - [WS-2021-0638][security] bump mocha to 10.1.0 ([#2711](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2711)) +- [CVE-2022-25881] Resolve http-cache-semantics to 4.1.1 ([#3409](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3409)) ### ๐Ÿ“ˆ Features/Enhancements @@ -177,6 +199,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Viz Builder] Add index pattern info when loading embeddable ([#2363](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2363)) - Fixes management app breadcrumb error ([#2344](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2344)) - [BUG] Fix suggestion list cutoff issue ([#2607](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2607)) +- [TSVB] Fixes undefined serial diff aggregation documentation link ([#3503](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3503)) ### ๐Ÿšž Infrastructure @@ -191,6 +214,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Add sample config for multi data source feature in yml template. ([#2428](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2428)) - README.md for dataSource and dataSourceManagement Plugin ([#2448](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2448)) - Updates functionl testing information in Testing.md ([#2492](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2492)) +- Fixes typo in TSVB README ([#3518](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3518)) ### ๐Ÿ›  Maintenance @@ -205,6 +229,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### ๐Ÿ”ฉ Tests - Update caniuse to fix failed integration tests ([#2322](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2322)) +- Update caniuse to 1.0.30001460 to fix failed integration tests ([#3538](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3538)) [unreleased]: https://github.com/opensearch-project/OpenSearch-Dashboards/compare/2.3.0...HEAD [2.x]: https://github.com/opensearch-project/OpenSearch-Dashboards/compare/2.3.0...2.x diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index af3cce9f61a0..e06d67ce98e4 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -3,74 +3,198 @@ This guide applies to all development within the OpenSearch Dashboards project and is recommended for the development of all OpenSearch Dashboards plugins. -- [Getting Started](#getting-started) -- [General](#general) -- [HTML](#html) -- [API endpoints](#api-endpoints) -- [TypeScript/JavaScript](#typeScript/javaScript) -- [SASS files](#sass-files) -- [React](#react) +- [Getting started guide](#getting-started-guide) + - [Key technologies](#key-technologies) + - [Prerequisites](#prerequisites) + - [Fork and clone OpenSearch Dashboards](#fork-and-clone-opensearch-dashboards) + - [Bootstrap OpenSearch Dashboards](#bootstrap-opensearch-dashboards) + - [Run OpenSearch](#run-opensearch) + - [Run OpenSearch Dashboards](#run-opensearch-dashboards) + - [Next Steps](#next-steps) +- [Alternative development installations](#alternative-development-installations) + - [Optional - Run OpenSearch with plugins](#optional---run-opensearch-with-plugins) + - [Alternative - Run OpenSearch from tarball](#alternative---run-opensearch-from-tarball) + - [Configure OpenSearch Dashboards for security](#configure-opensearch-dashboards-for-security) +- [Building artifacts](#building-artifacts) + - [Building the Docker image](#building-the-docker-image) +- [Code guidelines](#code-guidelines) + - [General](#general) + - [HTML](#html) + - [SASS files](#sass-files) + - [TypeScript/JavaScript](#typescriptjavascript) + - [React](#react) + - [API endpoints](#api-endpoints) -Besides the content in this developer guide, the following developer guides may also apply to all development within the OpenSearch Dashboards project. Please make sure to also read them: +## Getting started guide -- [Accessibility developer guide (EUI Docs)](https://elastic.github.io/eui/#/guidelines/accessibility) -- [SASS developer guide (EUI Docs)](https://elastic.github.io/eui/#/guidelines/sass) +This guide is for any developer who wants a running local development environment where you can make, see, and test changes. It's opinionated to get you running as quickly and easily as possible, but it's not the only way to set up a development environment. -## Getting Started +If you're only interested in installing and running this project, please see the [Installing OpenSearch Dashboards](https://opensearch.org/docs/latest/install-and-configure/install-dashboards) instead. -If you would like to install and run this project, please see the [Downloads Page](https://opensearch.org/downloads.html). +If you're planning to contribute code (features or fixes) to this repository, great! Make sure to also read the [contributing guide](CONTRIBUTING.md). -#### Prerequisites +### Key technologies -We recommend using [Node Version Manager](https://github.com/nvm-sh/nvm) to install -the node version we need. +OpenSearch Dashboards is primarily a Node.js web application built using React. To effectively contribute you should be familiar with HTML ([usage guide](#html)), SASS styling ([usage guide](#sass-files)), TypeScript and JavaScript ([usage guide](#typescriptjavascript)), and React ([usage guide](#react)). + +### Prerequisites + +To develop on OpenSearch Dashboards, you'll need: + +- A [GitHub account](https://docs.github.com/en/get-started/onboarding/getting-started-with-your-github-account) +- [`git`](https://git-scm.com/) for version control +- [`Node.js`](https://nodejs.org/), [`npm`](https://www.npmjs.com/), and [`Yarn`](https://yarnpkg.com/) for building and running the project +- A code editor of your choice, configured for JavaScript/TypeScript. If you don't have a favorite editor, we suggest [Visual Studio Code](https://code.visualstudio.com/) + +If you already have these installed or have your own preferences for installing them, skip ahead to the [Fork and clone OpenSearch Dashboards](#fork-and-clone-opensearch-dashboards) section. + +#### Install `git` + +If you don't already have it installed (check with `git --version`) we recommend following the [the `git` installation guide for your OS](https://git-scm.com/downloads). + +#### Install `node` + +We recommend using [Node Version Manager (nvm)](https://github.com/nvm-sh/nvm) to install and manage different node versions, which may differ between release branches. + +1. Install nvm (as specified by the [`nvm` README](https://github.com/nvm-sh/nvm#installing-and-updating)): `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash` +2. Install the version of the Node.js runtime defined in [`.nvmrc`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/.nvmrc): `nvm install` + +If it's the only version of node installed, it will automatically be set to the `default` alias. Otherwise, use `nvm list` to see all installed `node` versions, and `nvm use` to select the node version required by OpenSearch Dashboards. + +#### Install `yarn` + +```bash +$ npm i -g corepack +``` + +(See the [Yarn installation documentation](https://yarnpkg.com/getting-started/install) for more information.) + +### Fork and clone OpenSearch Dashboards + +All local development should be done in a [forked repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo). +Fork OpenSearch Dashboards by clicking the "Fork" button at the top of the [GitHub repository](https://github.com/opensearch-project/OpenSearch-Dashboards). + +Clone your forked version of OpenSearch Dashboards to your local machine (replace `opensearch-project` in the command below with your GitHub username): + +```bash +$ git clone git@github.com:opensearch-project/OpenSearch-Dashboards.git +``` ### Bootstrap OpenSearch Dashboards -First we need to clone and bootstrap OpenSearch Dashboards: +If you haven't already, change directories to your cloned repository directory: + ```bash -$ git clone https://github.com/opensearch-project/OpenSearch-Dashboards.git $ cd OpenSearch-Dashboards -$ nvm use -$ npm i -g yarn -$ yarn osd bootstrap # This command will also install npm dependencies ``` -If you experience a network timeout while bootstrapping, you can update the timeout by configuring it in the `.yarnrc`. For example: +The `osd bootstrap` command will install the project's dependencies and build all internal packages and plugins. Bootstrapping is necessary any time you need to update packages, plugins, or dependencies, and it's recommended to run it anytime you sync with the latest upstream changes. + +```bash +$ yarn osd bootstrap +``` + +Note: If you experience a network timeout while bootstrapping, you can update the timeout by configuring it in the [`.yarnrc`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/.yarnrc). For example: + ``` network-timeout 1000000 ``` -### Configure OpenSearch Dashboards +If you've previously bootstrapped the project and need to start fresh, first run: -*This step is only mandatory if you have https/authentication enabled, or if you use the OpenSearch Docker image in its default configuration.* +```bash +$ yarn osd clean +``` -Once the bootstrap of OpenSearch Dashboards is finished, you need to apply some -changes to `opensearch_dashboards.yml` in order to connect to OpenSearch. +### Run OpenSearch -```yml -opensearch.hosts: ["https://localhost:9200"] -opensearch.username: "admin" # Default username on the docker image -opensearch.password: "admin" # Default password on the docker image -opensearch.ssl.verificationMode: none +OpenSearch Dashboards requires a running version of OpenSearch to connect to. In a separate terminal you can run the latest snapshot built using: + +_(Linux, Windows, Darwin (MacOS) only - for others, you'll need to [run OpenSearch from a tarball](#alternative---run-opensearch-from-tarball) instead)_ +```bash +$ yarn opensearch snapshot ``` -### Run OpenSearch +### Run OpenSearch Dashboards + +_**Warning:** Starting the OpenSearch Dashboards instance before the OpenSearch server is fully initialized can cause Dashboards to misbehave. Ensure that the OpenSearch server instance is up and running first. You can validate by running `curl localhost:9200` in another console tab or window (see [OpenSearch developer guide](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#run-opensearch))._ -You need to have an OpenSearch server up and running to be able to run OpenSearch -Dashboards. In a separate terminal you can run the latest snapshot built using: +Start the OpenSearch Dashboards development server: ```bash -$ yarn opensearch snapshot +$ yarn start ``` -If you would like to download a specific OpenSearch plugin on the cluster snapshot, pass the `--P` flag after `yarn opensearch snapshot`. We can use the flag multiple times to install multiple plugins on the cluster snapshot. The argument value can be URL to the plugin's zip file, maven coordinates of the plugin or for local zip files, use `file:` followed by the absolute or relative path to the plugin zip file. Below is the example help command: +When the server is up and ready (the console messages will look something like this), + +``` +[info][listening] Server running at http://localhost:5603/pgt +[info][server][OpenSearchDashboards][http] http server running at http://localhost:5603/pgt +``` + +click on the link displayed in your terminal to +access it. + +Note - it may take a couple minutes to generate all the necessary bundles. If the Dashboards link is not yet accessible, wait for a log message like ``` +[success][@osd/optimizer] 28 bundles compiled successfully after 145.9 sec, watching for changes +``` + +### Next Steps + +Now that you have a development environment to play with, there are a number of different paths you may take next. + +#### Learn about the OpenSearch Dashboards architecture and plugins + +- [Introduction to OpenSearch Dashboards Plugins](https://opensearch.org/blog/dashboards-plugins-intro/) blog post +- [OpenSearch Dashboards plugin user documentation](https://opensearch.org/docs/latest/install-and-configure/install-dashboards/plugins/) (install, update, and remove) +- Much of the technical architectural information about the plugin system is located in `/src/core` + - [README](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/core/README.md) + - [Plugin principles](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/core/PRINCIPLES.md) + - [Plugin conventions](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/core/CONVENTIONS.md#technical-conventions) + - [Plugin testing](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/core/TESTING.md) + +#### Review user tutorials to understand the key features and workflows + +- The [Quickstart guide for OpenSearch Dashboards](https://opensearch.org/docs/latest/dashboards/quickstart-dashboards/) will show you how to explore, inspect, and visualize sample data +- [Running queries in the Dev Tools Console](https://opensearch.org/docs/latest/dashboards/run-queries/) provides helpful guidance on how to interact with OpenSearch + +#### Explore essential plugins and APIs + +The easiest way to understand some of the essential plugins and APIs is to run OpenSearch Dashboards with [developer examples](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/examples/) turned on: + +```bash +$ yarn start --run-examples +``` + +#### Review code guidelines and conventions + +- [Project code guidelines](#code-guidelines) +- [Project testing guidelines](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/TESTING.md) +- [Plugin conventions](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/core/CONVENTIONS.md#technical-conventions) + +## Alternative development installations + +Although the [getting started guide](#getting-started-guide) covers the recommended development environment setup, there are several alternatives worth being aware of. + +### Optional - Run OpenSearch with plugins + +By default, the snapshot command will run [a minimal distribution of OpenSearch](https://opensearch.org/downloads.html#minimal), with no plugins installed. + +If you would like to run OpenSearch with a particular plugin installed on the cluster snapshot, pass the `--P` flag after `yarn opensearch snapshot`. You can use the flag multiple times to install multiple plugins. The argument value can be a URL to the plugin's zip file, maven coordinates of the plugin, or a local zip file path (use `file://` followed by the absolute or relative path, in that case). For example: + +_(Linux, Windows, Darwin (MacOS) only - for others, you'll need to [run OpenSearch from a tarball](#alternative---run-opensearch-from-tarball) instead)_ +```bash $ yarn opensearch snapshot --P https://repo1.maven.org/maven2/org/opensearch/plugin/opensearch-test-plugin/2.4.0.0/opensearch-test-plugin-2.4.0.0.zip ``` -Following are the list of options that can be passed after `yarn opensearch snapshot` to configure the cluster snapshot. +Note - if you add the [`security` plugin](https://github.com/opensearch-project/security), you'll also need to [configure OpenSearch Dashboards for security](#configure-opensearch-dashboards-for-security). + +#### Other snapshot configuration options + +Additional options can be passed after `yarn opensearch snapshot` to further configure the cluster snapshot. + Options: --license Run with a 'oss', 'basic', or 'trial' license [default: oss] @@ -82,26 +206,42 @@ Options: -E Additional key=value settings to pass to OpenSearch --download-only Download the snapshot but don't actually start it --ssl Sets up SSL on OpenSearch - --P OpenSearch plugin artifact URL to install it on the cluster. + --P OpenSearch plugin artifact URL to install it on the cluster. -``` +```bash $ yarn opensearch snapshot --version 2.2.0 -E cluster.name=test -E path.data=/tmp/opensearch-data --P org.opensearch.plugin:test-plugin:2.2.0.0 --P file:/home/user/opensearch-test-plugin-2.2.0.0.zip ``` -**Warning:** Starting the Dashboards instance before or during the initialization of the OpenSearch Server can cause Dashboards to sometimes misbehave. Ensure that the OpenSearch server instance is up and running first before starting up the Dashboards dev server from the next step. +### Alternative - Run OpenSearch from tarball -### Run OpenSearch Dashboards +If you would like to run OpenSearch from the tarball, you'll need to download the minimal distribution, install it, and then run the executable. (You'll also need Java installed and the `JAVA_HOME` environmental variable set - see [OpenSearch developer guide](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#install-prerequisites) for details). -After you've installed OpenSearch Dashboards and configured it, you can start -the development server: -```bash -$ yarn start +1. Download the latest minimal distribution of OpenSearch from [the downloads page](https://opensearch.org/downloads.html#minimal). Note the version and replace in commands below. +2. Unzip the `tar.gz` file: `tar -xvf opensearch--linux-x64.tar.gz` +3. Change directory: `cd opensearch-` +4. Run the cluster: `./bin/opensearch` + +Note - OpenSearch and OpenSearch Dashboards must have matching version strings. Because the tarball is the latest _released_ version of OpenSearch, it's likely behind the version on the `main` branch of OpenSearch Dashboards, which is generally set to the next upcoming major release. So to work from main, update [the OpenSearch Dashboards version in `package.json`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/package.json#L14) to match the OpenSearch version running. + +This method can also be used to develop against the [full distribution of OpenSearch](https://opensearch.org/downloads.html#opensearch) instead. In that case, you'll also need to [configure OpenSearch Dashboards for security](#configure-opensearch-dashboards-for-security). + +### Configure OpenSearch Dashboards for security + +*This step is only mandatory if you have the [`security` plugin](https://github.com/opensearch-project/security) installed on your OpenSearch cluster with https/authentication enabled.* + +Once the bootstrap of OpenSearch Dashboards is finished, you need to apply some +changes to the default [`opensearch_dashboards.yml`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/config/opensearch_dashboards.yml#L25-L72) in order to connect to OpenSearch. + +```yml +opensearch.hosts: ["https://localhost:9200"] +opensearch.username: "admin" # Default username on the docker image +opensearch.password: "admin" # Default password on the docker image +opensearch.ssl.verificationMode: none ``` -When the server is up and ready, click on the link displayed in your terminal to -access it. +For more detailed documentation, see [Configure TLS for OpenSearch Dashboards](https://opensearch.org/docs/latest/install-and-configure/install-dashboards/tls). -### Building the artifacts +## Building artifacts To build the artifacts for all supported platforms, run the following: @@ -115,12 +255,13 @@ If you want to build a specific platform, pass the platform flag after `yarn bui yarn build-platform --darwin ``` -You could pass one or multiple flags. If you don't pass any flag, `yarn build-platform` will build an artifact based on your local environment. +You could pass one or multiple flags. If you don't pass any flag, `yarn build-platform` will build an artifact based on your local environment. Currently, the supported flags for this script are: * `darwin` (builds Darwin x64) * `linux` (builds Linux x64) -* `linux-arm` (builds Linux ARM64). +* `linux-arm` (builds Linux ARM64). +* `windows` (builds Windows x64) If you would like to build only a DEB x64 artifact, run the following: @@ -146,7 +287,7 @@ If you would like to build only a RPM ARM64 artifact, run the following: yarn build --rpm-arm --skip-archives ``` -### Building the Docker Image +### Building the Docker image To build the Docker image, run the following: @@ -155,9 +296,11 @@ yarn osd bootstrap yarn build --docker ``` -## General +## Code guidelines -### Filenames +### General + +#### Filenames All filenames should use `snake_case`. @@ -165,12 +308,12 @@ All filenames should use `snake_case`. **Wrong:** `src/opensearch-dashboards/IndexPatterns/IndexPattern.js` -### Do not comment out code +#### Do not comment out code We use a version management system. If a line of code is no longer needed, remove it, don't simply comment it out. -### Prettier and Linting +#### Prettier and linting We are gradually moving the OpenSearch Dashboards code base over to Prettier. All TypeScript code and some JavaScript code (check `.eslintrc.js`) is using Prettier to format code. You @@ -182,11 +325,11 @@ Consider every linting rule and every Prettier rule to be also part of our devel and disable them only in exceptional cases and ideally leave a comment why they are disabled at that specific place. -## HTML +### HTML This part contains developer guide rules around general (framework agnostic) HTML usage. -### Camel case `id` and `data-test-subj` +#### Camel case `id` and `data-test-subj` Use camel case for the values of attributes such as `id` and `data-test-subj` selectors. @@ -210,14 +353,14 @@ buttons.map(btn => ( ) ``` -### Capitalization in HTML and CSS should always match +#### Capitalization in HTML and CSS should always match It's important that when you write CSS/SASS selectors using classes, IDs, and attributes (keeping in mind that we should _never_ use IDs and attributes in our selectors), that the capitalization in the CSS matches that used in the HTML. HTML and CSS follow different case sensitivity rules, and we can avoid subtle gotchas by ensuring we use the same capitalization in both of them. -### How to generate ids? +#### How to generate ids? When labeling elements (and for some other accessibility tasks) you will often need ids. Ids must be unique within the page i.e. no duplicate ids in the rendered DOM @@ -270,45 +413,50 @@ id generator. You can also use this service outside of React. -## API endpoints +### SASS files -The following developer guide rules are targeting development of server side API endpoints. +When writing a new component, create a sibling SASS file of the same name and import directly into the **top** of the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint). -### Paths +All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & OpenSearch Dashboards invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/core/public/core_app/styles/_globals_v7light.scss). -API routes must start with the `/api/` path segment, and should be followed by the plugin id if applicable: +While the styles for this component will only be loaded if the component exists on the page, +the styles **will** be global and so it is recommended to use a three letter prefix on your +classes to ensure proper scope. -**Right:** `/api/marvel/nodes` +**Example:** -**Wrong:** `/marvel/api/nodes` +```tsx +// component.tsx -### snake_case +import './component.scss'; +// All other imports below the SASS import -OpenSearch Dashboards uses `snake_case` for the entire API, just like OpenSearch. All urls, paths, query string parameters, values, and bodies should be `snake_case` formatted. +export const Component = () => { + return ( +
+ ); +} +``` -_Right:_ +```scss +// component.scss -``` -POST /api/opensearch-dashboards/index_patterns -{ - "id": "...", - "time_field_name": "...", - "fields": [ - ... - ] -} +.plgComponent { ... } ``` -## TypeScript/JavaScript +Do not use the underscore `_` SASS file naming pattern when importing directly into a javascript file. + + +### TypeScript/JavaScript The following developer guide rules apply for working with TypeScript/JavaScript files. -### TypeScript vs. JavaScript +#### TypeScript vs. JavaScript Whenever possible, write code in TypeScript instead of JavaScript, especially if it's new code. Check out [TYPESCRIPT.md](TYPESCRIPT.md) for help with this process. -### Prefer modern JavaScript/TypeScript syntax +#### Prefer modern JavaScript/TypeScript syntax You should prefer modern language features in a lot of cases, e.g.: @@ -319,7 +467,7 @@ You should prefer modern language features in a lot of cases, e.g.: - Prefer the spread operator for copying arrays (`[...arr]`) over `arr.slice()` - Use optional chaining (`?.`) and nullish Coalescing (`??`) over `lodash.get` (and similar utilities) -### Avoid mutability and state +#### Avoid mutability and state Wherever possible, do not rely on mutable state. This means you should not reassign variables, modify object properties, or push values to arrays. @@ -339,7 +487,7 @@ function addBar(foos, foo) { } ``` -### Avoid `any` whenever possible +#### Avoid `any` whenever possible Since TypeScript 3.0 and the introduction of the [`unknown` type](https://mariusschulz.com/blog/the-unknown-type-in-typescript) there are rarely any @@ -353,7 +501,7 @@ If youโ€™re not having `any` in your plugin or are starting a new plugin, you sh [`@typescript-eslint/no-explicit-any`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md) linting rule for your plugin via the [`.eslintrc.js`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/master/.eslintrc.js) config. -### Avoid non-null assertions +#### Avoid non-null assertions You should try avoiding non-null assertions (`!.`) wherever possible. By using them you tell TypeScript, that something is not null even though by itโ€™s type it could be. Usage of non-null @@ -365,14 +513,14 @@ or using [user defined type guards](https://www.typescriptlang.org/docs/handbook to properly tell TypeScript what type a variable has. Using non-null assertion increases the risk for future bugs. In case the condition under which we assumed that the -variable canโ€™t be null has changed (potentially even due to changes in compeltely different files), the non-null +variable canโ€™t be null has changed (potentially even due to changes in completely different files), the non-null assertion would now wrongly disable proper type checking for us. If youโ€™re not using non-null assertions in your plugin or are starting a new plugin, consider enabling the [`@typescript-eslint/no-non-null-assertion`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md) linting rule for you plugin in the [`.eslintrc.js`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/.eslintrc.js) config. -### Return/throw early from functions +#### Return/throw early from functions To avoid deep nesting of if-statements, always return a function's value as early as possible. And where possible, do any assertions first: @@ -405,7 +553,7 @@ function doStuff(val) { } ``` -### Use object destructuring +#### Use object destructuring This helps avoid temporary references and helps prevent typo-related bugs. @@ -429,7 +577,7 @@ function fullName(user) { } ``` -### Use array destructuring +#### Use array destructuring Directly accessing array values via index should be avoided, but if it is necessary, use array destructuring: @@ -445,7 +593,7 @@ const first = arr[0]; const second = arr[1]; ``` -### Magic numbers/strings +#### Avoid magic numbers/strings These are numbers (or other values) simply used in line in your code. _Do not use these_, give them a variable name so they can be understood and changed @@ -465,7 +613,7 @@ if (width < 300) { } ``` -### Modules +#### Use native ES2015 module syntax Module dependencies should be written using native ES2015 syntax wherever possible (which is almost everywhere): @@ -491,7 +639,7 @@ file that does not pass run through webpack, then use CommonJS modules. In those even rarer cases where you're writing client-side code that does not run through webpack, then do not use a module loader at all. -#### Import only top-level modules +##### Import only top-level modules The files inside a module are implementation details of that module. They should never be imported directly. Instead, you must only import the top-level @@ -517,12 +665,12 @@ import inFoo from 'foo/child'; import inSibling from '../foo/child'; ``` -### Global definitions +#### Avoid global definitions Don't do this. Everything should be wrapped in a module that can be depended on by other modules. Even things as simple as a single value should be a module. -### Only use ternary operators for small, simple code +#### Use ternary operators only for small, simple code And _never_ use multiple ternaries together, because they make it more difficult to reason about how different values flow through the conditions @@ -536,7 +684,7 @@ const foo = a === b ? 1 : 2; const foo = a === b ? 1 : a === c ? 2 : 3; ``` -### Use descriptive conditions +#### Use descriptive conditions Any non-trivial conditions should be converted to functions or assigned to descriptively named variables. By breaking up logic into smaller, @@ -569,7 +717,7 @@ if (thing instanceof Shape && !(thing instanceof Square)) { } ``` -### Name regular expressions +#### Name regular expressions ```js // good @@ -585,13 +733,13 @@ if (password.length >= 4 && /^(?=.*\d).{4,}$/.test(password)) { } ``` -### Write small functions +#### Write small functions Keep your functions short. A good function fits on a slide that the people in the last row of a big room can comfortably read. So don't count on them having perfect vision and limit yourself to ~15 lines of code per function. -### Use "rest" syntax rather than built-in `arguments` +#### Use "rest" syntax rather than built-in `arguments` For expressiveness sake, and so you can be mix dynamic and explicit arguments. @@ -608,7 +756,7 @@ function something(foo) { } ``` -### Default argument syntax +#### Use default argument syntax Always use the default argument syntax for optional arguments. @@ -641,7 +789,7 @@ function foo(options = {}, bar) { } ``` -### Use thunks to create closures, where possible +#### Use thunks to create closures, where possible For trivial examples (like the one that follows), thunks will seem like overkill, but they encourage isolating the implementation details of a closure @@ -667,7 +815,7 @@ setTimeout(() => { }, 1000); ``` -### Use slashes for comments +#### Use slashes for comments Use slashes for both single line and multi line comments. Try to write comments that explain higher level mechanisms or clarify difficult @@ -719,7 +867,7 @@ if (isSessionValid) { } ``` -### Getters and Setters +#### Use getters but not setters Feel free to use getters that are free from [side effects][sideeffect], like providing a length property for a collection class. @@ -728,44 +876,18 @@ Do not use setters, they cause more problems than they can solve. [sideeffect]: http://en.wikipedia.org/wiki/Side_effect_(computer_science) -## SASS files - -When writing a new component, create a sibling SASS file of the same name and import directly into the **top** of the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint). - -All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & OpenSearch Dashboards invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/core/public/core_app/styles/_globals_v7light.scss). - -While the styles for this component will only be loaded if the component exists on the page, -the styles **will** be global and so it is recommended to use a three letter prefix on your -classes to ensure proper scope. - -**Example:** - -```tsx -// component.tsx +#### Attribution -import './component.scss'; -// All other imports below the SASS import - -export const Component = () => { - return ( -
- ); -} -``` - -```scss -// component.scss - -.plgComponent { ... } -``` - -Do not use the underscore `_` SASS file naming pattern when importing directly into a javascript file. +Parts of the JavaScript developer guide were initially forked from the +[node style guide](https://github.com/felixge/node-style-guide) created by [Felix Geisendรถrfer](http://felixge.de/) which is +licensed under the [CC BY-SA 3.0](http://creativecommons.org/licenses/by-sa/3.0/) +license. -## React +### React The following developer guide rules are specific for working with the React framework. -### Prefer reactDirective over react-component +#### Prefer reactDirective over react-component When using `ngReact` to embed your react components inside Angular HTML, prefer the `reactDirective` service over the `react-component` directive. @@ -789,7 +911,7 @@ Using `react-component` means adding a bunch of components into angular, while ` ``` -### Action function names and prop function names +#### Name action functions and prop functions appropriately Name action functions in the form of a strong verb and passed properties in the form of on. E.g: @@ -798,9 +920,31 @@ Name action functions in the form of a strong verb and passed properties in the ``` -## Attribution +### API endpoints -Parts of the JavaScript developer guide were initially forked from the -[node style guide](https://github.com/felixge/node-style-guide) created by [Felix Geisendรถrfer](http://felixge.de/) which is -licensed under the [CC BY-SA 3.0](http://creativecommons.org/licenses/by-sa/3.0/) -license. +The following developer guide rules are targeting development of server side API endpoints. + +#### Use only `/api/` as base path + +API routes must start with the `/api/` path segment, and should be followed by the plugin id if applicable: + +**Right:** `/api/marvel/nodes` + +**Wrong:** `/marvel/api/nodes` + +#### Use snake_case + +OpenSearch Dashboards uses `snake_case` for the entire API, just like OpenSearch. All urls, paths, query string parameters, values, and bodies should be `snake_case` formatted. + +_Right:_ + +``` +POST /api/opensearch-dashboards/index_patterns +{ + "id": "...", + "time_field_name": "...", + "fields": [ + ... + ] +} +``` diff --git a/NOTICE.txt b/NOTICE.txt index 5962cc847b61..170b48daa5b9 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -3,7 +3,7 @@ Copyright OpenSearch Contributors This product includes software, including Kibana source code, developed by Elasticsearch (http://www.elastic.co). -Copyright 2009-2018 Elasticsearch B.V. +Copyright 2009-2021 Elasticsearch B.V. This product includes software developed by The Apache Software Foundation (http://www.apache.org/) @@ -245,4 +245,3 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/bwctest.sh b/bwctest.sh index 4749b99f1012..1b44d15b64cf 100755 --- a/bwctest.sh +++ b/bwctest.sh @@ -13,7 +13,7 @@ set -e -DEFAULT_VERSIONS="osd-2.0.0,osd-2.1.0,osd-2.2.0,osd-2.3.0,osd-2.4.0" +DEFAULT_VERSIONS="osd-2.0.0,osd-2.1.0,osd-2.2.0,osd-2.3.0,osd-2.4.0,osd-2.5.0" function usage() { echo "" diff --git a/cypress/test-data/with-security/osd-2.5.0.tar.gz b/cypress/test-data/with-security/osd-2.5.0.tar.gz new file mode 100644 index 000000000000..8ad128f0efc3 Binary files /dev/null and b/cypress/test-data/with-security/osd-2.5.0.tar.gz differ diff --git a/cypress/test-data/without-security/osd-2.5.0.tar.gz b/cypress/test-data/without-security/osd-2.5.0.tar.gz new file mode 100644 index 000000000000..16c8ccc2e03b Binary files /dev/null and b/cypress/test-data/without-security/osd-2.5.0.tar.gz differ diff --git a/package.json b/package.json index 605bcb1865d6..ed11f17df74a 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "**/json-schema": "^0.4.0", "**/kind-of": ">=6.0.3", "**/loader-utils": "^2.0.4", - "**/node-jose": "^2.1.0", + "**/node-jose": "^2.2.0", "**/nth-check": "^2.0.1", "**/trim": "^0.0.3", "**/typescript": "4.0.2", @@ -133,7 +133,7 @@ "@hapi/podium": "^4.1.3", "@hapi/vision": "^6.1.0", "@hapi/wreck": "^17.1.0", - "@opensearch-project/opensearch": "^1.1.0", + "@opensearch-project/opensearch": "^2.1.0", "@osd/ace": "1.0.0", "@osd/analytics": "1.0.0", "@osd/apm-config-loader": "1.0.0", @@ -166,6 +166,7 @@ "dns-sync": "^0.2.1", "elastic-apm-node": "^3.7.0", "elasticsearch": "^16.7.0", + "http-aws-es": "6.0.0", "execa": "^4.0.2", "expiry-js": "0.1.7", "fast-deep-equal": "^3.1.1", @@ -334,6 +335,7 @@ "@types/zen-observable": "^0.8.0", "@typescript-eslint/eslint-plugin": "^3.10.0", "@typescript-eslint/parser": "^3.10.0", + "@types/http-aws-es": "6.0.2", "angular-aria": "^1.8.0", "angular-mocks": "^1.8.2", "angular-recursion": "^1.0.5", @@ -453,18 +455,18 @@ "tree-kill": "^1.2.2", "typescript": "4.0.2", "ui-select": "0.19.8", - "vega": "^5.17.3", + "vega": "^5.23.0", "vega-interpreter": "npm:@amoo-miki/vega-forced-csp-compliant-interpreter@1.0.6", "vega-lite": "^5.6.0", "vega-schema-url-parser": "^2.1.0", - "vega-tooltip": "^0.24.2", + "vega-tooltip": "^0.30.0", "vinyl-fs": "^3.0.3", "xml2js": "^0.4.22", "xmlbuilder": "13.0.2", "zlib": "^1.0.5" }, "engines": { - "node": "14.20.1", - "yarn": "^1.21.1" + "node": "^14.20.1", + "yarn": "^1.22.10" } } diff --git a/packages/osd-opensearch/package.json b/packages/osd-opensearch/package.json index 88a6733757a6..4a9aafa875a5 100644 --- a/packages/osd-opensearch/package.json +++ b/packages/osd-opensearch/package.json @@ -12,7 +12,7 @@ "osd:watch": "node scripts/build --watch" }, "dependencies": { - "@opensearch-project/opensearch": "^1.1.0", + "@opensearch-project/opensearch": "^2.1.0", "@osd/dev-utils": "1.0.0", "abort-controller": "^3.0.0", "chalk": "^4.1.0", diff --git a/packages/osd-opensearch/src/artifact.js b/packages/osd-opensearch/src/artifact.js index b7d8857ba09f..541afa8c76f6 100644 --- a/packages/osd-opensearch/src/artifact.js +++ b/packages/osd-opensearch/src/artifact.js @@ -38,6 +38,7 @@ const { createHash } = require('crypto'); const path = require('path'); const asyncPipeline = promisify(pipeline); +const SUPPORTED_PLATFORMS = ['linux', 'windows', 'darwin']; const DAILY_SNAPSHOTS_BASE_URL = 'https://artifacts.opensearch.org/snapshots/core/opensearch'; // TODO: [RENAMEME] currently do not have an existing replacement // issue: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/475 @@ -188,8 +189,8 @@ async function getArtifactSpecForSnapshotFromUrl(urlVersion, log) { const arch = process.arch === 'arm64' ? 'arm64' : 'x64'; const extension = process.platform === 'win32' ? 'zip' : 'tar.gz'; - if (platform !== 'linux' && platform !== 'windows') { - throw createCliError(`Snapshots are only available for Linux and Windows`); + if (!SUPPORTED_PLATFORMS.includes(platform)) { + throw createCliError(`Snapshots are only available for Linux, Windows, and Darwin`); } const latestUrl = `${DAILY_SNAPSHOTS_BASE_URL}/${desiredVersion}-SNAPSHOT`; diff --git a/packages/osd-opensearch/src/artifact.test.js b/packages/osd-opensearch/src/artifact.test.js index 1d5d0bdf330c..89baa7b9e892 100644 --- a/packages/osd-opensearch/src/artifact.test.js +++ b/packages/osd-opensearch/src/artifact.test.js @@ -163,17 +163,17 @@ describe('Artifact', () => { }); }); - it('should throw when on a non-Linux or non-Windows platform', async () => { + it('should throw when on a non-Linux, non-Windows, non-Darwin platform', async () => { Object.defineProperties(process, { platform: { - value: 'darwin', + value: 'android', }, arch: { value: ORIGINAL_ARCHITECTURE, }, }); await expect(Artifact.getSnapshot('default', 'INVALID_PLATFORM', log)).rejects.toThrow( - 'Snapshots are only available for Linux' + 'Snapshots are only available for Linux, Windows, and Darwin' ); }); @@ -189,6 +189,42 @@ describe('Artifact', () => { mockFetch(MOCKS.multipleArch[0]); artifactTest(); }); + + it('should not throw when on a Linux platform', async () => { + Object.defineProperties(process, { + platform: { + value: 'linux', + }, + arch: { + value: 'x64', + }, + }); + artifactTest(); + }); + + it('should not throw when on a Windows platform', async () => { + Object.defineProperties(process, { + platform: { + value: 'win32', + }, + arch: { + value: 'x64', + }, + }); + artifactTest(); + }); + + it('should not throw when on a Darwin platform', async () => { + Object.defineProperties(process, { + platform: { + value: 'darwin', + }, + arch: { + value: 'x64', + }, + }); + artifactTest(); + }); }); describe('with custom snapshot manifest URL', () => { diff --git a/packages/osd-optimizer/src/worker/webpack.config.ts b/packages/osd-optimizer/src/worker/webpack.config.ts index a841d418a0b2..caeed72a3bb1 100644 --- a/packages/osd-optimizer/src/worker/webpack.config.ts +++ b/packages/osd-optimizer/src/worker/webpack.config.ts @@ -89,7 +89,7 @@ export function getWebpackConfig(bundle: Bundle, bundleRefs: BundleRefs, worker: // already bundled with all its necessary depedencies noParse: [ /[\/\\]node_modules[\/\\]lodash[\/\\]index\.js$/, - /[\/\\]node_modules[\/\\]vega[\/\\]build[\/\\]vega\.js$/, + /[\/\\]node_modules[\/\\]vega[\/\\]build-es5[\/\\]vega\.js$/, ], rules: [ diff --git a/release-notes/opensearch-dashboards.release-notes-1.3.8.md b/release-notes/opensearch-dashboards.release-notes-1.3.8.md new file mode 100644 index 000000000000..b14e84018da1 --- /dev/null +++ b/release-notes/opensearch-dashboards.release-notes-1.3.8.md @@ -0,0 +1,29 @@ +# Version 1.3.8 Release Notes + +### ๐Ÿ›ก Security + +- [CVE-2022-25901] Bump supertest from 2.0.5 to 2.0.12 ([#3326](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3326)) +- [CVE-2022-25860] Bump simple-git from 3.15.1 to 3.16.0 ([#3345](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3345)) +- [CVE-2022-46175] Bump json5 version from 1.0.1 and 2.2.1 to 1.0.2 and 2.2.3 ([#3201](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3201)) +- [CVE-2022-25912] Bump simple-git from 3.4.0 to 3.15.0 ([#3036](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3036)) +- Bump decode-uri-component from 0.2.0 to 0.2.2 ([#3009](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3009)) + +### ๐Ÿ› Bug Fixes + +- [BUG] Fixes misleading embeddable plugin error message ([#3043](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3043)) +- [BUG] Trim trailing slashes before checking no-restricted-path rule ([#3020](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3020)) + +### ๐Ÿšž Infrastructure + +- Lock workflow tests to Chrome and ChromeDriver 107 as the last combination that run on Node.js v10 ([#3299](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3299)) +- Update yarn timeout for GitHub workflow on Windows ([#3118](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3118)) +- Add Windows CI to the GitHub workflow ([#2966](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2966)) + +### ๐Ÿ“ Documentation + +- Fix documentation link for date math ([#3207](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3207)) + +### ๐Ÿ”ฉ Tests + +- [BWC] Updates to BWC tests ([#1190](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1190)) +- Automates chromedriver version selection for tests ([#2990](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2990)) \ No newline at end of file diff --git a/release-notes/opensearch-dashboards.release-notes-2.6.0.md b/release-notes/opensearch-dashboards.release-notes-2.6.0.md new file mode 100644 index 000000000000..9600975e3ecd --- /dev/null +++ b/release-notes/opensearch-dashboards.release-notes-2.6.0.md @@ -0,0 +1,47 @@ +## Version 2.6.0 Release Notes + +### ๐Ÿ›ก Security + +- [CVE-2022-37599] Bump loader-utils from `2.0.3` to `2.0.4` ([#3031](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3031)) +- [CVE-2022-37603] Bump loader-utils from `2.0.3` to `2.0.4` ([#3031](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3031)) +- [CVE-2022-25860] Bump simple-git from `3.15.1` to `3.16.0` ([#3345](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3345)) +- [CVE-2022-25881] Resolve http-cache-semantics from `4.1.0` to `4.1.1` ([#3409](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3409)) +- [Security] Bump hapi/statehood from `7.0.3` to `7.0.4` ([#3411](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3411)) +- [CVE-2023-25166] Bump formula from `3.0.0` to `3.0.1` ([#3416](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3416)) +- [CVE-2020-36632] Bump flat from `4.1.1` to `5.0.2` ([#3419](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3419)) +- [CVE-2023-25653] Bump node-jose from `2.1.1` to `2.2.0` ([#3445](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3445)) +- [CVE-2022-24999] Resolve qs from `6.5.3` to `6.11.0` ([#3450](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3450)) +- [CVE-2022-25758] Bump node-sass from `6.0.1` to `7.0.3` and sass-loader from `10.2.1` to `10.4.1` to bump scss-tokenizer from `0.2.3` to `0.4.3` ([#3455](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3455)) +- [CVE-2020-24025] Bump node-sass from `6.0.1` to `7.0.3` ([#3455](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3455)) + +### ๐Ÿ“ˆ Features/Enhancements + +- Add disablePrototypePoisoningProtection configuration to prevent JS client from erroring when cluster utilizes JS reserved words ([#2992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2992)) +- [Multiple DataSource] Add support for SigV4 authentication ([#3058](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3058)) +- [Multiple DataSource] Refactor test connection to support SigV4 auth type ([#3456](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3456)) + +### ๐Ÿ› Bug Fixes + +- [Search Telemetry] Fix search telemetry's observable object that won't be GC-ed([#3390](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3390)) +- [Region Maps] Add ui setting to configure custom vector map's size parameter([#3399](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3399)) + +### ๐Ÿšž Infrastructure + +- Fix detection of Chrome's version on Darwin during CI ([#3296](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3296)) + +### ๐Ÿ“ Documentation + +- [Docs] Fix documentation link for date math ([#3207](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3207)) + +### ๐Ÿ›  Maintenance + +- Bump `re2` and `supertest` ([#3018](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3018)) +- Upgrade vega-tooltip to `0.30.0` to support custom tooltips ([#3359](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3359)) +- Allow relaxing the Node.js runtime version requirement ([#3402](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3402)) +- Make build scripts find and use the latest version of Node.js that satisfies `engines.node` ([#3467](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3467)) +- Add `@opensearch-project/opensearch@^2.x` as dependency aliased as `@opensearch-project/opensearch-next` ([#3469](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3469)) + +### ๐Ÿ”ฉ Tests + +- [BWC Tests] Add BWC tests for `2.6.0` ([#3356](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3356)) +- Prevent primitive linting limitations from being applied to unit tests found under `src/setup_node_env` ([#3403](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3403)) diff --git a/renovate.json5 b/renovate.json5 deleted file mode 100644 index 642ba9540cca..000000000000 --- a/renovate.json5 +++ /dev/null @@ -1,1123 +0,0 @@ -/** - * PLEASE DO NOT MODIFY - * - * This file is automatically generated by running `node scripts/build_renovate_config` - * - */ -{ - extends: [ - 'config:base', - ], - includePaths: [ - 'package.json', - 'packages/*/package.json', - 'examples/*/package.json', - 'test/plugin_functional/plugins/*/package.json', - 'test/interpreter_functional/plugins/*/package.json', - ], - baseBranches: [ - 'master', - ], - labels: [ - 'release_note:skip', - 'Team:Operations', - 'renovate', - 'v8.0.0', - 'v7.9.0', - ], - major: { - labels: [ - 'release_note:skip', - 'Team:Operations', - 'renovate', - 'v8.0.0', - 'v7.9.0', - 'renovate:major', - ], - }, - separateMajorMinor: false, - masterIssue: true, - masterIssueApproval: true, - rangeStrategy: 'bump', - npm: { - lockFileMaintenance: { - enabled: false, - }, - packageRules: [ - { - groupSlug: '@elastic/charts', - groupName: '@elastic/charts related packages', - packageNames: [ - '@elastic/charts', - '@types/elastic__charts', - ], - reviewers: [ - 'markov00', - ], - masterIssueApproval: false, - }, - { - groupSlug: '@reach/router', - groupName: '@reach/router related packages', - packageNames: [ - '@reach/router', - '@types/reach__router', - ], - }, - { - groupSlug: '@testing-library/dom', - groupName: '@testing-library/dom related packages', - packageNames: [ - '@testing-library/dom', - '@types/testing-library__dom', - ], - }, - { - groupSlug: 'angular', - groupName: 'angular related packages', - packagePatterns: [ - '(\\b|_)angular(\\b|_)', - ], - }, - { - groupSlug: 'api-documenter', - groupName: 'api-documenter related packages', - packageNames: [ - '@microsoft/api-documenter', - '@types/microsoft__api-documenter', - '@microsoft/api-extractor', - '@types/microsoft__api-extractor', - ], - enabled: false, - }, - { - groupSlug: 'archiver', - groupName: 'archiver related packages', - packageNames: [ - 'archiver', - '@types/archiver', - ], - }, - { - groupSlug: 'babel', - groupName: 'babel related packages', - packagePatterns: [ - '(\\b|_)babel(\\b|_)', - ], - packageNames: [ - 'core-js', - '@types/core-js', - '@babel/preset-react', - '@types/babel__preset-react', - '@babel/preset-typescript', - '@types/babel__preset-typescript', - ], - }, - { - groupSlug: 'base64-js', - groupName: 'base64-js related packages', - packageNames: [ - 'base64-js', - '@types/base64-js', - ], - }, - { - groupSlug: 'bluebird', - groupName: 'bluebird related packages', - packageNames: [ - 'bluebird', - '@types/bluebird', - ], - }, - { - groupSlug: 'browserslist-useragent', - groupName: 'browserslist-useragent related packages', - packageNames: [ - 'browserslist-useragent', - '@types/browserslist-useragent', - ], - }, - { - groupSlug: 'chance', - groupName: 'chance related packages', - packageNames: [ - 'chance', - '@types/chance', - ], - }, - { - groupSlug: 'cheerio', - groupName: 'cheerio related packages', - packageNames: [ - 'cheerio', - '@types/cheerio', - ], - }, - { - groupSlug: 'chroma-js', - groupName: 'chroma-js related packages', - packageNames: [ - 'chroma-js', - '@types/chroma-js', - ], - }, - { - groupSlug: 'chromedriver', - groupName: 'chromedriver related packages', - packageNames: [ - 'chromedriver', - '@types/chromedriver', - ], - }, - { - groupSlug: 'classnames', - groupName: 'classnames related packages', - packageNames: [ - 'classnames', - '@types/classnames', - ], - }, - { - groupSlug: 'cmd-shim', - groupName: 'cmd-shim related packages', - packageNames: [ - 'cmd-shim', - '@types/cmd-shim', - ], - }, - { - groupSlug: 'color', - groupName: 'color related packages', - packageNames: [ - 'color', - '@types/color', - ], - }, - { - groupSlug: 'cpy', - groupName: 'cpy related packages', - packageNames: [ - 'cpy', - '@types/cpy', - ], - }, - { - groupSlug: 'cytoscape', - groupName: 'cytoscape related packages', - packageNames: [ - 'cytoscape', - '@types/cytoscape', - ], - }, - { - groupSlug: 'd3', - groupName: 'd3 related packages', - packagePatterns: [ - '(\\b|_)d3(\\b|_)', - ], - }, - { - groupSlug: 'dedent', - groupName: 'dedent related packages', - packageNames: [ - 'dedent', - '@types/dedent', - ], - }, - { - groupSlug: 'deep-freeze-strict', - groupName: 'deep-freeze-strict related packages', - packageNames: [ - 'deep-freeze-strict', - '@types/deep-freeze-strict', - ], - }, - { - groupSlug: 'delete-empty', - groupName: 'delete-empty related packages', - packageNames: [ - 'delete-empty', - '@types/delete-empty', - ], - }, - { - groupSlug: 'dragselect', - groupName: 'dragselect related packages', - packageNames: [ - 'dragselect', - '@types/dragselect', - ], - labels: [ - 'release_note:skip', - 'Team:Operations', - 'renovate', - 'v8.0.0', - 'v7.9.0', - ':ml', - ], - }, - { - groupSlug: 'elasticsearch', - groupName: 'elasticsearch related packages', - packageNames: [ - 'elasticsearch', - '@types/elasticsearch', - ], - }, - { - groupSlug: 'eslint', - groupName: 'eslint related packages', - packagePatterns: [ - '(\\b|_)eslint(\\b|_)', - ], - }, - { - groupSlug: 'estree', - groupName: 'estree related packages', - packageNames: [ - 'estree', - '@types/estree', - ], - }, - { - groupSlug: 'fancy-log', - groupName: 'fancy-log related packages', - packageNames: [ - 'fancy-log', - '@types/fancy-log', - ], - }, - { - groupSlug: 'fetch-mock', - groupName: 'fetch-mock related packages', - packageNames: [ - 'fetch-mock', - '@types/fetch-mock', - ], - }, - { - groupSlug: 'file-saver', - groupName: 'file-saver related packages', - packageNames: [ - 'file-saver', - '@types/file-saver', - ], - }, - { - groupSlug: 'flot', - groupName: 'flot related packages', - packageNames: [ - 'flot', - '@types/flot', - ], - }, - { - groupSlug: 'geojson', - groupName: 'geojson related packages', - packageNames: [ - 'geojson', - '@types/geojson', - ], - }, - { - groupSlug: 'getopts', - groupName: 'getopts related packages', - packageNames: [ - 'getopts', - '@types/getopts', - ], - }, - { - groupSlug: 'getos', - groupName: 'getos related packages', - packageNames: [ - 'getos', - '@types/getos', - ], - }, - { - groupSlug: 'git-url-parse', - groupName: 'git-url-parse related packages', - packageNames: [ - 'git-url-parse', - '@types/git-url-parse', - ], - }, - { - groupSlug: 'glob', - groupName: 'glob related packages', - packageNames: [ - 'glob', - '@types/glob', - ], - }, - { - groupSlug: 'globby', - groupName: 'globby related packages', - packageNames: [ - 'globby', - '@types/globby', - ], - }, - { - groupSlug: 'graphql', - groupName: 'graphql related packages', - packagePatterns: [ - '(\\b|_)graphql(\\b|_)', - '(\\b|_)apollo(\\b|_)', - ], - }, - { - groupSlug: 'grunt', - groupName: 'grunt related packages', - packagePatterns: [ - '(\\b|_)grunt(\\b|_)', - ], - }, - { - groupSlug: 'gulp', - groupName: 'gulp related packages', - packagePatterns: [ - '(\\b|_)gulp(\\b|_)', - ], - }, - { - groupSlug: 'hapi', - groupName: 'hapi related packages', - packagePatterns: [ - '(\\b|_)hapi(\\b|_)', - ], - packageNames: [ - 'hapi', - '@types/hapi', - 'joi', - '@types/joi', - 'boom', - '@types/boom', - 'hoek', - '@types/hoek', - 'h2o2', - '@types/h2o2', - '@elastic/good', - '@types/elastic__good', - 'good-squeeze', - '@types/good-squeeze', - 'inert', - '@types/inert', - 'accept', - '@types/accept', - ], - }, - { - groupSlug: 'has-ansi', - groupName: 'has-ansi related packages', - packageNames: [ - 'has-ansi', - '@types/has-ansi', - ], - }, - { - groupSlug: 'he', - groupName: 'he related packages', - packageNames: [ - 'he', - '@types/he', - ], - }, - { - groupSlug: 'history', - groupName: 'history related packages', - packageNames: [ - 'history', - '@types/history', - ], - }, - { - groupSlug: 'hjson', - groupName: 'hjson related packages', - packageNames: [ - 'hjson', - '@types/hjson', - ], - }, - { - groupSlug: 'inquirer', - groupName: 'inquirer related packages', - packageNames: [ - 'inquirer', - '@types/inquirer', - ], - }, - { - groupSlug: 'intl-relativeformat', - groupName: 'intl-relativeformat related packages', - packageNames: [ - 'intl-relativeformat', - '@types/intl-relativeformat', - ], - }, - { - groupSlug: 'jest', - groupName: 'jest related packages', - packagePatterns: [ - '(\\b|_)jest(\\b|_)', - ], - }, - { - groupSlug: 'jquery', - groupName: 'jquery related packages', - packageNames: [ - 'jquery', - '@types/jquery', - ], - }, - { - groupSlug: 'js-search', - groupName: 'js-search related packages', - packageNames: [ - 'js-search', - '@types/js-search', - ], - }, - { - groupSlug: 'js-yaml', - groupName: 'js-yaml related packages', - packageNames: [ - 'js-yaml', - '@types/js-yaml', - ], - }, - { - groupSlug: 'jsdom', - groupName: 'jsdom related packages', - packageNames: [ - 'jsdom', - '@types/jsdom', - ], - }, - { - groupSlug: 'json-stable-stringify', - groupName: 'json-stable-stringify related packages', - packageNames: [ - 'json-stable-stringify', - '@types/json-stable-stringify', - ], - }, - { - groupSlug: 'json5', - groupName: 'json5 related packages', - packageNames: [ - 'json5', - '@types/json5', - ], - }, - { - groupSlug: 'jsonwebtoken', - groupName: 'jsonwebtoken related packages', - packageNames: [ - 'jsonwebtoken', - '@types/jsonwebtoken', - ], - }, - { - groupSlug: 'jsts', - groupName: 'jsts related packages', - packageNames: [ - 'jsts', - '@types/jsts', - ], - allowedVersions: '^1.6.2', - }, - { - groupSlug: 'karma', - groupName: 'karma related packages', - packagePatterns: [ - '(\\b|_)karma(\\b|_)', - ], - }, - { - groupSlug: 'language server', - groupName: 'language server related packages', - packageNames: [ - 'vscode-jsonrpc', - '@types/vscode-jsonrpc', - 'vscode-languageserver', - '@types/vscode-languageserver', - 'vscode-languageserver-types', - '@types/vscode-languageserver-types', - ], - }, - { - groupSlug: 'license-checker', - groupName: 'license-checker related packages', - packageNames: [ - 'license-checker', - '@types/license-checker', - ], - }, - { - groupSlug: 'listr', - groupName: 'listr related packages', - packageNames: [ - 'listr', - '@types/listr', - ], - }, - { - groupSlug: 'lodash', - groupName: 'lodash related packages', - packageNames: [ - 'lodash', - '@types/lodash', - ], - }, - { - groupSlug: 'log-symbols', - groupName: 'log-symbols related packages', - packageNames: [ - 'log-symbols', - '@types/log-symbols', - ], - }, - { - groupSlug: 'lru-cache', - groupName: 'lru-cache related packages', - packageNames: [ - 'lru-cache', - '@types/lru-cache', - ], - }, - { - groupSlug: 'mapbox-gl', - groupName: 'mapbox-gl related packages', - packageNames: [ - 'mapbox-gl', - '@types/mapbox-gl', - ], - }, - { - groupSlug: 'markdown-it', - groupName: 'markdown-it related packages', - packageNames: [ - 'markdown-it', - '@types/markdown-it', - ], - }, - { - groupSlug: 'memoize-one', - groupName: 'memoize-one related packages', - packageNames: [ - 'memoize-one', - '@types/memoize-one', - ], - }, - { - groupSlug: 'mime', - groupName: 'mime related packages', - packageNames: [ - 'mime', - '@types/mime', - ], - }, - { - groupSlug: 'minimatch', - groupName: 'minimatch related packages', - packageNames: [ - 'minimatch', - '@types/minimatch', - ], - }, - { - groupSlug: 'mocha', - groupName: 'mocha related packages', - packagePatterns: [ - '(\\b|_)mocha(\\b|_)', - ], - }, - { - groupSlug: 'mock-fs', - groupName: 'mock-fs related packages', - packageNames: [ - 'mock-fs', - '@types/mock-fs', - ], - }, - { - groupSlug: 'moment', - groupName: 'moment related packages', - packagePatterns: [ - '(\\b|_)moment(\\b|_)', - ], - }, - { - groupSlug: 'mustache', - groupName: 'mustache related packages', - packageNames: [ - 'mustache', - '@types/mustache', - ], - }, - { - groupSlug: 'ncp', - groupName: 'ncp related packages', - packageNames: [ - 'ncp', - '@types/ncp', - ], - }, - { - groupSlug: 'nock', - groupName: 'nock related packages', - packageNames: [ - 'nock', - '@types/nock', - ], - }, - { - groupSlug: 'node', - groupName: 'node related packages', - packageNames: [ - 'node', - '@types/node', - ], - }, - { - groupSlug: 'node-fetch', - groupName: 'node-fetch related packages', - packageNames: [ - 'node-fetch', - '@types/node-fetch', - ], - }, - { - groupSlug: 'node-forge', - groupName: 'node-forge related packages', - packageNames: [ - 'node-forge', - '@types/node-forge', - ], - }, - { - groupSlug: 'node-sass', - groupName: 'node-sass related packages', - packageNames: [ - 'node-sass', - '@types/node-sass', - ], - }, - { - groupSlug: 'nodemailer', - groupName: 'nodemailer related packages', - packageNames: [ - 'nodemailer', - '@types/nodemailer', - ], - }, - { - groupSlug: 'normalize-path', - groupName: 'normalize-path related packages', - packageNames: [ - 'normalize-path', - '@types/normalize-path', - ], - }, - { - groupSlug: 'object-hash', - groupName: 'object-hash related packages', - packageNames: [ - 'object-hash', - '@types/object-hash', - ], - }, - { - groupSlug: 'opn', - groupName: 'opn related packages', - packageNames: [ - 'opn', - '@types/opn', - ], - }, - { - groupSlug: 'ora', - groupName: 'ora related packages', - packageNames: [ - 'ora', - '@types/ora', - ], - }, - { - groupSlug: 'papaparse', - groupName: 'papaparse related packages', - packageNames: [ - 'papaparse', - '@types/papaparse', - ], - }, - { - groupSlug: 'parse-link-header', - groupName: 'parse-link-header related packages', - packageNames: [ - 'parse-link-header', - '@types/parse-link-header', - ], - }, - { - groupSlug: 'pegjs', - groupName: 'pegjs related packages', - packageNames: [ - 'pegjs', - '@types/pegjs', - ], - }, - { - groupSlug: 'pngjs', - groupName: 'pngjs related packages', - packageNames: [ - 'pngjs', - '@types/pngjs', - ], - }, - { - groupSlug: 'podium', - groupName: 'podium related packages', - packageNames: [ - 'podium', - '@types/podium', - ], - }, - { - groupSlug: 'pretty-ms', - groupName: 'pretty-ms related packages', - packageNames: [ - 'pretty-ms', - '@types/pretty-ms', - ], - }, - { - groupSlug: 'proper-lockfile', - groupName: 'proper-lockfile related packages', - packageNames: [ - 'proper-lockfile', - '@types/proper-lockfile', - ], - }, - { - groupSlug: 'puppeteer', - groupName: 'puppeteer related packages', - packageNames: [ - 'puppeteer', - '@types/puppeteer', - ], - }, - { - groupSlug: 'react', - groupName: 'react related packages', - packagePatterns: [ - '(\\b|_)react(\\b|_)', - '(\\b|_)redux(\\b|_)', - '(\\b|_)enzyme(\\b|_)', - ], - packageNames: [ - 'ngreact', - '@types/ngreact', - 'recompose', - '@types/recompose', - 'prop-types', - '@types/prop-types', - 'typescript-fsa-reducers', - '@types/typescript-fsa-reducers', - 'reselect', - '@types/reselect', - ], - }, - { - groupSlug: 'read-pkg', - groupName: 'read-pkg related packages', - packageNames: [ - 'read-pkg', - '@types/read-pkg', - ], - }, - { - groupSlug: 'reduce-reducers', - groupName: 'reduce-reducers related packages', - packageNames: [ - 'reduce-reducers', - '@types/reduce-reducers', - ], - }, - { - groupSlug: 'request', - groupName: 'request related packages', - packageNames: [ - 'request', - '@types/request', - ], - }, - { - groupSlug: 'selenium-webdriver', - groupName: 'selenium-webdriver related packages', - packageNames: [ - 'selenium-webdriver', - '@types/selenium-webdriver', - ], - }, - { - groupSlug: 'semver', - groupName: 'semver related packages', - packageNames: [ - 'semver', - '@types/semver', - ], - }, - { - groupSlug: 'set-value', - groupName: 'set-value related packages', - packageNames: [ - 'set-value', - '@types/set-value', - ], - }, - { - groupSlug: 'sinon', - groupName: 'sinon related packages', - packageNames: [ - 'sinon', - '@types/sinon', - ], - }, - { - groupSlug: 'stats-lite', - groupName: 'stats-lite related packages', - packageNames: [ - 'stats-lite', - '@types/stats-lite', - ], - }, - { - groupSlug: 'storybook', - groupName: 'storybook related packages', - packagePatterns: [ - '(\\b|_)storybook(\\b|_)', - ], - }, - { - groupSlug: 'strip-ansi', - groupName: 'strip-ansi related packages', - packageNames: [ - 'strip-ansi', - '@types/strip-ansi', - ], - }, - { - groupSlug: 'strong-log-transformer', - groupName: 'strong-log-transformer related packages', - packageNames: [ - 'strong-log-transformer', - '@types/strong-log-transformer', - ], - }, - { - groupSlug: 'styled-components', - groupName: 'styled-components related packages', - packageNames: [ - 'styled-components', - '@types/styled-components', - ], - }, - { - groupSlug: 'supertest', - groupName: 'supertest related packages', - packageNames: [ - 'supertest', - '@types/supertest', - ], - }, - { - groupSlug: 'supertest-as-promised', - groupName: 'supertest-as-promised related packages', - packageNames: [ - 'supertest-as-promised', - '@types/supertest-as-promised', - ], - }, - { - groupSlug: 'tar', - groupName: 'tar related packages', - packageNames: [ - 'tar', - '@types/tar', - ], - }, - { - groupSlug: 'tar-fs', - groupName: 'tar-fs related packages', - packageNames: [ - 'tar-fs', - '@types/tar-fs', - ], - }, - { - groupSlug: 'tempy', - groupName: 'tempy related packages', - packageNames: [ - 'tempy', - '@types/tempy', - ], - }, - { - groupSlug: 'through2', - groupName: 'through2 related packages', - packageNames: [ - 'through2', - '@types/through2', - ], - }, - { - groupSlug: 'through2-map', - groupName: 'through2-map related packages', - packageNames: [ - 'through2-map', - '@types/through2-map', - ], - }, - { - groupSlug: 'tinycolor2', - groupName: 'tinycolor2 related packages', - packageNames: [ - 'tinycolor2', - '@types/tinycolor2', - ], - }, - { - groupSlug: 'type-detect', - groupName: 'type-detect related packages', - packageNames: [ - 'type-detect', - '@types/type-detect', - ], - }, - { - groupSlug: 'typescript', - groupName: 'typescript related packages', - packagePatterns: [ - '(\\b|_)ts(\\b|_)', - '(\\b|_)typescript(\\b|_)', - ], - packageNames: [ - 'tslib', - '@types/tslib', - ], - }, - { - groupSlug: 'use-resize-observer', - groupName: 'use-resize-observer related packages', - packageNames: [ - 'use-resize-observer', - '@types/use-resize-observer', - ], - }, - { - groupSlug: 'uuid', - groupName: 'uuid related packages', - packageNames: [ - 'uuid', - '@types/uuid', - ], - }, - { - groupSlug: 'vega', - groupName: 'vega related packages', - packagePatterns: [ - '(\\b|_)vega(\\b|_)', - ], - enabled: false, - }, - { - groupSlug: 'vinyl', - groupName: 'vinyl related packages', - packageNames: [ - 'vinyl', - '@types/vinyl', - ], - }, - { - groupSlug: 'vinyl-fs', - groupName: 'vinyl-fs related packages', - packageNames: [ - 'vinyl-fs', - '@types/vinyl-fs', - ], - }, - { - groupSlug: 'watchpack', - groupName: 'watchpack related packages', - packageNames: [ - 'watchpack', - '@types/watchpack', - ], - }, - { - groupSlug: 'webpack', - groupName: 'webpack related packages', - packagePatterns: [ - '(\\b|_)webpack(\\b|_)', - '(\\b|_)loader(\\b|_)', - '(\\b|_)acorn(\\b|_)', - '(\\b|_)terser(\\b|_)', - ], - packageNames: [ - 'mini-css-extract-plugin', - '@types/mini-css-extract-plugin', - 'chokidar', - '@types/chokidar', - ], - }, - { - groupSlug: 'write-pkg', - groupName: 'write-pkg related packages', - packageNames: [ - 'write-pkg', - '@types/write-pkg', - ], - }, - { - groupSlug: 'xml-crypto', - groupName: 'xml-crypto related packages', - packageNames: [ - 'xml-crypto', - '@types/xml-crypto', - ], - }, - { - groupSlug: 'xml2js', - groupName: 'xml2js related packages', - packageNames: [ - 'xml2js', - '@types/xml2js', - ], - }, - { - groupSlug: 'zen-observable', - groupName: 'zen-observable related packages', - packageNames: [ - 'zen-observable', - '@types/zen-observable', - ], - }, - { - packagePatterns: [ - '^@osd/.*', - ], - enabled: false, - }, - ], - }, - prConcurrentLimit: 0, - vulnerabilityAlerts: { - enabled: false, - }, - rebaseStalePrs: false, - rebaseConflictedPrs: false, - semanticCommits: false, -} diff --git a/src/core/CONVENTIONS.md b/src/core/CONVENTIONS.md index 5d24b54d9920..7c3de41e5751 100644 --- a/src/core/CONVENTIONS.md +++ b/src/core/CONVENTIONS.md @@ -171,7 +171,7 @@ import { MyAppRoot } from './components/app.ts'; */ export const renderApp = ( core: CoreStart, - deps: MyPluginDepsStart, + deps: MyPluginStartDeps, { element, history }: AppMountParameters ) => { ReactDOM.render(, element); @@ -182,10 +182,10 @@ export const renderApp = ( ```ts // my_plugin/public/plugin.ts -import { Plugin } from '../../src/core/public'; +import { Plugin, CoreSetup } from '../../src/core/public'; export class MyPlugin implements Plugin { - public setup(core) { + public setup(core: CoreSetup) { core.application.register({ id: 'my-app', async mount(params) { @@ -200,14 +200,14 @@ export class MyPlugin implements Plugin { } ``` -Prefer the pattern shown above, using `core.getStartServices()`, rather than store local references retrieved from `start`. +Prefer the pattern shown above, using `core.getStartServices()`, rather than store local references retrieved from `start`. **Bad:** ```ts export class MyPlugin implements Plugin { // Anti pattern private coreStart?: CoreStart; - private depsStart?: DepsStart; + private depsStart?: DepsStart; public setup(core) { core.application.register({ @@ -218,7 +218,7 @@ export class MyPlugin implements Plugin { return renderApp(this.coreStart, this.depsStart, params); } }); - } + } public start(core, deps) { // Anti pattern @@ -359,5 +359,5 @@ Migration example from the legacy format is available in `src/core/MIGRATION_EXA ### Naming conventions -Export start and setup contracts as `MyPluginStart` and `MyPluginSetup`. +Export start and setup contracts as `MyPluginStart` and `MyPluginSetup`. This avoids naming clashes, if everyone exported them simply as `Start` and `Setup`. diff --git a/src/dev/build/lib/config.test.ts b/src/dev/build/lib/config.test.ts index a625aab9e256..145954c1fb40 100644 --- a/src/dev/build/lib/config.test.ts +++ b/src/dev/build/lib/config.test.ts @@ -79,10 +79,10 @@ describe('#getOpenSearchDashboardsPkg()', () => { }); }); -describe('#getNodeVersion()', () => { - it('returns the node version from the OpenSearch Dashboards package.json', async () => { +describe('#getNodeRange()', () => { + it('returns the node version range from the OpenSearch Dashboards package.json', async () => { const config = await setup(); - expect(config.getNodeVersion()).toEqual(pkg.engines.node); + expect(config.getNodeRange()).toEqual(pkg.engines.node); }); }); diff --git a/src/dev/build/lib/config.ts b/src/dev/build/lib/config.ts index 4f47a5ec8f50..03fdd14b05c0 100644 --- a/src/dev/build/lib/config.ts +++ b/src/dev/build/lib/config.ts @@ -86,7 +86,7 @@ export class Config { private readonly targetAllPlatforms: boolean, private readonly targetPlatforms: TargetPlatforms, private readonly pkg: Package, - private readonly nodeVersion: string, + private readonly nodeRange: string, private readonly repoRoot: string, private readonly versionInfo: VersionInfo, public readonly isRelease: boolean @@ -102,8 +102,8 @@ export class Config { /** * Get the node version required by OpenSearch Dashboards */ - getNodeVersion() { - return this.nodeVersion; + getNodeRange() { + return this.nodeRange; } /** diff --git a/src/dev/build/tasks/create_archives_sources_task.ts b/src/dev/build/tasks/create_archives_sources_task.ts index 0409c4067088..bf53c2915560 100644 --- a/src/dev/build/tasks/create_archives_sources_task.ts +++ b/src/dev/build/tasks/create_archives_sources_task.ts @@ -50,7 +50,7 @@ export const CreateArchivesSources: Task = { // copy node.js install await scanCopy({ - source: getNodeDownloadInfo(config, platform).extractDir, + source: (await getNodeDownloadInfo(config, platform)).extractDir, destination: build.resolvePathForPlatform(platform, 'node'), }); diff --git a/src/dev/build/tasks/nodejs/download_node_builds_task.ts b/src/dev/build/tasks/nodejs/download_node_builds_task.ts index 91331184ce76..9771e92e209f 100644 --- a/src/dev/build/tasks/nodejs/download_node_builds_task.ts +++ b/src/dev/build/tasks/nodejs/download_node_builds_task.ts @@ -30,16 +30,17 @@ import { download, GlobalTask } from '../../lib'; import { getNodeShasums } from './node_shasums'; -import { getNodeDownloadInfo } from './node_download_info'; +import { getLatestNodeVersion, getNodeDownloadInfo } from './node_download_info'; export const DownloadNodeBuilds: GlobalTask = { global: true, description: 'Downloading node.js builds for all platforms', async run(config, log) { - const shasums = await getNodeShasums(log, config.getNodeVersion()); + const latestNodeVersion = await getLatestNodeVersion(config); + const shasums = await getNodeShasums(log, latestNodeVersion); await Promise.all( config.getTargetPlatforms().map(async (platform) => { - const { url, downloadPath, downloadName } = getNodeDownloadInfo(config, platform); + const { url, downloadPath, downloadName } = await getNodeDownloadInfo(config, platform); await download({ log, url, diff --git a/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts b/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts index 6b3a066a1d2d..02a6a7bfa723 100644 --- a/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts +++ b/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts @@ -28,10 +28,6 @@ * under the License. */ -import { readFileSync } from 'fs'; -import Path from 'path'; - -import { REPO_ROOT } from '@osd/utils'; import { ToolingLog, ToolingLogCollectingWriter, @@ -41,6 +37,7 @@ import { import { Config } from '../../lib'; import { ExtractNodeBuilds } from './extract_node_builds_task'; +import { getLatestNodeVersion } from './node_download_info'; jest.mock('../../lib/fs'); jest.mock('../../lib/get_build_number'); @@ -53,14 +50,6 @@ log.setWriters([testWriter]); expect.addSnapshotSerializer(createAbsolutePathSerializer()); -const nodeVersion = readFileSync(Path.resolve(REPO_ROOT, '.node-version'), 'utf8').trim(); -expect.addSnapshotSerializer( - createRecursiveSerializer( - (s) => typeof s === 'string' && s.includes(nodeVersion), - (s) => s.split(nodeVersion).join('') - ) -); - async function setup() { const config = await Config.create({ isRelease: true, @@ -73,6 +62,16 @@ async function setup() { }, }); + const realNodeVersion = await getLatestNodeVersion(config); + if (realNodeVersion) { + expect.addSnapshotSerializer( + createRecursiveSerializer( + (s) => typeof s === 'string' && s.includes(realNodeVersion), + (s) => s.split(realNodeVersion).join('') + ) + ); + } + return { config }; } diff --git a/src/dev/build/tasks/nodejs/extract_node_builds_task.ts b/src/dev/build/tasks/nodejs/extract_node_builds_task.ts index 8252ce2153f5..28b2ebe24d4b 100644 --- a/src/dev/build/tasks/nodejs/extract_node_builds_task.ts +++ b/src/dev/build/tasks/nodejs/extract_node_builds_task.ts @@ -37,7 +37,7 @@ export const ExtractNodeBuilds: GlobalTask = { async run(config) { await Promise.all( config.getTargetPlatforms().map(async (platform) => { - const { downloadPath, extractDir } = getNodeDownloadInfo(config, platform); + const { downloadPath, extractDir } = await getNodeDownloadInfo(config, platform); if (platform.isWindows()) { await unzip(downloadPath, extractDir, { strip: 1 }); } else { diff --git a/src/dev/build/tasks/nodejs/node_download_info.ts b/src/dev/build/tasks/nodejs/node_download_info.ts index 86e0c680ab0d..e2101d3453be 100644 --- a/src/dev/build/tasks/nodejs/node_download_info.ts +++ b/src/dev/build/tasks/nodejs/node_download_info.ts @@ -29,11 +29,15 @@ */ import { basename } from 'path'; +import fetch from 'node-fetch'; +import semver from 'semver'; import { Config, Platform } from '../../lib'; -export function getNodeDownloadInfo(config: Config, platform: Platform) { - const version = config.getNodeVersion(); +const NODE_RANGE_CACHE: { [key: string]: string } = {}; + +export async function getNodeDownloadInfo(config: Config, platform: Platform) { + const version = await getLatestNodeVersion(config); const arch = platform.getNodeArch(); const downloadName = platform.isWindows() @@ -52,3 +56,23 @@ export function getNodeDownloadInfo(config: Config, platform: Platform) { version, }; } + +export async function getLatestNodeVersion(config: Config) { + const range = config.getNodeRange(); + // Check cache and return if known + if (NODE_RANGE_CACHE[range]) return NODE_RANGE_CACHE[range]; + + const releaseDoc = await fetch('https://nodejs.org/dist/index.json'); + const releaseList: [{ version: string }] = await releaseDoc.json(); + const releases = releaseList.map(({ version }) => version.replace(/^v/, '')); + const maxVersion = semver.maxSatisfying(releases, range); + + if (!maxVersion) { + throw new Error(`Cannot find a version of Node.js that satisfies ${range}.`); + } + + // Cache it + NODE_RANGE_CACHE[range] = maxVersion; + + return maxVersion; +} diff --git a/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts b/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts index ccb75897ccfd..4724fa73e9f0 100644 --- a/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts +++ b/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts @@ -28,15 +28,10 @@ * under the License. */ -import Path from 'path'; -import Fs from 'fs'; - -import { REPO_ROOT } from '@osd/utils'; import { ToolingLog, ToolingLogCollectingWriter, createAnyInstanceSerializer, - createRecursiveSerializer, } from '@osd/dev-utils'; import { Config, Platform } from '../../lib'; @@ -48,7 +43,7 @@ jest.mock('../../lib/fs'); jest.mock('../../lib/get_build_number'); const { getNodeShasums } = jest.requireMock('./node_shasums'); -const { getNodeDownloadInfo } = jest.requireMock('./node_download_info'); +const { getNodeDownloadInfo, getLatestNodeVersion } = jest.requireMock('./node_download_info'); const { getFileHash } = jest.requireMock('../../lib/fs'); const log = new ToolingLog(); @@ -58,14 +53,6 @@ log.setWriters([testWriter]); expect.addSnapshotSerializer(createAnyInstanceSerializer(Config)); expect.addSnapshotSerializer(createAnyInstanceSerializer(ToolingLog)); -const nodeVersion = Fs.readFileSync(Path.resolve(REPO_ROOT, '.node-version'), 'utf8').trim(); -expect.addSnapshotSerializer( - createRecursiveSerializer( - (s) => typeof s === 'string' && s.includes(nodeVersion), - (s) => s.split(nodeVersion).join('') - ) -); - async function setup(actualShaSums?: Record) { const config = await Config.create({ isRelease: true, @@ -74,6 +61,7 @@ async function setup(actualShaSums?: Record) { linux: false, linuxArm: false, darwin: false, + windows: false, }, }); @@ -89,9 +77,12 @@ async function setup(actualShaSums?: Record) { return { downloadPath: `${platform.getName()}:${platform.getNodeArch()}:downloadPath`, downloadName: `${platform.getName()}:${platform.getNodeArch()}:downloadName`, + version: '', }; }); + getLatestNodeVersion.mockReturnValue(''); + getFileHash.mockImplementation((downloadPath: string) => { if (actualShaSums?.[downloadPath]) { return actualShaSums[downloadPath]; @@ -176,6 +167,7 @@ it('checks shasums for each downloaded node build', async () => { "value": Object { "downloadName": "linux:linux-x64:downloadName", "downloadPath": "linux:linux-x64:downloadPath", + "version": "", }, }, Object { @@ -183,6 +175,7 @@ it('checks shasums for each downloaded node build', async () => { "value": Object { "downloadName": "linux:linux-arm64:downloadName", "downloadPath": "linux:linux-arm64:downloadPath", + "version": "", }, }, Object { @@ -190,6 +183,7 @@ it('checks shasums for each downloaded node build', async () => { "value": Object { "downloadName": "darwin:darwin-x64:downloadName", "downloadPath": "darwin:darwin-x64:downloadPath", + "version": "", }, }, Object { @@ -197,6 +191,7 @@ it('checks shasums for each downloaded node build', async () => { "value": Object { "downloadName": "win32:win32-x64:downloadName", "downloadPath": "win32:win32-x64:downloadPath", + "version": "", }, }, ], diff --git a/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.ts b/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.ts index 665774bf5bc7..4c64c4bbd25d 100644 --- a/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.ts +++ b/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.ts @@ -29,18 +29,19 @@ */ import { getFileHash, GlobalTask } from '../../lib'; -import { getNodeDownloadInfo } from './node_download_info'; +import { getNodeDownloadInfo, getLatestNodeVersion } from './node_download_info'; import { getNodeShasums } from './node_shasums'; export const VerifyExistingNodeBuilds: GlobalTask = { global: true, description: 'Verifying previously downloaded node.js build for all platforms', async run(config, log) { - const shasums = await getNodeShasums(log, config.getNodeVersion()); + const latestNodeVersion = await getLatestNodeVersion(config); + const shasums = await getNodeShasums(log, latestNodeVersion); await Promise.all( config.getTargetPlatforms().map(async (platform) => { - const { downloadPath, downloadName } = getNodeDownloadInfo(config, platform); + const { downloadPath, downloadName } = await getNodeDownloadInfo(config, platform); const sha256 = await getFileHash(downloadPath, 'sha256'); if (sha256 !== shasums[downloadName]) { diff --git a/src/dev/build/tasks/notice_file_task.ts b/src/dev/build/tasks/notice_file_task.ts index 5532d2d5db41..08792b653f49 100644 --- a/src/dev/build/tasks/notice_file_task.ts +++ b/src/dev/build/tasks/notice_file_task.ts @@ -57,7 +57,7 @@ export const CreateNoticeFile: Task = { log.info('Generating build notice'); - const { extractDir: nodeDir, version: nodeVersion } = getNodeDownloadInfo( + const { extractDir: nodeDir, version: nodeVersion } = await getNodeDownloadInfo( config, config.hasSpecifiedPlatform() ? config.getPlatform( diff --git a/src/dev/build/tasks/patch_native_modules_task.ts b/src/dev/build/tasks/patch_native_modules_task.ts index 7b9e67db148d..3bd9fa63c358 100644 --- a/src/dev/build/tasks/patch_native_modules_task.ts +++ b/src/dev/build/tasks/patch_native_modules_task.ts @@ -52,17 +52,16 @@ interface Package { >; } -// Process for updating urls and checksums after bumping the version of `re2`: -// 1. Match `version` with the version in the yarn.lock file. -// 2. Update the url to match the version. -// 2a. If a Node.js update occurs, the node module version must match as -// well (i.e. '83'). See https://nodejs.org/en/download/releases/#ref-1. -// 3. Generate the new checksum by executing the following commands: -// 3a. `wget {url}` -// 3b. `sha256sum {downloaded file name}` -// 3c. For `linux-arm64`, the sha256 can also be found by replacing -// "linux-arm64-83.tar.gz" in the url with "sha256sum.txt.asc" -// and copying the sha256 from that file. +/* Process for updating URLs and checksums after bumping the version of `re2` or NodeJS: + * 1. Match the `version` with the version in the yarn.lock file. + * 2. Match the module version, the digits at the end of the filename, with the output of + * `node -p process.versions.modules`. + * 3. Confirm that the URLs exist for each platform-architecture combo on + * https://github.com/uhop/node-re2/releases/tag/[VERSION]; reach out to maintainers for ARM + * releases of `re2` as they currently don't have an official ARM release. + * 4. Generate new checksums for each artifact by downloading each one and calling + * `shasum -a 256` or `sha256sum` on the downloaded file. + */ const packages: Package[] = [ { name: 're2', diff --git a/src/dev/build/tasks/verify_env_task.ts b/src/dev/build/tasks/verify_env_task.ts index a6b3bd885576..ceef5c8d38c5 100644 --- a/src/dev/build/tasks/verify_env_task.ts +++ b/src/dev/build/tasks/verify_env_task.ts @@ -28,6 +28,7 @@ * under the License. */ +import semver from 'semver'; import { GlobalTask } from '../lib'; export const VerifyEnv: GlobalTask = { @@ -35,10 +36,12 @@ export const VerifyEnv: GlobalTask = { description: 'Verifying environment meets requirements', async run(config, log) { - const version = `v${config.getNodeVersion()}`; + const range = config.getNodeRange(); - if (version !== process.version) { - throw new Error(`Invalid nodejs version, please use ${version}`); + if (!semver.satisfies(process.version, range)) { + throw new Error( + `Invalid Node.js version (${process.version}); please use a version that satisfies ${range}.` + ); } log.success('Node.js version verified'); diff --git a/src/dev/jest/config.js b/src/dev/jest/config.js index 8dd5240f69de..c7e31c37f7e2 100644 --- a/src/dev/jest/config.js +++ b/src/dev/jest/config.js @@ -52,6 +52,8 @@ export default { moduleNameMapper: { '@elastic/eui$': '/node_modules/@elastic/eui/test-env', '@elastic/eui/lib/(.*)?': '/node_modules/@elastic/eui/test-env/$1', + '@opensearch-project/opensearch/aws': + '/node_modules/@opensearch-project/opensearch/lib/aws', '^src/plugins/(.*)': '/src/plugins/$1', '^test_utils/(.*)': '/src/test_utils/public/$1', '^fixtures/(.*)': '/src/fixtures/$1', diff --git a/src/dev/node_versions_must_match.test.ts b/src/dev/node_versions_must_match.test.ts index 7ddaa54b121c..c97557072078 100644 --- a/src/dev/node_versions_must_match.test.ts +++ b/src/dev/node_versions_must_match.test.ts @@ -29,11 +29,13 @@ */ import fs from 'fs'; +import semver from 'semver'; import { engines } from '../../package.json'; import { promisify } from 'util'; const readFile = promisify(fs.readFile); import expect from '@osd/expect'; +// ToDo: `.node-version` seems to exist for no good reason; find out if we can get rid of it and this test. describe('All configs should use a single version of Node', () => { it('should compare .node-version and .nvmrc', async () => { const [nodeVersion, nvmrc] = await Promise.all([ @@ -48,6 +50,6 @@ describe('All configs should use a single version of Node', () => { const nodeVersion = await readFile('./.node-version', { encoding: 'utf-8', }); - expect(nodeVersion.trim()).to.be(engines.node); + expect(semver.satisfies(nodeVersion.trim(), engines.node)).to.be(true); }); }); diff --git a/src/dev/notice/generate_notice_from_source.ts b/src/dev/notice/generate_notice_from_source.ts index 458d123c934e..0bfc2a978e0f 100644 --- a/src/dev/notice/generate_notice_from_source.ts +++ b/src/dev/notice/generate_notice_from_source.ts @@ -37,7 +37,7 @@ const NOTICE_TEXT = `Copyright OpenSearch Contributors This product includes software, including Kibana source code, developed by Elasticsearch (http://www.elastic.co). -Copyright 2009-2018 Elasticsearch B.V. +Copyright 2009-2021 Elasticsearch B.V. This product includes software developed by The Apache Software Foundation (http://www.apache.org/) diff --git a/src/plugins/data/server/plugin.ts b/src/plugins/data/server/plugin.ts index f9159b3246ff..a1e52fbb66a1 100644 --- a/src/plugins/data/server/plugin.ts +++ b/src/plugins/data/server/plugin.ts @@ -96,7 +96,7 @@ export class DataServerPlugin this.autocompleteService = new AutocompleteService(initializerContext); } - public setup( + public async setup( core: CoreSetup, { expressions, usageCollection, dataSource }: DataPluginSetupDependencies ) { @@ -108,7 +108,7 @@ export class DataServerPlugin core.uiSettings.register(getUiSettings()); - const searchSetup = this.searchService.setup(core, { + const searchSetup = await this.searchService.setup(core, { registerFunction: expressions.registerFunction, usageCollection, dataSource, diff --git a/src/plugins/data/server/search/collectors/usage.ts b/src/plugins/data/server/search/collectors/usage.ts index d227dea8057c..6bf6a90c63bd 100644 --- a/src/plugins/data/server/search/collectors/usage.ts +++ b/src/plugins/data/server/search/collectors/usage.ts @@ -28,8 +28,7 @@ * under the License. */ -import { CoreSetup, PluginInitializerContext } from 'opensearch-dashboards/server'; -import { first } from 'rxjs/operators'; +import { CoreSetup } from 'opensearch-dashboards/server'; import { Usage } from './register'; import { ConfigSchema } from '../../../config'; @@ -40,16 +39,9 @@ export interface SearchUsage { trackSuccess(duration: number): Promise; } -export function usageProvider( - core: CoreSetup, - initializerContext: PluginInitializerContext -): SearchUsage { +export function usageProvider(core: CoreSetup, config: ConfigSchema): SearchUsage { const getTracker = (eventType: keyof Usage) => { return async (duration?: number) => { - const config = await initializerContext.config - .create() - .pipe(first()) - .toPromise(); if (config?.search?.usageTelemetry?.enabled) { const repository = await core .getStartServices() diff --git a/src/plugins/data/server/search/search_service.test.ts b/src/plugins/data/server/search/search_service.test.ts index 1cece2277c09..4a608c3df7e9 100644 --- a/src/plugins/data/server/search/search_service.test.ts +++ b/src/plugins/data/server/search/search_service.test.ts @@ -53,7 +53,7 @@ describe('Search service', () => { describe('setup()', () => { it('exposes proper contract', async () => { - const setup = plugin.setup(mockCoreSetup, ({ + const setup = await plugin.setup(mockCoreSetup, ({ packageInfo: { version: '8' }, registerFunction: jest.fn(), } as unknown) as SearchServiceSetupDependencies); diff --git a/src/plugins/data/server/search/search_service.ts b/src/plugins/data/server/search/search_service.ts index 0c33b95f4606..6620b88a0fe3 100644 --- a/src/plugins/data/server/search/search_service.ts +++ b/src/plugins/data/server/search/search_service.ts @@ -105,11 +105,15 @@ export class SearchService implements Plugin { private readonly logger: Logger ) {} - public setup( + public async setup( core: CoreSetup<{}, DataPluginStart>, { registerFunction, usageCollection, dataSource }: SearchServiceSetupDependencies - ): ISearchSetup { - const usage = usageCollection ? usageProvider(core, this.initializerContext) : undefined; + ): Promise { + const config = await this.initializerContext.config + .create() + .pipe(first()) + .toPromise(); + const usage = usageCollection ? usageProvider(core, config) : undefined; const router = core.http.createRouter(); const routeDependencies = { diff --git a/src/plugins/data_source/common/data_sources/types.ts b/src/plugins/data_source/common/data_sources/types.ts index afcf3d662fed..366e5a0f3f55 100644 --- a/src/plugins/data_source/common/data_sources/types.ts +++ b/src/plugins/data_source/common/data_sources/types.ts @@ -11,8 +11,20 @@ export interface DataSourceAttributes extends SavedObjectAttributes { endpoint: string; auth: { type: AuthType; - credentials: UsernamePasswordTypedContent | undefined; + credentials: UsernamePasswordTypedContent | SigV4Content | undefined; }; + lastUpdatedTime?: string; +} + +/** + * Multiple datasource supports authenticating as IAM user, it doesn't support IAM role. + * Because IAM role session requires temporary security credentials through assuming role, + * which makes no sense to store the credentials. + */ +export interface SigV4Content extends SavedObjectAttributes { + accessKey: string; + secretKey: string; + region: string; } export interface UsernamePasswordTypedContent extends SavedObjectAttributes { @@ -23,4 +35,5 @@ export interface UsernamePasswordTypedContent extends SavedObjectAttributes { export enum AuthType { NoAuth = 'no_auth', UsernamePasswordType = 'username_password', + SigV4 = 'sigv4', } diff --git a/src/plugins/data_source/server/client/client_pool.ts b/src/plugins/data_source/server/client/client_pool.ts index f492d6bc2898..288682ef2538 100644 --- a/src/plugins/data_source/server/client/client_pool.ts +++ b/src/plugins/data_source/server/client/client_pool.ts @@ -7,11 +7,12 @@ import { Client } from '@opensearch-project/opensearch'; import { Client as LegacyClient } from 'elasticsearch'; import LRUCache from 'lru-cache'; import { Logger } from 'src/core/server'; +import { AuthType } from '../../common/data_sources'; import { DataSourcePluginConfigType } from '../../config'; export interface OpenSearchClientPoolSetup { - getClientFromPool: (id: string) => Client | LegacyClient | undefined; - addClientToPool: (endpoint: string, client: Client | LegacyClient) => void; + getClientFromPool: (endpoint: string, authType: AuthType) => Client | LegacyClient | undefined; + addClientToPool: (endpoint: string, authType: AuthType, client: Client | LegacyClient) => void; } /** @@ -21,10 +22,14 @@ export interface OpenSearchClientPoolSetup { * It reuse TPC connections for each OpenSearch endpoint. */ export class OpenSearchClientPool { - // LRU cache + // LRU cache of client // key: data source endpoint - // value: OpenSearch client object | Legacy client object - private cache?: LRUCache; + // value: OpenSearch client | Legacy client + private clientCache?: LRUCache; + // LRU cache of aws clients + // key: endpoint + dataSourceId + lastUpdatedTime together to support update case. + // value: OpenSearch client | Legacy client + private awsClientCache?: LRUCache; private isClosed = false; constructor(private logger: Logger) {} @@ -32,12 +37,13 @@ export class OpenSearchClientPool { public setup(config: DataSourcePluginConfigType): OpenSearchClientPoolSetup { const logger = this.logger; const { size } = config.clientPool; + const MAX_AGE = 15 * 60 * 1000; // by default, TCP connection times out in 15 minutes - this.cache = new LRUCache({ + this.clientCache = new LRUCache({ max: size, - maxAge: 15 * 60 * 1000, // by default, TCP connection times out in 15 minutes + maxAge: MAX_AGE, - async dispose(endpoint, client) { + async dispose(key, client) { try { await client.close(); } catch (error: any) { @@ -50,12 +56,34 @@ export class OpenSearchClientPool { }); this.logger.info(`Created data source client pool of size ${size}`); - const getClientFromPool = (endpoint: string) => { - return this.cache!.get(endpoint); + // aws client specific pool + this.awsClientCache = new LRUCache({ + max: size, + maxAge: MAX_AGE, + + async dispose(key, client) { + try { + await client.close(); + } catch (error: any) { + logger.warn( + `Error closing OpenSearch client when removing from aws client pool: ${error.message}` + ); + } + }, + }); + this.logger.info(`Created data source aws client pool of size ${size}`); + + const getClientFromPool = (key: string, authType: AuthType) => { + const selectedCache = authType === AuthType.SigV4 ? this.awsClientCache : this.clientCache; + + return selectedCache!.get(key); }; - const addClientToPool = (endpoint: string, client: Client | LegacyClient) => { - this.cache!.set(endpoint, client); + const addClientToPool = (key: string, authType: string, client: Client | LegacyClient) => { + const selectedCache = authType === AuthType.SigV4 ? this.awsClientCache : this.clientCache; + if (!selectedCache?.has(key)) { + return selectedCache!.set(key, client); + } }; return { @@ -71,7 +99,15 @@ export class OpenSearchClientPool { if (this.isClosed) { return; } - await Promise.all(this.cache!.values().map((client) => client.close())); - this.isClosed = true; + + try { + await Promise.all([ + ...this.clientCache!.values().map((client) => client.close()), + ...this.awsClientCache!.values().map((client) => client.close()), + ]); + this.isClosed = true; + } catch (error) { + this.logger.error(`Error closing clients in pool. ${error}`); + } } } diff --git a/src/plugins/data_source/server/client/configure_client.test.ts b/src/plugins/data_source/server/client/configure_client.test.ts index fa4044163610..1499ccd411c2 100644 --- a/src/plugins/data_source/server/client/configure_client.test.ts +++ b/src/plugins/data_source/server/client/configure_client.test.ts @@ -6,7 +6,12 @@ import { SavedObjectsClientContract } from '../../../../core/server'; import { loggingSystemMock, savedObjectsClientMock } from '../../../../core/server/mocks'; import { DATA_SOURCE_SAVED_OBJECT_TYPE } from '../../common'; -import { DataSourceAttributes, AuthType } from '../../common/data_sources/types'; +import { + DataSourceAttributes, + AuthType, + UsernamePasswordTypedContent, + SigV4Content, +} from '../../common/data_sources/types'; import { DataSourcePluginConfigType } from '../../config'; import { ClientMock, parseClientOptionsMock } from './configure_client.test.mocks'; import { OpenSearchClientPoolSetup } from './client_pool'; @@ -31,6 +36,8 @@ describe('configureClient', () => { let dataSourceAttr: DataSourceAttributes; let dsClient: ReturnType; let dataSourceClientParams: DataSourceClientParams; + let usernamePasswordAuthContent: UsernamePasswordTypedContent; + let sigV4AuthContent: SigV4Content; beforeEach(() => { dsClient = opensearchClientMock.createInternalClient(); @@ -51,15 +58,24 @@ describe('configureClient', () => { rejectUnauthorized: true, }, } as ClientOptions; + + usernamePasswordAuthContent = { + username: 'username', + password: 'password', + }; + + sigV4AuthContent = { + region: 'us-east-1', + accessKey: 'accessKey', + secretKey: 'secretKey', + }; + dataSourceAttr = { title: 'title', endpoint: 'http://localhost', auth: { type: AuthType.UsernamePasswordType, - credentials: { - username: 'username', - password: 'password', - }, + credentials: usernamePasswordAuthContent, }, } as DataSourceAttributes; @@ -126,6 +142,48 @@ describe('configureClient', () => { expect(client).toBe(dsClient.child.mock.results[0].value); }); + test('configure client with auth.type == sigv4, will first call decodeAndDecrypt()', async () => { + savedObjectsMock.get.mockReset().mockResolvedValueOnce({ + id: DATA_SOURCE_ID, + type: DATA_SOURCE_SAVED_OBJECT_TYPE, + attributes: { + ...dataSourceAttr, + auth: { + type: AuthType.SigV4, + credentials: sigV4AuthContent, + }, + }, + references: [], + }); + + const decodeAndDecryptSpy = jest.spyOn(cryptographyMock, 'decodeAndDecrypt').mockResolvedValue({ + decryptedText: 'accessKey', + encryptionContext: { endpoint: 'http://localhost' }, + }); + await configureClient(dataSourceClientParams, clientPoolSetup, config, logger); + + expect(ClientMock).toHaveBeenCalledTimes(1); + expect(savedObjectsMock.get).toHaveBeenCalledTimes(1); + expect(decodeAndDecryptSpy).toHaveBeenCalledTimes(2); + }); + + test('configure test client for non-exist datasource should not call saved object api, nor decode any credential', async () => { + const decodeAndDecryptSpy = jest.spyOn(cryptographyMock, 'decodeAndDecrypt').mockResolvedValue({ + decryptedText: 'password', + encryptionContext: { endpoint: 'http://localhost' }, + }); + const testClientParams: DataSourceClientParams = { + ...dataSourceClientParams, + testClientDataSourceAttr: dataSourceAttr, + dataSourceId: undefined, + }; + await configureClient(testClientParams, clientPoolSetup, config, logger); + + expect(ClientMock).toHaveBeenCalledTimes(1); + expect(savedObjectsMock.get).not.toHaveBeenCalled(); + expect(decodeAndDecryptSpy).not.toHaveBeenCalled(); + }); + test('configure client with auth.type == username_password and password contaminated', async () => { const decodeAndDecryptSpy = jest .spyOn(cryptographyMock, 'decodeAndDecrypt') @@ -137,7 +195,7 @@ describe('configureClient', () => { configureClient(dataSourceClientParams, clientPoolSetup, config, logger) ).rejects.toThrowError(); - expect(ClientMock).toHaveBeenCalledTimes(1); + expect(ClientMock).not.toHaveBeenCalled(); expect(savedObjectsMock.get).toHaveBeenCalledTimes(1); expect(decodeAndDecryptSpy).toHaveBeenCalledTimes(1); }); @@ -152,7 +210,7 @@ describe('configureClient', () => { configureClient(dataSourceClientParams, clientPoolSetup, config, logger) ).rejects.toThrowError(); - expect(ClientMock).toHaveBeenCalledTimes(1); + expect(ClientMock).not.toHaveBeenCalled(); expect(savedObjectsMock.get).toHaveBeenCalledTimes(1); expect(decodeAndDecryptSpy).toHaveBeenCalledTimes(1); }); diff --git a/src/plugins/data_source/server/client/configure_client.ts b/src/plugins/data_source/server/client/configure_client.ts index cc9bcfd9b361..8b43ffa80b23 100644 --- a/src/plugins/data_source/server/client/configure_client.ts +++ b/src/plugins/data_source/server/client/configure_client.ts @@ -3,12 +3,15 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Client } from '@opensearch-project/opensearch'; -import { Logger, SavedObject, SavedObjectsClientContract } from '../../../../../src/core/server'; -import { DATA_SOURCE_SAVED_OBJECT_TYPE } from '../../common'; +import { Client, ClientOptions } from '@opensearch-project/opensearch'; +import { Client as LegacyClient } from 'elasticsearch'; +import { Credentials } from 'aws-sdk'; +import { AwsSigv4Signer } from '@opensearch-project/opensearch/aws'; +import { Logger } from '../../../../../src/core/server'; import { AuthType, DataSourceAttributes, + SigV4Content, UsernamePasswordTypedContent, } from '../../common/data_sources'; import { DataSourcePluginConfigType } from '../../config'; @@ -17,152 +20,125 @@ import { createDataSourceError } from '../lib/error'; import { DataSourceClientParams } from '../types'; import { parseClientOptions } from './client_config'; import { OpenSearchClientPoolSetup } from './client_pool'; +import { + getRootClient, + getAWSCredential, + getCredential, + getDataSource, + generateCacheKey, +} from './configure_client_utils'; export const configureClient = async ( - { dataSourceId, savedObjects, cryptography }: DataSourceClientParams, + { dataSourceId, savedObjects, cryptography, testClientDataSourceAttr }: DataSourceClientParams, openSearchClientPoolSetup: OpenSearchClientPoolSetup, config: DataSourcePluginConfigType, logger: Logger ): Promise => { - try { - const { attributes: dataSource } = await getDataSource(dataSourceId!, savedObjects); - const rootClient = getRootClient(dataSource, config, openSearchClientPoolSetup); - - return await getQueryClient(rootClient, dataSource, cryptography); - } catch (error: any) { - logger.error(`Failed to get data source client for dataSourceId: [${dataSourceId}]`); - logger.error(error); - // Re-throw as DataSourceError - throw createDataSourceError(error); - } -}; + let dataSource; + let requireDecryption = true; -export const configureTestClient = async ( - { savedObjects, cryptography, dataSourceId }: DataSourceClientParams, - dataSource: DataSourceAttributes, - openSearchClientPoolSetup: OpenSearchClientPoolSetup, - config: DataSourcePluginConfigType, - logger: Logger -): Promise => { try { - const { - auth: { type, credentials }, - } = dataSource; - let requireDecryption = false; - - const rootClient = getRootClient(dataSource, config, openSearchClientPoolSetup); - - if (type === AuthType.UsernamePasswordType && !credentials?.password && dataSourceId) { - const dataSourceSavedObject = await getDataSource(dataSourceId, savedObjects); - dataSource = dataSourceSavedObject.attributes; - requireDecryption = true; + // configure test client + if (testClientDataSourceAttr) { + const { + auth: { type, credentials }, + } = testClientDataSourceAttr; + // handle test connection case when changing non-credential field of existing data source + if ( + dataSourceId && + ((type === AuthType.UsernamePasswordType && !credentials?.password) || + (type === AuthType.SigV4 && !credentials?.accessKey && !credentials?.secretKey)) + ) { + dataSource = await getDataSource(dataSourceId, savedObjects); + } else { + dataSource = testClientDataSourceAttr; + requireDecryption = false; + } + } else { + dataSource = await getDataSource(dataSourceId!, savedObjects); } - return getQueryClient(rootClient, dataSource, cryptography, requireDecryption); + const rootClient = getRootClient( + dataSource, + openSearchClientPoolSetup.getClientFromPool, + dataSourceId + ) as Client; + + return await getQueryClient( + dataSource, + openSearchClientPoolSetup.addClientToPool, + config, + cryptography, + rootClient, + dataSourceId, + requireDecryption + ); } catch (error: any) { - logger.error(`Failed to get test client for dataSource: ${dataSource}`); - logger.error(error); + logger.error( + `Failed to get data source client for dataSourceId: [${dataSourceId}]. ${error}: ${error.stack}` + ); // Re-throw as DataSourceError throw createDataSourceError(error); } }; -export const getDataSource = async ( - dataSourceId: string, - savedObjects: SavedObjectsClientContract -): Promise> => { - const dataSource = await savedObjects.get( - DATA_SOURCE_SAVED_OBJECT_TYPE, - dataSourceId - ); - - return dataSource; -}; - -export const getCredential = async ( - dataSource: DataSourceAttributes, - cryptography: CryptographyServiceSetup -): Promise => { - const { endpoint } = dataSource; - - const { username, password } = dataSource.auth.credentials!; - - const { decryptedText, encryptionContext } = await cryptography - .decodeAndDecrypt(password) - .catch((err: any) => { - // Re-throw as DataSourceError - throw createDataSourceError(err); - }); - - if (encryptionContext!.endpoint !== endpoint) { - throw new Error( - 'Data source "endpoint" contaminated. Please delete and create another data source.' - ); - } - - const credential = { - username, - password: decryptedText, - }; - - return credential; -}; - /** * Create a child client object with given auth info. * - * @param rootClient root client for the connection with given data source endpoint. - * @param dataSource data source saved object + * @param rootClient root client for the given data source. + * @param dataSourceAttr data source saved object attributes * @param cryptography cryptography service for password encryption / decryption - * @returns child client. + * @param config data source config + * @param addClientToPool function to add client to client pool + * @param dataSourceId id of data source saved Object + * @param requireDecryption false when creating test client before data source exists + * @returns Promise of query client */ const getQueryClient = async ( - rootClient: Client, - dataSource: DataSourceAttributes, + dataSourceAttr: DataSourceAttributes, + addClientToPool: (endpoint: string, authType: AuthType, client: Client | LegacyClient) => void, + config: DataSourcePluginConfigType, cryptography?: CryptographyServiceSetup, + rootClient?: Client, + dataSourceId?: string, requireDecryption: boolean = true ): Promise => { - const authType = dataSource.auth.type; - - switch (authType) { + const { + auth: { type }, + endpoint, + } = dataSourceAttr; + const clientOptions = parseClientOptions(config, endpoint); + const cacheKey = generateCacheKey(dataSourceAttr, dataSourceId); + + switch (type) { case AuthType.NoAuth: + if (!rootClient) rootClient = new Client(clientOptions); + addClientToPool(cacheKey, type, rootClient); + return rootClient.child(); case AuthType.UsernamePasswordType: const credential = requireDecryption - ? await getCredential(dataSource, cryptography!) - : (dataSource.auth.credentials as UsernamePasswordTypedContent); + ? await getCredential(dataSourceAttr, cryptography!) + : (dataSourceAttr.auth.credentials as UsernamePasswordTypedContent); + + if (!rootClient) rootClient = new Client(clientOptions); + addClientToPool(cacheKey, type, rootClient); + return getBasicAuthClient(rootClient, credential); - default: - throw Error(`${authType} is not a supported auth type for data source`); - } -}; + case AuthType.SigV4: + const awsCredential = requireDecryption + ? await getAWSCredential(dataSourceAttr, cryptography!) + : (dataSourceAttr.auth.credentials as SigV4Content); -/** - * Gets a root client object of the OpenSearch endpoint. - * Will attempt to get from cache, if cache miss, create a new one and load into cache. - * - * @param dataSourceAttr data source saved objects attributes. - * @param config data source config - * @returns OpenSearch client for the given data source endpoint. - */ -const getRootClient = ( - dataSourceAttr: DataSourceAttributes, - config: DataSourcePluginConfigType, - { getClientFromPool, addClientToPool }: OpenSearchClientPoolSetup -): Client => { - const endpoint = dataSourceAttr.endpoint; - const cachedClient = getClientFromPool(endpoint); - if (cachedClient) { - return cachedClient as Client; - } else { - const clientOptions = parseClientOptions(config, endpoint); + const awsClient = rootClient ? rootClient : getAWSClient(awsCredential, clientOptions); + addClientToPool(cacheKey, type, awsClient); - const client = new Client(clientOptions); - addClientToPool(endpoint, client); + return awsClient; - return client; + default: + throw Error(`${type} is not a supported auth type for data source`); } }; @@ -182,3 +158,21 @@ const getBasicAuthClient = ( headers: { authorization: null }, }); }; + +const getAWSClient = (credential: SigV4Content, clientOptions: ClientOptions): Client => { + const { accessKey, secretKey, region } = credential; + + const credentialProvider = (): Promise => { + return new Promise((resolve) => { + resolve(new Credentials({ accessKeyId: accessKey, secretAccessKey: secretKey })); + }); + }; + + return new Client({ + ...AwsSigv4Signer({ + region, + getCredentials: credentialProvider, + }), + ...clientOptions, + }); +}; diff --git a/src/plugins/data_source/server/client/configure_client_utils.ts b/src/plugins/data_source/server/client/configure_client_utils.ts new file mode 100644 index 000000000000..3ef8acc97b58 --- /dev/null +++ b/src/plugins/data_source/server/client/configure_client_utils.ts @@ -0,0 +1,146 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { Client } from '@opensearch-project/opensearch'; +import { Client as LegacyClient } from 'elasticsearch'; +import { SavedObjectsClientContract } from '../../../../../src/core/server'; +import { DATA_SOURCE_SAVED_OBJECT_TYPE } from '../../common'; +import { + DataSourceAttributes, + UsernamePasswordTypedContent, + SigV4Content, + AuthType, +} from '../../common/data_sources'; +import { CryptographyServiceSetup } from '../cryptography_service'; +import { createDataSourceError } from '../lib/error'; + +/** + * Get the root client of datasource from + * client cache. If there's a cache miss, return undefined. + * + * @param dataSourceAttr data source saved objects attributes + * @param dataSourceId id of data source saved Object + * @param addClientToPool function to get client from client pool + * @returns cached OpenSearch client, or undefined if cache miss + */ +export const getRootClient = ( + dataSourceAttr: DataSourceAttributes, + getClientFromPool: (endpoint: string, authType: AuthType) => Client | LegacyClient | undefined, + dataSourceId?: string +): Client | LegacyClient | undefined => { + const { + auth: { type }, + lastUpdatedTime, + } = dataSourceAttr; + let cachedClient; + const cacheKey = generateCacheKey(dataSourceAttr, dataSourceId); + + // return undefined when building SigV4 test client with new credentials + if (type === AuthType.SigV4) { + cachedClient = dataSourceId && lastUpdatedTime ? getClientFromPool(cacheKey, type) : undefined; + } else { + cachedClient = getClientFromPool(cacheKey, type); + } + + return cachedClient; +}; + +export const getDataSource = async ( + dataSourceId: string, + savedObjects: SavedObjectsClientContract +): Promise => { + const dataSourceSavedObject = await savedObjects.get( + DATA_SOURCE_SAVED_OBJECT_TYPE, + dataSourceId + ); + + const dataSourceAttr = { + ...dataSourceSavedObject.attributes, + lastUpdatedTime: dataSourceSavedObject.updated_at, + }; + + return dataSourceAttr; +}; + +export const getCredential = async ( + dataSource: DataSourceAttributes, + cryptography: CryptographyServiceSetup +): Promise => { + const { endpoint } = dataSource; + const { username, password } = dataSource.auth.credentials as UsernamePasswordTypedContent; + const { decryptedText, encryptionContext } = await cryptography.decodeAndDecrypt(password); + + if (encryptionContext!.endpoint !== endpoint) { + throw new Error( + 'Data source "endpoint" contaminated. Please delete and create another data source.' + ); + } + + const credential = { + username, + password: decryptedText, + }; + + return credential; +}; + +export const getAWSCredential = async ( + dataSource: DataSourceAttributes, + cryptography: CryptographyServiceSetup +): Promise => { + const { endpoint } = dataSource; + const { accessKey, secretKey, region } = dataSource.auth.credentials! as SigV4Content; + + const { + decryptedText: accessKeyText, + encryptionContext: accessKeyEncryptionContext, + } = await cryptography.decodeAndDecrypt(accessKey).catch((err: any) => { + // Re-throw as DataSourceError + throw createDataSourceError(err); + }); + + const { + decryptedText: secretKeyText, + encryptionContext: secretKeyEncryptionContext, + } = await cryptography.decodeAndDecrypt(secretKey).catch((err: any) => { + // Re-throw as DataSourceError + throw createDataSourceError(err); + }); + + if ( + accessKeyEncryptionContext.endpoint !== endpoint || + secretKeyEncryptionContext.endpoint !== endpoint + ) { + throw new Error( + 'Data source "endpoint" contaminated. Please delete and create another data source.' + ); + } + + const credential = { + region, + accessKey: accessKeyText, + secretKey: secretKeyText, + }; + + return credential; +}; + +export const generateCacheKey = (dataSourceAttr: DataSourceAttributes, dataSourceId?: string) => { + const CACHE_KEY_DELIMITER = ','; + const { + auth: { type }, + endpoint, + lastUpdatedTime, + } = dataSourceAttr; + // opensearch-js client doesn't support spawning child with aws sigv4 connection class, + // we are storing/getting the actual client instead of rootClient in/from aws client pool, + // by a key of ",," + const key = + type === AuthType.SigV4 + ? endpoint + CACHE_KEY_DELIMITER + dataSourceId + CACHE_KEY_DELIMITER + lastUpdatedTime + : endpoint; + + return key; +}; diff --git a/src/plugins/data_source/server/client/index.ts b/src/plugins/data_source/server/client/index.ts index faf5dabe4417..9b6824dfa1d5 100644 --- a/src/plugins/data_source/server/client/index.ts +++ b/src/plugins/data_source/server/client/index.ts @@ -4,10 +4,3 @@ */ export { OpenSearchClientPool, OpenSearchClientPoolSetup } from './client_pool'; -export { - configureClient, - getDataSource, - getCredential, - getRootClient, - getValidationClient, -} from './configure_client'; diff --git a/src/plugins/data_source/server/data_source_service.ts b/src/plugins/data_source/server/data_source_service.ts index 798fce739216..2a85d154e121 100644 --- a/src/plugins/data_source/server/data_source_service.ts +++ b/src/plugins/data_source/server/data_source_service.ts @@ -5,11 +5,10 @@ import { LegacyCallAPIOptions, Logger, OpenSearchClient } from '../../../../src/core/server'; import { DataSourcePluginConfigType } from '../config'; -import { configureClient, OpenSearchClientPool } from './client'; +import { OpenSearchClientPool } from './client'; import { configureLegacyClient } from './legacy'; import { DataSourceClientParams } from './types'; -import { DataSourceAttributes } from '../common/data_sources'; -import { configureTestClient } from './client/configure_client'; +import { configureClient } from './client/configure_client'; export interface DataSourceServiceSetup { getDataSourceClient: (params: DataSourceClientParams) => Promise; diff --git a/src/plugins/data_source/server/legacy/configure_legacy_client.test.ts b/src/plugins/data_source/server/legacy/configure_legacy_client.test.ts index bfdf0ce585f0..c047da70b285 100644 --- a/src/plugins/data_source/server/legacy/configure_legacy_client.test.ts +++ b/src/plugins/data_source/server/legacy/configure_legacy_client.test.ts @@ -168,7 +168,7 @@ describe('configureLegacyClient', () => { configureLegacyClient(dataSourceClientParams, callApiParams, clientPoolSetup, config, logger) ).rejects.toThrowError(); - expect(ClientMock).toHaveBeenCalledTimes(1); + expect(ClientMock).not.toHaveBeenCalled(); expect(savedObjectsMock.get).toHaveBeenCalledTimes(1); expect(decodeAndDecryptSpy).toHaveBeenCalledTimes(1); }); @@ -183,7 +183,7 @@ describe('configureLegacyClient', () => { configureLegacyClient(dataSourceClientParams, callApiParams, clientPoolSetup, config, logger) ).rejects.toThrowError(); - expect(ClientMock).toHaveBeenCalledTimes(1); + expect(ClientMock).not.toHaveBeenCalled(); expect(savedObjectsMock.get).toHaveBeenCalledTimes(1); expect(decodeAndDecryptSpy).toHaveBeenCalledTimes(1); }); diff --git a/src/plugins/data_source/server/legacy/configure_legacy_client.ts b/src/plugins/data_source/server/legacy/configure_legacy_client.ts index 137d5b506fb3..3a9b65634a28 100644 --- a/src/plugins/data_source/server/legacy/configure_legacy_client.ts +++ b/src/plugins/data_source/server/legacy/configure_legacy_client.ts @@ -3,27 +3,38 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Client } from 'elasticsearch'; +import { Client } from '@opensearch-project/opensearch'; +import { Client as LegacyClient, ConfigOptions } from 'elasticsearch'; +import { Credentials } from 'aws-sdk'; import { get } from 'lodash'; +import HttpAmazonESConnector from 'http-aws-es'; +import { Config } from 'aws-sdk'; import { Headers, LegacyAPICaller, LegacyCallAPIOptions, LegacyOpenSearchErrorHelpers, Logger, - SavedObject, } from '../../../../../src/core/server'; import { AuthType, DataSourceAttributes, + SigV4Content, UsernamePasswordTypedContent, } from '../../common/data_sources'; import { DataSourcePluginConfigType } from '../../config'; import { CryptographyServiceSetup } from '../cryptography_service'; import { DataSourceClientParams, LegacyClientCallAPIParams } from '../types'; -import { OpenSearchClientPoolSetup, getCredential, getDataSource } from '../client'; +import { OpenSearchClientPoolSetup } from '../client'; import { parseClientOptions } from './client_config'; import { createDataSourceError, DataSourceError } from '../lib/error'; +import { + getRootClient, + getAWSCredential, + getCredential, + getDataSource, + generateCacheKey, +} from '../client/configure_client_utils'; export const configureLegacyClient = async ( { dataSourceId, savedObjects, cryptography }: DataSourceClientParams, @@ -33,13 +44,26 @@ export const configureLegacyClient = async ( logger: Logger ) => { try { - const dataSource = await getDataSource(dataSourceId!, savedObjects); - const rootClient = getRootClient(dataSource.attributes, config, openSearchClientPoolSetup); + const dataSourceAttr = await getDataSource(dataSourceId!, savedObjects); + const rootClient = getRootClient( + dataSourceAttr, + openSearchClientPoolSetup.getClientFromPool, + dataSourceId + ) as LegacyClient; - return await getQueryClient(rootClient, dataSource.attributes, cryptography, callApiParams); + return await getQueryClient( + dataSourceAttr, + cryptography, + callApiParams, + openSearchClientPoolSetup.addClientToPool, + config, + rootClient, + dataSourceId + ); } catch (error: any) { - logger.error(`Failed to get data source client for dataSourceId: [${dataSourceId}]`); - logger.error(error); + logger.error( + `Failed to get data source client for dataSourceId: [${dataSourceId}]. ${error}: ${error.stack}` + ); // Re-throw as DataSourceError throw createDataSourceError(error); } @@ -49,57 +73,62 @@ export const configureLegacyClient = async ( * With given auth info, wrap the rootClient and return * * @param rootClient root client for the connection with given data source endpoint. - * @param dataSource data source saved object + * @param dataSourceAttr data source saved object attributes * @param cryptography cryptography service for password encryption / decryption + * @param config data source config + * @param addClientToPool function to add client to client pool + * @param dataSourceId id of data source saved Object * @returns child client. */ const getQueryClient = async ( - rootClient: Client, - dataSource: DataSourceAttributes, + dataSourceAttr: DataSourceAttributes, cryptography: CryptographyServiceSetup, - { endpoint, clientParams, options }: LegacyClientCallAPIParams + { endpoint, clientParams, options }: LegacyClientCallAPIParams, + addClientToPool: (endpoint: string, authType: AuthType, client: Client | LegacyClient) => void, + config: DataSourcePluginConfigType, + rootClient?: LegacyClient, + dataSourceId?: string ) => { - const authType = dataSource.auth.type; + const { + auth: { type }, + endpoint: nodeUrl, + } = dataSourceAttr; + const clientOptions = parseClientOptions(config, nodeUrl); + const cacheKey = generateCacheKey(dataSourceAttr, dataSourceId); - switch (authType) { + switch (type) { case AuthType.NoAuth: + if (!rootClient) rootClient = new LegacyClient(clientOptions); + addClientToPool(cacheKey, type, rootClient); + return await (callAPI.bind(null, rootClient) as LegacyAPICaller)( endpoint, clientParams, options ); + case AuthType.UsernamePasswordType: - const credential = await getCredential(dataSource, cryptography); + const credential = await getCredential(dataSourceAttr, cryptography); + + if (!rootClient) rootClient = new LegacyClient(clientOptions); + addClientToPool(cacheKey, type, rootClient); + return getBasicAuthClient(rootClient, { endpoint, clientParams, options }, credential); - default: - throw Error(`${authType} is not a supported auth type for data source`); - } -}; + case AuthType.SigV4: + const awsCredential = await getAWSCredential(dataSourceAttr, cryptography); -/** - * Gets a root client object of the OpenSearch endpoint. - * Will attempt to get from cache, if cache miss, create a new one and load into cache. - * - * @param dataSourceAttr data source saved objects attributes. - * @param config data source config - * @returns Legacy client for the given data source endpoint. - */ -const getRootClient = ( - dataSourceAttr: DataSourceAttributes, - config: DataSourcePluginConfigType, - { getClientFromPool, addClientToPool }: OpenSearchClientPoolSetup -): Client => { - const endpoint = dataSourceAttr.endpoint; - const cachedClient = getClientFromPool(endpoint); - if (cachedClient) { - return cachedClient as Client; - } else { - const configOptions = parseClientOptions(config, endpoint); - const client = new Client(configOptions); - addClientToPool(endpoint, client); - - return client; + const awsClient = rootClient ? rootClient : getAWSClient(awsCredential, clientOptions); + addClientToPool(cacheKey, type, awsClient); + + return await (callAPI.bind(null, awsClient) as LegacyAPICaller)( + endpoint, + clientParams, + options + ); + + default: + throw Error(`${type} is not a supported auth type for data source`); } }; @@ -113,7 +142,7 @@ const getRootClient = ( * make wrap401Errors default to false, because we don't want login pop-up from browser */ const callAPI = async ( - client: Client, + client: LegacyClient, endpoint: string, clientParams: Record = {}, options: LegacyCallAPIOptions = { wrap401Errors: false } @@ -153,7 +182,7 @@ const callAPI = async ( * @param options - Options that affect the way we call the API and process the result. */ const getBasicAuthClient = async ( - rootClient: Client, + rootClient: LegacyClient, { endpoint, clientParams = {}, options }: LegacyClientCallAPIParams, { username, password }: UsernamePasswordTypedContent ) => { @@ -164,3 +193,16 @@ const getBasicAuthClient = async ( return await (callAPI.bind(null, rootClient) as LegacyAPICaller)(endpoint, clientParams, options); }; + +const getAWSClient = (credential: SigV4Content, clientOptions: ConfigOptions): LegacyClient => { + const { accessKey, secretKey, region } = credential; + const client = new LegacyClient({ + connectionClass: HttpAmazonESConnector, + awsConfig: new Config({ + region, + credentials: new Credentials({ accessKeyId: accessKey, secretAccessKey: secretKey }), + }), + ...clientOptions, + }); + return client; +}; diff --git a/src/plugins/data_source/server/routes/test_connection.ts b/src/plugins/data_source/server/routes/test_connection.ts index 8f90577b045f..08b1d747d9db 100644 --- a/src/plugins/data_source/server/routes/test_connection.ts +++ b/src/plugins/data_source/server/routes/test_connection.ts @@ -5,11 +5,7 @@ import { schema } from '@osd/config-schema'; import { IRouter, OpenSearchClient } from 'opensearch-dashboards/server'; -import { DataSourceAttributes } from '../../common/data_sources'; -import { DataSourceConnectionValidator } from './data_source_connection_validator'; -import { DataSourceServiceSetup } from '../data_source_service'; import { CryptographyServiceSetup } from '../cryptography_service'; - export const registerTestConnectionRoute = ( router: IRouter, dataSourceServiceSetup: DataSourceServiceSetup, @@ -26,14 +22,20 @@ export const registerTestConnectionRoute = ( auth: schema.maybe( schema.object({ type: schema.oneOf([ - schema.literal('username_password'), - schema.literal('no_auth'), + schema.literal(AuthType.UsernamePasswordType), + schema.literal(AuthType.NoAuth), + schema.literal(AuthType.SigV4), ]), credentials: schema.oneOf([ schema.object({ username: schema.string(), password: schema.string(), }), + schema.object({ + region: schema.string(), + accessKey: schema.string(), + secretKey: schema.string(), + }), schema.literal(null), ]), }) @@ -46,13 +48,13 @@ export const registerTestConnectionRoute = ( const { dataSourceAttr, id: dataSourceId } = request.body; try { - const dataSourceClient: OpenSearchClient = await dataSourceServiceSetup.getTestingClient( + const dataSourceClient: OpenSearchClient = await dataSourceServiceSetup.getDataSourceClient( { - dataSourceId, savedObjects: context.core.savedObjects.client, cryptography, - }, - dataSourceAttr as DataSourceAttributes + dataSourceId, + testClientDataSourceAttr: dataSourceAttr as DataSourceAttributes, + } ); const dsValidator = new DataSourceConnectionValidator(dataSourceClient); diff --git a/src/plugins/data_source/server/saved_objects/data_source_saved_objects_client_wrapper.ts b/src/plugins/data_source/server/saved_objects/data_source_saved_objects_client_wrapper.ts index 525923f4c577..6b79248d1a94 100644 --- a/src/plugins/data_source/server/saved_objects/data_source_saved_objects_client_wrapper.ts +++ b/src/plugins/data_source/server/saved_objects/data_source_saved_objects_client_wrapper.ts @@ -17,7 +17,12 @@ import { } from 'opensearch-dashboards/server'; import { Logger, SavedObjectsErrorHelpers } from '../../../../../src/core/server'; import { DATA_SOURCE_SAVED_OBJECT_TYPE } from '../../common'; -import { AuthType } from '../../common/data_sources'; +import { + AuthType, + DataSourceAttributes, + SigV4Content, + UsernamePasswordTypedContent, +} from '../../common/data_sources'; import { EncryptionContext, CryptographyServiceSetup } from '../cryptography_service'; /** @@ -29,7 +34,7 @@ export class DataSourceSavedObjectsClientWrapper { /** * Describes the factory used to create instances of Saved Objects Client Wrappers - * for data source spcific operations such as credntials encryption + * for data source specific operations such as credentials encryption */ public wrapperFactory: SavedObjectsClientWrapperFactory = (wrapperOptions) => { const createWithCredentialsEncryption = async ( @@ -159,13 +164,14 @@ export class DataSourceSavedObjectsClientWrapper { }; case AuthType.UsernamePasswordType: // Signing the data source with endpoint - const encryptionContext = { - endpoint, + return { + ...attributes, + auth: await this.encryptBasicAuthCredential(auth, { endpoint }), }; - + case AuthType.SigV4: return { ...attributes, - auth: await this.encryptCredentials(auth, encryptionContext), + auth: await this.encryptSigV4Credential(auth, { endpoint }), }; default: throw SavedObjectsErrorHelpers.createBadRequestError(`Invalid auth type: '${auth.type}'`); @@ -191,6 +197,8 @@ export class DataSourceSavedObjectsClientWrapper { } const { type, credentials } = auth; + const existingDataSourceAttr = await this.getDataSourceAttributes(wrapperOptions, id, options); + const encryptionContext = await this.getEncryptionContext(existingDataSourceAttr); switch (type) { case AuthType.NoAuth: @@ -204,18 +212,33 @@ export class DataSourceSavedObjectsClientWrapper { }; case AuthType.UsernamePasswordType: if (credentials?.password) { - // Fetch and validate existing signature - const encryptionContext = await this.validateEncryptionContext( - wrapperOptions, - id, - options - ); - + this.validateEncryptionContext(encryptionContext, existingDataSourceAttr); + return { + ...attributes, + auth: await this.encryptBasicAuthCredential(auth, encryptionContext), + }; + } else { + return attributes; + } + case AuthType.SigV4: + this.validateEncryptionContext(encryptionContext, existingDataSourceAttr); + if (credentials?.accessKey && credentials?.secretKey) { return { ...attributes, - auth: await this.encryptCredentials(auth, encryptionContext), + auth: await this.encryptSigV4Credential(auth, encryptionContext), }; } else { + if (credentials?.accessKey) { + throw SavedObjectsErrorHelpers.createBadRequestError( + `Failed to update existing data source with auth type ${type}: "credentials.secretKey" missing.` + ); + } + + if (credentials?.secretKey) { + throw SavedObjectsErrorHelpers.createBadRequestError( + `Failed to update existing data source with auth type ${type}: "credentials.accessKey" missing.` + ); + } return attributes; } default: @@ -259,7 +282,7 @@ export class DataSourceSavedObjectsClientWrapper { ); } - const { username, password } = credentials; + const { username, password } = credentials as UsernamePasswordTypedContent; if (!username) { throw SavedObjectsErrorHelpers.createBadRequestError( @@ -272,36 +295,45 @@ export class DataSourceSavedObjectsClientWrapper { '"auth.credentials.password" attribute is required' ); } + break; + case AuthType.SigV4: + if (!credentials) { + throw SavedObjectsErrorHelpers.createBadRequestError( + '"auth.credentials" attribute is required' + ); + } + const { accessKey, secretKey, region } = credentials as SigV4Content; + + if (!accessKey) { + throw SavedObjectsErrorHelpers.createBadRequestError( + '"auth.credentials.accessKey" attribute is required' + ); + } + + if (!secretKey) { + throw SavedObjectsErrorHelpers.createBadRequestError( + '"auth.credentials.secretKey" attribute is required' + ); + } + + if (!region) { + throw SavedObjectsErrorHelpers.createBadRequestError( + '"auth.credentials.region" attribute is required' + ); + } break; default: throw SavedObjectsErrorHelpers.createBadRequestError(`Invalid auth type: '${type}'`); } } - private async validateEncryptionContext( - wrapperOptions: SavedObjectsClientWrapperOptions, - id: string, - options: SavedObjectsUpdateOptions = {} - ) { - let attributes; - - try { - // Fetch existing data source by id - const savedObject = await wrapperOptions.client.get(DATA_SOURCE_SAVED_OBJECT_TYPE, id, { - namespace: options.namespace, - }); - attributes = savedObject.attributes; - } catch (err: any) { - const errMsg = `Failed to fetch existing data source for dataSourceId [${id}]`; - this.logger.error(errMsg); - this.logger.error(err); - throw SavedObjectsErrorHelpers.decorateBadRequestError(err, errMsg); - } + private async getEncryptionContext(attributes: DataSourceAttributes) { + let encryptionContext: EncryptionContext; if (!attributes) { throw SavedObjectsErrorHelpers.createBadRequestError( - 'Update failed due to deprecated data source: "attributes" missing. Please delete and create another data source.' + 'Failed to update existing data source: "attributes" missing. Please delete and create another data source.' ); } @@ -309,65 +341,109 @@ export class DataSourceSavedObjectsClientWrapper { if (!endpoint) { throw SavedObjectsErrorHelpers.createBadRequestError( - 'Update failed due to deprecated data source: "endpoint" missing. Please delete and create another data source.' + 'Failed to update existing data source: "endpoint" missing. Please delete and create another data source.' ); } if (!auth) { throw SavedObjectsErrorHelpers.createBadRequestError( - 'Update failed due to deprecated data source: "auth" missing. Please delete and create another data source.' + 'Failed to update existing data source: "auth" missing. Please delete and create another data source.' ); } switch (auth.type) { case AuthType.NoAuth: - // Signing the data source with exsiting endpoint - return { - endpoint, - }; + // Signing the data source with existing endpoint + encryptionContext = { endpoint }; + break; case AuthType.UsernamePasswordType: const { credentials } = auth; if (!credentials) { throw SavedObjectsErrorHelpers.createBadRequestError( - 'Update failed due to deprecated data source: "credentials" missing. Please delete and create another data source.' + 'Failed to update existing data source: "credentials" missing. Please delete and create another data source.' ); } - const { username, password } = credentials; + const { username, password } = credentials as UsernamePasswordTypedContent; if (!username) { throw SavedObjectsErrorHelpers.createBadRequestError( - 'Update failed due to deprecated data source: "auth.credentials.username" missing. Please delete and create another data source.' + 'Failed to update existing data source: "auth.credentials.username" missing. Please delete and create another data source.' ); } if (!password) { throw SavedObjectsErrorHelpers.createBadRequestError( - 'Update failed due to deprecated data source: "auth.credentials.username" missing. Please delete and create another data source.' + 'Failed to update existing data source: "auth.credentials.password" missing. Please delete and create another data source.' ); } + encryptionContext = await this.getEncryptionContextFromCipher(password); + break; + case AuthType.SigV4: + const { accessKey, secretKey } = auth.credentials as SigV4Content; + const accessKeyEncryptionContext = await this.getEncryptionContextFromCipher(accessKey); + const secretKeyEncryptionContext = await this.getEncryptionContextFromCipher(secretKey); - const { encryptionContext } = await this.cryptography - .decodeAndDecrypt(password) - .catch((err: any) => { - const errMsg = `Failed to update existing data source for dataSourceId [${id}]: unable to decrypt "auth.credentials.password"`; - this.logger.error(errMsg); - this.logger.error(err); - throw SavedObjectsErrorHelpers.decorateBadRequestError(err, errMsg); - }); - - if (encryptionContext.endpoint !== endpoint) { + if (accessKeyEncryptionContext.endpoint !== secretKeyEncryptionContext.endpoint) { throw SavedObjectsErrorHelpers.createBadRequestError( - 'Update failed due to deprecated data source: "endpoint" contaminated. Please delete and create another data source.' + 'Failed to update existing data source: encryption contexts for "auth.credentials.accessKey" and "auth.credentials.secretKey" must be same. Please delete and create another data source.' ); } - return encryptionContext; + encryptionContext = accessKeyEncryptionContext; + break; default: - throw SavedObjectsErrorHelpers.createBadRequestError(`Invalid auth type: '${type}'`); + throw SavedObjectsErrorHelpers.createBadRequestError(`Invalid auth type: '${auth.type}'`); + } + + return encryptionContext; + } + + private async getDataSourceAttributes( + wrapperOptions: SavedObjectsClientWrapperOptions, + id: string, + options: SavedObjectsUpdateOptions = {} + ): Promise { + try { + // Fetch existing data source by id + const savedObject = await wrapperOptions.client.get(DATA_SOURCE_SAVED_OBJECT_TYPE, id, { + namespace: options.namespace, + }); + return savedObject.attributes as DataSourceAttributes; + } catch (err: any) { + const errMsg = `Failed to fetch existing data source for dataSourceId [${id}]`; + this.logger.error(`${errMsg}: ${err} ${err.stack}`); + throw SavedObjectsErrorHelpers.decorateBadRequestError(err, errMsg); + } + } + + private validateEncryptionContext = ( + encryptionContext: EncryptionContext, + dataSource: DataSourceAttributes + ) => { + // validate encryption context + if (encryptionContext.endpoint !== dataSource.endpoint) { + throw SavedObjectsErrorHelpers.createBadRequestError( + 'Failed to update existing data source: "endpoint" contaminated. Please delete and create another data source.' + ); } + }; + + private async getEncryptionContextFromCipher(cipher: string) { + const { encryptionContext } = await this.cryptography + .decodeAndDecrypt(cipher) + .catch((err: any) => { + const errMsg = `Failed to update existing data source: unable to decrypt auth content`; + this.logger.error(`${errMsg}: ${err} ${err.stack}`); + throw SavedObjectsErrorHelpers.decorateBadRequestError(err, errMsg); + }); + + return encryptionContext; } - private async encryptCredentials(auth: T, encryptionContext: EncryptionContext) { + private async encryptBasicAuthCredential( + auth: T, + encryptionContext: EncryptionContext + ) { const { credentials: { username, password }, } = auth; @@ -380,4 +456,19 @@ export class DataSourceSavedObjectsClientWrapper { }, }; } + + private async encryptSigV4Credential(auth: T, encryptionContext: EncryptionContext) { + const { + credentials: { accessKey, secretKey, region }, + } = auth; + + return { + ...auth, + credentials: { + region, + accessKey: await this.cryptography.encryptAndEncode(accessKey, encryptionContext), + secretKey: await this.cryptography.encryptAndEncode(secretKey, encryptionContext), + }, + }; + } } diff --git a/src/plugins/data_source/server/types.ts b/src/plugins/data_source/server/types.ts index 913218e40d4b..68a840ebbbcb 100644 --- a/src/plugins/data_source/server/types.ts +++ b/src/plugins/data_source/server/types.ts @@ -8,6 +8,7 @@ import { OpenSearchClient, SavedObjectsClientContract, } from 'src/core/server'; +import { DataSourceAttributes } from '../common/data_sources'; import { CryptographyServiceSetup } from './cryptography_service'; import { DataSourceError } from './lib/error'; @@ -19,11 +20,13 @@ export interface LegacyClientCallAPIParams { } export interface DataSourceClientParams { - // id is optional when creating test client - dataSourceId?: string; - // this saved objects client is used to fetch data source on behalf of users, caller should pass scoped saved objects client + // to fetch data source on behalf of users, caller should pass scoped saved objects client savedObjects: SavedObjectsClientContract; cryptography: CryptographyServiceSetup; + // optional when creating test client, required for normal client + dataSourceId?: string; + // required when creating test client + testClientDataSourceAttr?: DataSourceAttributes; } export interface DataSourcePluginRequestContext { diff --git a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx index 2de6fa497315..f069d2a1f0f3 100644 --- a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx +++ b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx @@ -25,6 +25,7 @@ import { DataSourceAttributes, DataSourceManagementContextValue, UsernamePasswordTypedContent, + SigV4Content, } from '../../../../types'; import { Header } from '../header'; import { context as contextType } from '../../../../../../opensearch_dashboards_react/public'; @@ -50,7 +51,7 @@ export interface CreateDataSourceState { endpoint: string; auth: { type: AuthType; - credentials: UsernamePasswordTypedContent; + credentials: UsernamePasswordTypedContent | SigV4Content; }; } @@ -120,20 +121,7 @@ export class CreateDataSourceForm extends React.Component< }; onChangeAuthType = (value: string) => { - const valueToSave = - value === AuthType.UsernamePasswordType ? AuthType.UsernamePasswordType : AuthType.NoAuth; - - const formErrorsByField = { - ...this.state.formErrorsByField, - createCredential: { ...this.state.formErrorsByField.createCredential }, - }; - if (valueToSave === AuthType.NoAuth) { - formErrorsByField.createCredential = { - username: [], - password: [], - }; - } - this.setState({ auth: { ...this.state.auth, type: valueToSave }, formErrorsByField }); + this.setState({ auth: { ...this.state.auth, type: value as AuthType } }); }; onChangeUsername = (e: { target: { value: any } }) => { @@ -180,6 +168,72 @@ export class CreateDataSourceForm extends React.Component< }); }; + onChangeRegion = (e: { target: { value: any } }) => { + this.setState({ + auth: { + ...this.state.auth, + credentials: { ...this.state.auth.credentials, region: e.target.value }, + }, + }); + }; + + validateRegion = () => { + const isValid = !!this.state.auth.credentials.region?.trim().length; + this.setState({ + formErrorsByField: { + ...this.state.formErrorsByField, + awsCredential: { + ...this.state.formErrorsByField.awsCredential, + region: isValid ? [] : [''], + }, + }, + }); + }; + + onChangeAccessKey = (e: { target: { value: any } }) => { + this.setState({ + auth: { + ...this.state.auth, + credentials: { ...this.state.auth.credentials, accessKey: e.target.value }, + }, + }); + }; + + validateAccessKey = () => { + const isValid = !!this.state.auth.credentials.accessKey; + this.setState({ + formErrorsByField: { + ...this.state.formErrorsByField, + awsCredential: { + ...this.state.formErrorsByField.awsCredential, + accessKey: isValid ? [] : [''], + }, + }, + }); + }; + + onChangeSecretKey = (e: { target: { value: any } }) => { + this.setState({ + auth: { + ...this.state.auth, + credentials: { ...this.state.auth.credentials, secretKey: e.target.value }, + }, + }); + }; + + validateSecretKey = () => { + const isValid = !!this.state.auth.credentials.secretKey; + this.setState({ + formErrorsByField: { + ...this.state.formErrorsByField, + awsCredential: { + ...this.state.formErrorsByField.awsCredential, + secretKey: isValid ? [] : [''], + }, + }, + }); + }; + onClickCreateNewDataSource = () => { if (this.isFormValid()) { const formValues: DataSourceAttributes = this.getFormValues(); @@ -201,11 +255,26 @@ export class CreateDataSourceForm extends React.Component< }; getFormValues = (): DataSourceAttributes => { + let credentials = this.state.auth.credentials; + if (this.state.auth.type === AuthType.UsernamePasswordType) { + credentials = { + username: this.state.auth.credentials.username, + password: this.state.auth.credentials.password, + } as UsernamePasswordTypedContent; + } + if (this.state.auth.type === AuthType.SigV4) { + credentials = { + region: this.state.auth.credentials.region, + accessKey: this.state.auth.credentials.accessKey, + secretKey: this.state.auth.credentials.secretKey, + } as SigV4Content; + } + return { title: this.state.title, description: this.state.description, endpoint: this.state.endpoint, - auth: { ...this.state.auth, credentials: { ...this.state.auth.credentials } }, + auth: { ...this.state.auth, credentials }, }; }; @@ -247,55 +316,133 @@ export class CreateDataSourceForm extends React.Component< }; /* Render create new credentials*/ - renderCreateNewCredentialsForm = () => { - return ( - <> - - - - - - - - ); + renderCreateNewCredentialsForm = (type: AuthType) => { + switch (type) { + case AuthType.UsernamePasswordType: + return ( + <> + + + + + + + + ); + case AuthType.SigV4: + return ( + <> + + + + + + + + + + + ); + + default: + break; + } }; renderContent = () => { @@ -419,7 +566,11 @@ export class CreateDataSourceForm extends React.Component< {/* Create New credentials */} {this.state.auth.type === AuthType.UsernamePasswordType - ? this.renderCreateNewCredentialsForm() + ? this.renderCreateNewCredentialsForm(this.state.auth.type) + : null} + + {this.state.auth.type === AuthType.SigV4 + ? this.renderCreateNewCredentialsForm(this.state.auth.type) : null} diff --git a/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx b/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx index 561a651edee2..af17eb2d6944 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx +++ b/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx @@ -29,6 +29,7 @@ import { credentialSourceOptions, DataSourceAttributes, DataSourceManagementContextValue, + SigV4Content, ToastMessageItem, UsernamePasswordTypedContent, } from '../../../../types'; @@ -40,6 +41,7 @@ import { performDataSourceFormValidation, } from '../../../validation'; import { UpdatePasswordModal } from '../update_password_modal'; +import { UpdateAwsCredentialModal } from '../update_aws_credential_modal'; export interface EditDataSourceProps { existingDataSource: DataSourceAttributes; @@ -56,9 +58,10 @@ export interface EditDataSourceState { endpoint: string; auth: { type: AuthType; - credentials: UsernamePasswordTypedContent; + credentials: UsernamePasswordTypedContent | SigV4Content | undefined; }; showUpdatePasswordModal: boolean; + showUpdateAwsCredentialModal: boolean; showUpdateOptions: boolean; isLoading: boolean; } @@ -81,9 +84,13 @@ export class EditDataSourceForm extends React.Component { - const valueToSave = - value === AuthType.UsernamePasswordType ? AuthType.UsernamePasswordType : AuthType.NoAuth; - - const formErrorsByField = { - ...this.state.formErrorsByField, - createCredential: { ...this.state.formErrorsByField.createCredential }, - }; - if (valueToSave === AuthType.NoAuth) { - formErrorsByField.createCredential = { - username: [], - password: [], - }; - } - this.setState({ auth: { ...this.state.auth, type: valueToSave }, formErrorsByField }, () => { + this.setState({ auth: { ...this.state.auth, type: value as AuthType } }, () => { this.onChangeFormValues(); }); }; @@ -174,7 +176,10 @@ export class EditDataSourceForm extends React.Component { + this.setState({ + auth: { + ...this.state.auth, + credentials: { ...this.state.auth.credentials, region: e.target.value } as SigV4Content, + }, + }); + }; + + validateRegion = () => { + const isValid = !!this.state.auth.credentials.region?.trim().length; + this.setState({ + formErrorsByField: { + ...this.state.formErrorsByField, + awsCredential: { + ...this.state.formErrorsByField.awsCredential, + region: isValid ? [] : [''], + }, + }, + }); + }; + + onChangeAccessKey = (e: { target: { value: any } }) => { + this.setState({ + auth: { + ...this.state.auth, + credentials: { ...this.state.auth.credentials, accessKey: e.target.value } as SigV4Content, + }, + }); + }; + + validateAccessKey = () => { + const isValid = !!this.state.auth.credentials.accessKey; + this.setState({ + formErrorsByField: { + ...this.state.formErrorsByField, + awsCredential: { + ...this.state.formErrorsByField.awsCredential, + accessKey: isValid ? [] : [''], + }, + }, + }); + }; + + onChangeSecretKey = (e: { target: { value: any } }) => { + this.setState({ + auth: { + ...this.state.auth, + credentials: { ...this.state.auth.credentials, secretKey: e.target.value } as SigV4Content, + }, + }); + }; + + validateSecretKey = () => { + const isValid = !!this.state.auth.credentials.secretKey; + this.setState({ + formErrorsByField: { + ...this.state.formErrorsByField, + awsCredential: { + ...this.state.formErrorsByField.awsCredential, + secretKey: isValid ? [] : [''], + }, }, }); }; @@ -221,12 +295,30 @@ export class EditDataSourceForm extends React.Component { this.setState({ isLoading: true }); - const existingAuthType = this.props.existingDataSource.auth.type; + const isNewCredential = !!(this.state.auth.type !== this.props.existingDataSource.auth.type); - try { - const isNewCredential = !!( - existingAuthType === AuthType.NoAuth && this.state.auth.type !== existingAuthType - ); - const formValues: DataSourceAttributes = { - title: this.state.title, - description: this.state.description, - endpoint: this.props.existingDataSource.endpoint, - auth: { - ...this.state.auth, - credentials: { - ...this.state.auth.credentials, - password: isNewCredential ? this.state.auth.credentials.password : '', - }, - }, - }; + let credentials = this.state.auth.credentials; + + switch (this.state.auth.type) { + case AuthType.UsernamePasswordType: + credentials = { + username: this.state.auth.credentials?.username, + password: isNewCredential ? this.state.auth.credentials?.password : '', + } as UsernamePasswordTypedContent; + break; + case AuthType.SigV4: + credentials = { + region: this.state.auth.credentials?.region, + accessKey: isNewCredential ? this.state.auth.credentials?.accessKey : '', + secretKey: isNewCredential ? this.state.auth.credentials?.secretKey : '', + } as SigV4Content; + break; + case AuthType.NoAuth: + credentials = undefined; + break; + + default: + break; + } + + const formValues: DataSourceAttributes = { + title: this.state.title, + description: this.state.description, + endpoint: this.state.endpoint, + auth: { ...this.state.auth, credentials }, + }; + try { await this.props.handleTestConnection(formValues); this.props.displayToastMessage({ @@ -303,6 +410,10 @@ export class EditDataSourceForm extends React.Component { + this.setState({ showUpdateAwsCredentialModal: true }); + }; + /* Update password */ updatePassword = async (password: string) => { const { title, description, auth } = this.props.existingDataSource; @@ -315,7 +426,7 @@ export class EditDataSourceForm extends React.Component { + const { title, description, auth } = this.props.existingDataSource; + const updateAttributes: DataSourceAttributes = { + title, + description, + endpoint: undefined, + auth: { + type: auth.type, + credentials: { + region: auth.credentials ? auth.credentials.region : '', + accessKey, + secretKey, + } as SigV4Content, + }, + }; + this.closeAwsCredentialModal(); + + try { + await this.props.handleSubmit(updateAttributes); + this.props.displayToastMessage({ + id: 'dataSourcesManagement.editDataSource.updatePasswordSuccessMsg', + defaultMessage: 'Password updated successfully.', + success: true, + }); + } catch (e) { + this.props.displayToastMessage({ + id: 'dataSourcesManagement.editDataSource.updatePasswordFailMsg', + defaultMessage: 'Updating the stored password failed with some errors.', + }); + } + }; + /* Render methods */ - /* Render Modal for new credential */ + /* Render modal for new credential */ closePasswordModal = () => { this.setState({ showUpdatePasswordModal: false }); }; + closeAwsCredentialModal = () => { + this.setState({ showUpdateAwsCredentialModal: false }); + }; + renderUpdatePasswordModal = () => { return ( <> @@ -367,14 +515,39 @@ export class EditDataSourceForm extends React.Component ); }; + + renderUpdateAwsCredentialModal = () => { + return ( + <> + + { + + } + + + {this.state.showUpdateAwsCredentialModal ? ( + + ) : null} + + ); + }; + /* Render header*/ renderHeader = () => { return (
+ {this.renderSelectedAuthType(this.state.auth.type)} + + ); + }; + + renderSelectedAuthType = (type: AuthType) => { + switch (type) { + case AuthType.UsernamePasswordType: + return this.renderUsernamePasswordFields(); + case AuthType.SigV4: + return this.renderSigV4ContentFields(); + default: + return null; + } + }; - {this.state.auth.type !== AuthType.NoAuth ? this.renderUsernamePasswordFields() : null} + renderSigV4ContentFields = () => { + return ( + <> + + + + + + + + + + + {this.props.existingDataSource.auth.type === AuthType.SigV4 + ? this.renderUpdateAwsCredentialModal() + : null} ); }; @@ -600,7 +871,7 @@ export class EditDataSourceForm extends React.Component - {this.props.existingDataSource.auth.type !== AuthType.NoAuth ? ( + {this.props.existingDataSource.auth.type === AuthType.UsernamePasswordType ? ( {this.renderUpdatePasswordModal()} ) : null} @@ -659,12 +930,17 @@ export class EditDataSourceForm extends React.Component void; + closeUpdateAwsCredentialModal: () => void; +} + +export const UpdateAwsCredentialModal = ({ + region, + handleUpdateAwsCredential, + closeUpdateAwsCredentialModal, +}: UpdateAwsCredentialModalProps) => { + /* State Variables */ + const [newAccessKey, setNewAccessKey] = useState(''); + const [isNewAccessKeyValid, setIsNewAccessKeyValid] = useState(true); + + const [newSecretKey, setNewSecretKey] = useState(''); + const [isNewSecretKeyValid, setIsNewSecretKeyValid] = useState(true); + + const onClickUpdateAwsCredential = () => { + if (isFormValid()) { + handleUpdateAwsCredential(newAccessKey, newSecretKey); + } + }; + + const isFormValid = () => { + return !!(newAccessKey && newSecretKey); + }; + + const validateNewAccessKey = () => { + setIsNewAccessKeyValid(!!newAccessKey); + }; + + const validateNewSecretKey = () => { + setIsNewSecretKeyValid(!!newSecretKey); + }; + + const renderUpdateAwsCredentialModal = () => { + return ( + + + +

+ { + + } +

+
+
+ + + + + { + + } + + + + + + {/* Region */} + + + {region} + + + + {/* updated access key */} + + setNewAccessKey(e.target.value)} + onBlur={validateNewAccessKey} + /> + + + {/* updated secret key */} + + setNewSecretKey(e.target.value)} + onBlur={validateNewSecretKey} + /> + + + + + + + { + + } + + + {i18n.translate('dataSourcesManagement.editDataSource.updateStoredAwsCredential', { + defaultMessage: 'Update stored aws credential', + })} + + +
+ ); + }; + + /* Return the modal */ + return
{renderUpdateAwsCredentialModal()}
; +}; diff --git a/src/plugins/data_source_management/public/components/utils.test.ts b/src/plugins/data_source_management/public/components/utils.test.ts index ec30c7966971..a94d5b2260e6 100644 --- a/src/plugins/data_source_management/public/components/utils.test.ts +++ b/src/plugins/data_source_management/public/components/utils.test.ts @@ -156,7 +156,7 @@ describe('DataSourceManagement: Utils.ts', () => { Array [ "/internal/data-source-management/validate", Object { - "body": "{\\"dataSourceAttr\\":{\\"endpoint\\":\\"https://test.com\\",\\"auth\\":{\\"type\\":\\"no_auth\\",\\"credentials\\":null}}}", + "body": "{\\"dataSourceAttr\\":{\\"endpoint\\":\\"https://test.com\\",\\"auth\\":{\\"type\\":\\"no_auth\\"}}}", }, ], ] @@ -170,7 +170,7 @@ describe('DataSourceManagement: Utils.ts', () => { Array [ "/internal/data-source-management/validate", Object { - "body": "{\\"id\\":\\"test1234\\",\\"dataSourceAttr\\":{\\"endpoint\\":\\"https://test.com\\",\\"auth\\":{\\"type\\":\\"no_auth\\",\\"credentials\\":null}}}", + "body": "{\\"id\\":\\"test1234\\",\\"dataSourceAttr\\":{\\"endpoint\\":\\"https://test.com\\",\\"auth\\":{\\"type\\":\\"no_auth\\"}}}", }, ], ] diff --git a/src/plugins/data_source_management/public/components/utils.ts b/src/plugins/data_source_management/public/components/utils.ts index 3d9d6f51b413..539edbca970b 100644 --- a/src/plugins/data_source_management/public/components/utils.ts +++ b/src/plugins/data_source_management/public/components/utils.ts @@ -90,7 +90,7 @@ export async function testConnection( endpoint, auth: { type, - credentials: type === AuthType.NoAuth ? null : { ...credentials }, + credentials, }, }, }; diff --git a/src/plugins/data_source_management/public/components/validation/datasource_form_validation.ts b/src/plugins/data_source_management/public/components/validation/datasource_form_validation.ts index 0e861f1184f3..1abde2d54edb 100644 --- a/src/plugins/data_source_management/public/components/validation/datasource_form_validation.ts +++ b/src/plugins/data_source_management/public/components/validation/datasource_form_validation.ts @@ -16,6 +16,11 @@ export interface CreateEditDataSourceValidation { username: string[]; password: string[]; }; + awsCredential: { + region: string[]; + accessKey: string[]; + secretKey: string[]; + }; } export const defaultValidation: CreateEditDataSourceValidation = { @@ -25,6 +30,11 @@ export const defaultValidation: CreateEditDataSourceValidation = { username: [], password: [], }, + awsCredential: { + region: [], + accessKey: [], + secretKey: [], + }, }; export const isTitleValid = ( @@ -84,6 +94,23 @@ export const performDataSourceFormValidation = ( return false; } } + /* AWS SigV4 Content */ + if (formValues?.auth?.type === AuthType.SigV4) { + /* Access key */ + if (!formValues.auth.credentials?.accessKey) { + return false; + } + + /* Secret key */ + if (!formValues.auth.credentials?.secretKey) { + return false; + } + + /* Region */ + if (!formValues.auth.credentials?.region) { + return false; + } + } return true; }; diff --git a/src/plugins/data_source_management/public/types.ts b/src/plugins/data_source_management/public/types.ts index fe52466df1e5..db8b6f1d9a1c 100644 --- a/src/plugins/data_source_management/public/types.ts +++ b/src/plugins/data_source_management/public/types.ts @@ -53,11 +53,13 @@ export type DataSourceManagementContextValue = OpenSearchDashboardsReactContextV export enum AuthType { NoAuth = 'no_auth', UsernamePasswordType = 'username_password', + SigV4 = 'sigv4', } export const credentialSourceOptions = [ { id: AuthType.NoAuth, label: 'No authentication' }, { id: AuthType.UsernamePasswordType, label: 'Username & Password' }, + { id: AuthType.SigV4, label: 'AWS SigV4' }, ]; export interface DataSourceAttributes extends SavedObjectAttributes { @@ -66,7 +68,7 @@ export interface DataSourceAttributes extends SavedObjectAttributes { endpoint?: string; auth: { type: AuthType; - credentials: UsernamePasswordTypedContent | undefined; + credentials: UsernamePasswordTypedContent | SigV4Content | undefined; }; } @@ -74,3 +76,9 @@ export interface UsernamePasswordTypedContent extends SavedObjectAttributes { username: string; password?: string; } + +export interface SigV4Content extends SavedObjectAttributes { + accessKey: string; + secretKey: string; + region: string; +} diff --git a/src/plugins/region_map/common/constants/shared.ts b/src/plugins/region_map/common/constants/shared.ts index 6d82a3a33600..3dc3e6ce6e80 100644 --- a/src/plugins/region_map/common/constants/shared.ts +++ b/src/plugins/region_map/common/constants/shared.ts @@ -5,3 +5,4 @@ export const DEFAULT_MAP_CHOICE = 'default'; export const CUSTOM_MAP_CHOICE = 'custom'; +export const CUSTOM_VECTOR_MAP_MAX_SIZE_SETTING = 'visualization:regionmap:customVectorMapMaxSize'; diff --git a/src/plugins/region_map/common/index.ts b/src/plugins/region_map/common/index.ts index bdda981590ef..f7f2062b4910 100644 --- a/src/plugins/region_map/common/index.ts +++ b/src/plugins/region_map/common/index.ts @@ -3,6 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { DEFAULT_MAP_CHOICE, CUSTOM_MAP_CHOICE } from './constants/shared'; +import { + DEFAULT_MAP_CHOICE, + CUSTOM_MAP_CHOICE, + CUSTOM_VECTOR_MAP_MAX_SIZE_SETTING, +} from './constants/shared'; -export { DEFAULT_MAP_CHOICE, CUSTOM_MAP_CHOICE }; +export { DEFAULT_MAP_CHOICE, CUSTOM_MAP_CHOICE, CUSTOM_VECTOR_MAP_MAX_SIZE_SETTING }; diff --git a/src/plugins/region_map/public/choropleth_layer.js b/src/plugins/region_map/public/choropleth_layer.js index e0213108f64a..10d2389c5761 100644 --- a/src/plugins/region_map/public/choropleth_layer.js +++ b/src/plugins/region_map/public/choropleth_layer.js @@ -37,7 +37,11 @@ import { getNotifications } from './opensearch_dashboards_services'; import { colorUtil, OpenSearchDashboardsMapLayer } from '../../maps_legacy/public'; import { truncatedColorMaps } from '../../charts/public'; import { getServices } from './services'; -import { DEFAULT_MAP_CHOICE, CUSTOM_MAP_CHOICE } from '../common'; +import { + DEFAULT_MAP_CHOICE, + CUSTOM_MAP_CHOICE, + CUSTOM_VECTOR_MAP_MAX_SIZE_SETTING, +} from '../common'; const EMPTY_STYLE = { weight: 1, @@ -94,7 +98,8 @@ export class ChoroplethLayer extends OpenSearchDashboardsMapLayer { serviceSettings, leaflet, layerChosenByUser, - http + http, + uiSettings ) { super(); this._serviceSettings = serviceSettings; @@ -112,6 +117,7 @@ export class ChoroplethLayer extends OpenSearchDashboardsMapLayer { this._layerChosenByUser = layerChosenByUser; this._http = http; this._visParams = null; + this._uiSettings = uiSettings; // eslint-disable-next-line no-undef this._leafletLayer = this._leaflet.geoJson(null, { @@ -241,7 +247,8 @@ CORS configuration of the server permits requests from the OpenSearch Dashboards // fetch data from index and transform it to feature collection try { const services = getServices(this._http); - const result = await services.getIndexData(this._layerName); + const indexSize = this._uiSettings.get(CUSTOM_VECTOR_MAP_MAX_SIZE_SETTING); + const result = await services.getIndexData(this._layerName, indexSize); const finalResult = { type: 'FeatureCollection', @@ -337,7 +344,8 @@ CORS configuration of the server permits requests from the OpenSearch Dashboards serviceSettings, leaflet, layerChosenByUser, - http + http, + uiSettings ) { const clonedLayer = new ChoroplethLayer( name, @@ -349,7 +357,8 @@ CORS configuration of the server permits requests from the OpenSearch Dashboards serviceSettings, leaflet, layerChosenByUser, - http + http, + uiSettings ); clonedLayer.setJoinField(this._joinField); clonedLayer.setColorRamp(this._colorRamp); diff --git a/src/plugins/region_map/public/components/map_choice_options.tsx b/src/plugins/region_map/public/components/map_choice_options.tsx index f18cf88b3712..f08f026233a6 100644 --- a/src/plugins/region_map/public/components/map_choice_options.tsx +++ b/src/plugins/region_map/public/components/map_choice_options.tsx @@ -4,7 +4,7 @@ */ import './map_choice_options.scss'; -import React, { useCallback, useMemo, useState } from 'react'; +import React, { useCallback, useMemo } from 'react'; import { EuiPanel, EuiSpacer, diff --git a/src/plugins/region_map/public/region_map_visualization.js b/src/plugins/region_map/public/region_map_visualization.js index 81afee4671ca..69dca0525b89 100644 --- a/src/plugins/region_map/public/region_map_visualization.js +++ b/src/plugins/region_map/public/region_map_visualization.js @@ -230,7 +230,8 @@ export function createRegionMapVisualization({ await getServiceSettings(), (await lazyLoadMapsLegacyModules()).L, this._params.layerChosenByUser, - http + http, + uiSettings ); } else { const { ChoroplethLayer } = await import('./choropleth_layer'); @@ -244,7 +245,8 @@ export function createRegionMapVisualization({ await getServiceSettings(), (await lazyLoadMapsLegacyModules()).L, this._params.layerChosenByUser, - http + http, + uiSettings ); } this._choroplethLayer.setLayerChosenByUser(this._params.layerChosenByUser); diff --git a/src/plugins/region_map/public/services.ts b/src/plugins/region_map/public/services.ts index dd26be3ccd7a..ba182c7aa0fa 100644 --- a/src/plugins/region_map/public/services.ts +++ b/src/plugins/region_map/public/services.ts @@ -7,7 +7,7 @@ import { CoreStart, HttpFetchError } from 'opensearch-dashboards/public'; export interface Services { getCustomIndices: () => Promise; - getIndexData: (indexName: string) => Promise; + getIndexData: (indexName: string, size: number) => Promise; getIndexMapping: (indexName: string) => Promise; } @@ -25,11 +25,12 @@ export function getServices(http: CoreStart['http']): Services { return e; } }, - getIndexData: async (indexName: string) => { + getIndexData: async (indexName: string, size: number) => { try { const response = await http.post('../api/geospatial/_search', { body: JSON.stringify({ index: indexName, + size, }), }); return response; diff --git a/src/plugins/region_map/server/routes/opensearch.ts b/src/plugins/region_map/server/routes/opensearch.ts index 5eebc9a0ffda..dfdcb4a1900d 100644 --- a/src/plugins/region_map/server/routes/opensearch.ts +++ b/src/plugins/region_map/server/routes/opensearch.ts @@ -57,14 +57,15 @@ export function registerGeospatialRoutes(router: IRouter) { validate: { body: schema.object({ index: schema.string(), + size: schema.number(), }), }, }, async (context, req, res) => { const client = context.core.opensearch.client.asCurrentUser; try { - const { index } = req.body; - const params = { index, body: {} }; + const { index, size } = req.body; + const params = { index, body: {}, size }; const results = await client.search(params); return res.ok({ body: { diff --git a/src/plugins/region_map/server/ui_settings.ts b/src/plugins/region_map/server/ui_settings.ts index e5c90f6779b1..037ee4b67b9a 100644 --- a/src/plugins/region_map/server/ui_settings.ts +++ b/src/plugins/region_map/server/ui_settings.ts @@ -31,6 +31,7 @@ import { i18n } from '@osd/i18n'; import { UiSettingsParams } from 'opensearch-dashboards/server'; import { schema } from '@osd/config-schema'; +import { CUSTOM_VECTOR_MAP_MAX_SIZE_SETTING } from '../common'; export function getUiSettings(): Record> { return { @@ -49,5 +50,20 @@ export function getUiSettings(): Record> { schema: schema.boolean(), category: ['visualization'], }, + [CUSTOM_VECTOR_MAP_MAX_SIZE_SETTING]: { + name: i18n.translate('regionMap.advancedSettings.visualization.customVectorMapDefaultSize', { + defaultMessage: 'Custom vector map size', + }), + value: 1000, + description: i18n.translate( + 'regionMap.advancedSettings.visualization.customVectorMapDefaultSizeText', + { + defaultMessage: + 'The maximum number of features to load from custom vector map. A higher number might have negative impact on browser rendering performance.', + } + ), + schema: schema.number(), + category: ['visualization'], + }, }; } diff --git a/src/plugins/vis_type_timeseries/README.md b/src/plugins/vis_type_timeseries/README.md index 4b4184b6eadd..719f772cdea5 100644 --- a/src/plugins/vis_type_timeseries/README.md +++ b/src/plugins/vis_type_timeseries/README.md @@ -1 +1 @@ -Contains everything around TSVB (the editor, visualizatin implementations and backends). \ No newline at end of file +Contains everything around TSVB (the editor, visualization implementations and backends). \ No newline at end of file diff --git a/src/plugins/vis_type_timeseries/public/application/components/aggs/serial_diff.js b/src/plugins/vis_type_timeseries/public/application/components/aggs/serial_diff.js index d0941e8c2369..5ecb003e56a4 100644 --- a/src/plugins/vis_type_timeseries/public/application/components/aggs/serial_diff.js +++ b/src/plugins/vis_type_timeseries/public/application/components/aggs/serial_diff.js @@ -57,7 +57,8 @@ export const SerialDiffAgg = (props) => { const handleNumberChange = createNumberHandler(handleChange); const htmlId = htmlIdGenerator(); - const docLinks = useOpenSearchDashboards().services.docLinks; + const serialDiffDoc = useOpenSearchDashboards().services.docLinks?.links.opensearch.aggregations + .pipeline.serial_diff; return ( { id="visTypeTimeseries.serialDiff.lagLabel" defaultMessage="Lag" description={`'Lag' refers to the parameter name of the serial diff translation - ${docLinks.services.links.opensearch.aggregations.pipeline.serial_diff}. + ${serialDiffDoc}. This should only be translated if there is a reasaonable word explaining what that parameter does.`} /> } diff --git a/src/plugins/vis_type_vega/public/__snapshots__/vega_visualization.test.js.snap b/src/plugins/vis_type_vega/public/__snapshots__/vega_visualization.test.js.snap index 8b813ee06b1b..7ba343a02f21 100644 --- a/src/plugins/vis_type_vega/public/__snapshots__/vega_visualization.test.js.snap +++ b/src/plugins/vis_type_vega/public/__snapshots__/vega_visualization.test.js.snap @@ -2,8 +2,8 @@ exports[`VegaVisualizations VegaVisualization - basics should show vega blank rectangle on top of a map (vegamap) 1`] = `"
"`; -exports[`VegaVisualizations VegaVisualization - basics should show vega graph (may fail in dev env) 1`] = `"
"`; +exports[`VegaVisualizations VegaVisualization - basics should show vega graph (may fail in dev env) 1`] = `"
"`; exports[`VegaVisualizations VegaVisualization - basics should show vegalite graph and update on resize (may fail in dev env) 1`] = `"
  • \\"width\\" and \\"height\\" params are ignored because \\"autosize\\" is enabled. Set \\"autosize\\": \\"none\\" to disable
"`; -exports[`VegaVisualizations VegaVisualization - basics should show vegalite graph and update on resize (may fail in dev env) 2`] = `"
  • \\"width\\" and \\"height\\" params are ignored because \\"autosize\\" is enabled. Set \\"autosize\\": \\"none\\" to disable
"`; +exports[`VegaVisualizations VegaVisualization - basics should show vegalite graph and update on resize (may fail in dev env) 2`] = `"
  • \\"width\\" and \\"height\\" params are ignored because \\"autosize\\" is enabled. Set \\"autosize\\": \\"none\\" to disable
"`; diff --git a/src/setup_node_env/__snapshots__/node_version_validator.test.js.snap b/src/setup_node_env/__snapshots__/node_version_validator.test.js.snap new file mode 100644 index 000000000000..e4937710779f --- /dev/null +++ b/src/setup_node_env/__snapshots__/node_version_validator.test.js.snap @@ -0,0 +1,755 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Node.js version validation fails if package.json has a 0.x.x engines.node 1`] = `"OpenSearch Dashboards did not report its required version of the Node.js runtime in a valid format. Please revert any changes that might have been made to the package.json file and try again."`; + +exports[`Node.js version validation fails if package.json has a blank engines.node 1`] = `"OpenSearch Dashboards did not report its required version of the Node.js runtime. Please revert any changes that might have been made to the package.json file and try again."`; + +exports[`Node.js version validation fails if package.json has an invalid engines.node 1`] = `"OpenSearch Dashboards did not report its required version of the Node.js runtime in a valid format. Please revert any changes that might have been made to the package.json file and try again."`; + +exports[`Node.js version validation fails if package.json is missing engines 1`] = `"OpenSearch Dashboards did not report its required version of the Node.js runtime. Please revert any changes that might have been made to the package.json file and try again."`; + +exports[`Node.js version validation fails if package.json is missing engines.node 1`] = `"OpenSearch Dashboards did not report its required version of the Node.js runtime. Please revert any changes that might have been made to the package.json file and try again."`; + +exports[`Node.js version validation fails if process.version is not reported 1`] = `"OpenSearch Dashboards cannot start up because the JavaScript runtime did not report its version. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation fails if process.version reports an invalid value 1`] = `"OpenSearch Dashboards cannot start up because the JavaScript runtime did not report its version in a discernible format. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and no operator 4, should not accept v3.0.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and no operator 4, should not accept v3.0.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and no operator 4, should not accept v3.1.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and no operator 4, should not accept v3.1.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and no operator 4, should not accept v5.0.0, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.0.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and no operator 4, should not accept v5.0.1, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.0.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and no operator 4, should not accept v5.1.0, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.1.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and no operator 4, should not accept v5.1.1, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.1.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the caret operator ^4, should not accept v3.0.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the caret operator ^4, should not accept v3.0.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the caret operator ^4, should not accept v3.1.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the caret operator ^4, should not accept v3.1.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the caret operator ^4, should not accept v5.0.0, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.0.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the caret operator ^4, should not accept v5.0.1, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.0.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the caret operator ^4, should not accept v5.1.0, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.1.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the caret operator ^4, should not accept v5.1.1, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.1.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the equals operator =4, should not accept v3.0.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the equals operator =4, should not accept v3.0.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the equals operator =4, should not accept v3.1.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the equals operator =4, should not accept v3.1.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the equals operator =4, should not accept v5.0.0, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.0.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the equals operator =4, should not accept v5.0.1, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.0.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the equals operator =4, should not accept v5.1.0, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.1.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the equals operator =4, should not accept v5.1.1, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.1.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than operator >4, should not accept v3.0.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.0. Please use a Node.js runtime version that is v5.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than operator >4, should not accept v3.0.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.1. Please use a Node.js runtime version that is v5.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than operator >4, should not accept v3.1.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.0. Please use a Node.js runtime version that is v5.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than operator >4, should not accept v3.1.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.1. Please use a Node.js runtime version that is v5.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than operator >4, should not accept v4.0.0, the exact version 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.0.0. Please use a Node.js runtime version that is v5.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than operator >4, should not accept v4.0.1, a patch upgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.0.1. Please use a Node.js runtime version that is v5.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than operator >4, should not accept v4.1.0, a minor upgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.1.0. Please use a Node.js runtime version that is v5.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than operator >4, should not accept v4.1.1, a minor upgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.1.1. Please use a Node.js runtime version that is v5.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than-or-equals operator >=4, should not accept v3.0.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.0. Please use a Node.js runtime version that is v4.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than-or-equals operator >=4, should not accept v3.0.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.1. Please use a Node.js runtime version that is v4.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than-or-equals operator >=4, should not accept v3.1.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.0. Please use a Node.js runtime version that is v4.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the greater-than-or-equals operator >=4, should not accept v3.1.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.1. Please use a Node.js runtime version that is v4.0.0 or greater."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the tilde operator ~4, should not accept v3.0.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the tilde operator ~4, should not accept v3.0.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.0.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the tilde operator ~4, should not accept v3.1.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the tilde operator ~4, should not accept v3.1.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.1.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the tilde operator ~4, should not accept v5.0.0, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.0.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the tilde operator ~4, should not accept v5.0.1, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.0.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the tilde operator ~4, should not accept v5.1.0, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.1.0. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new major Node.js version using a comparator with a version missing its patch and minor, and the tilde operator ~4, should not accept v5.1.1, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.1.1. Please use a Node.js runtime version that is v4.0.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.54.0, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.54.1, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.55.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.55.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.56.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.56.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v4.54.0, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v4.54.1, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v4.56.0, a minor upgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v4.56.1, a minor upgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.54.0, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.54.1, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.55.0, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.55.1, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.56.0, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.56.1, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.54.0, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.54.1, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.55.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.55.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.56.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.56.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v4.54.0, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v4.54.1, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.54.0, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.54.1, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.55.0, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.55.1, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.56.0, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.56.1, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.54.0, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.54.1, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.55.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.55.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.56.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.56.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v4.54.0, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v4.54.1, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v4.56.0, a minor upgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v4.56.1, a minor upgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.54.0, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.54.1, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.55.0, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.55.1, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.56.0, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.56.1, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.54.0, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.0. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.54.1, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.1. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.55.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.0. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.55.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.1. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.56.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.0. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.56.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.1. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v4.54.0, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.0. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v4.54.1, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.1. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v4.55.0, the exact version 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.0. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v4.55.1, a patch upgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.1. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.54.0, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.0. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.54.1, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.1. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.55.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.0. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.55.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.1. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.56.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.0. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.56.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.1. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v4.54.0, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.0. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v4.54.1, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.1. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.54.0, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.54.1, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.55.0, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.55.1, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.56.0, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.56.1, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v4.54.0, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v4.54.1, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v4.56.0, a minor upgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v4.56.1, a minor upgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.54.0, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.54.1, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.55.0, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.55.1, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.56.0, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.0. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation new minor Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.56.1, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.1. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v4.55.665, a patch downgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v4.55.667, a patch upgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v4.56.665, a minor upgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v4.56.666, a minor upgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v4.56.667, a minor upgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v5.54.665, a major upgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v5.54.666, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v5.54.667, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v5.55.665, a major upgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v5.55.666, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v5.55.667, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v5.56.665, a major upgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v5.56.666, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and no operator 4.55.666, should not accept v5.56.667, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v4.55.665, a patch downgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v5.54.665, a major upgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v5.54.666, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v5.54.667, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v5.55.665, a major upgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v5.55.666, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v5.55.667, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v5.56.665, a major upgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v5.56.666, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the caret operator ^4.55.666, should not accept v5.56.667, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v4.55.665, a patch downgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v4.55.667, a patch upgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v4.56.665, a minor upgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v4.56.666, a minor upgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v4.56.667, a minor upgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v5.54.665, a major upgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v5.54.666, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v5.54.667, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v5.55.665, a major upgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v5.55.666, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v5.55.667, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v5.56.665, a major upgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.665. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v5.56.666, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.666. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the equals operator =4.55.666, should not accept v5.56.667, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.667. Please use Node.js v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v4.55.665, a patch downgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.665. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than operator >4.55.666, should not accept v4.55.666, the exact version 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.666. Please use a Node.js runtime version that is greater than v4.55.666."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the greater-than-or-equals operator >=4.55.666, should not accept v4.55.665, a patch downgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.665. Please use a Node.js runtime version that is v4.55.666 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v4.55.665, a patch downgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v4.56.665, a minor upgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v4.56.666, a minor upgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v4.56.667, a minor upgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v5.54.665, a major upgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v5.54.666, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v5.54.667, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v5.55.665, a major upgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v5.55.666, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v5.55.667, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v5.56.665, a major upgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.665. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v5.56.666, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.666. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a complete version, and the tilde operator ~4.55.666, should not accept v5.56.667, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.667. Please use a Node.js runtime version that is v4.55.666 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v4.56.665, a minor upgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v4.56.666, a minor upgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v4.56.667, a minor upgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.54.665, a major upgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.54.666, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.54.667, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.55.665, a major upgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.55.666, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.55.667, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.56.665, a major upgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.56.666, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and no operator 4.55, should not accept v5.56.667, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.54.665, a major upgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.54.666, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.54.667, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.55.665, a major upgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.55.666, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.55.667, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.56.665, a major upgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.56.666, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the caret operator ^4.55, should not accept v5.56.667, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v5.0.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v4.56.665, a minor upgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v4.56.666, a minor upgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v4.56.667, a minor upgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.54.665, a major upgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.54.666, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.54.667, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.55.665, a major upgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.55.666, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.55.667, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.56.665, a major upgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.56.666, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the equals operator =4.55, should not accept v5.56.667, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v4.55.665, a patch downgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.665. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v4.55.666, the exact version 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.666. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than operator >4.55, should not accept v4.55.667, a patch upgrade 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.55.667. Please use a Node.js runtime version that is v4.56.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the greater-than-or-equals operator >=4.55, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use a Node.js runtime version that is v4.55.0 or greater."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.54.665, a major downgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.54.666, a major downgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.54.667, a major downgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.55.665, a major downgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.55.666, a major downgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.55.667, a major downgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.55.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.56.665, a major downgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.56.666, a major downgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v3.56.667, a major downgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v3.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v4.54.665, a minor downgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v4.54.666, a minor downgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v4.54.667, a minor downgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v4.56.665, a minor upgrade with lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v4.56.666, a minor upgrade with same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v4.56.667, a minor upgrade with higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v4.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.54.665, a major upgrade with lower minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.54.666, a major upgrade with lower minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.54.667, a major upgrade with lower minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.54.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.55.665, a major upgrade with same minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.55.666, a major upgrade with same minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.55.667, a major upgrade with same minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.55.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.56.665, a major upgrade with higher minor and lower patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.665. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.56.666, a major upgrade with higher minor and same patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.666. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; + +exports[`Node.js version validation non-new Node.js version using a comparator with a version missing its patch, and the tilde operator ~4.55, should not accept v5.56.667, a major upgrade with higher minor and higher patch 1`] = `"OpenSearch Dashboards cannot start up using the Node.js runtime v5.56.667. Please use a Node.js runtime version that is v4.55.0 or greater and lower than v4.56.0."`; diff --git a/src/setup_node_env/node_version_validator.js b/src/setup_node_env/node_version_validator.js index 504d0970ecf6..ba418244b086 100644 --- a/src/setup_node_env/node_version_validator.js +++ b/src/setup_node_env/node_version_validator.js @@ -28,27 +28,217 @@ * under the License. */ +/* Note: + * This file uses ES5 in order to provide meaningful output even if an old Node.js runtime is used. + * + * The exit codes facilitating the testing are: + * 21: JS runtime version doesn't satisfy the range specific in `engines.node` of `package.json`. + * 22: `package.json` is missing `engines.node` or it is not a string. + * 23: `package.json` has a `engines.node` that is not a valid semver range. + * 24: `package.json` has a `engines.node` that has a major of zero. + * 25: JS runtime did not report `process.version`. + * 26: JS runtime returned a `process.version` that didn't match semver. + */ + var pkg = require('../../package.json'); -// Note: This is written in ES5 so we can run this before anything else -// and gives support for older NodeJS versions -var currentVersion = (process && process.version) || null; -var rawRequiredVersion = (pkg && pkg.engines && pkg.engines.node) || null; -var requiredVersion = rawRequiredVersion ? 'v' + rawRequiredVersion : rawRequiredVersion; -var currentVersionMajorMinorPatch = currentVersion.match(/^v(\d+)\.(\d+)\.(\d+)/); -var requiredVersionMajorMinorPatch = requiredVersion.match(/^v(\d+)\.(\d+)\.(\d+)/); -var isVersionValid = - currentVersionMajorMinorPatch[1] === requiredVersionMajorMinorPatch[1] && - currentVersionMajorMinorPatch[2] === requiredVersionMajorMinorPatch[2] && - parseInt(currentVersionMajorMinorPatch[3], 10) >= parseInt(requiredVersionMajorMinorPatch[3], 10); - -// Validates current the NodeJS version compatibility when OpenSearch Dashboards starts. -if (!isVersionValid) { - var errorMessage = - `OpenSearch Dashboards was built with ${requiredVersion} and does not support the current Node.js version ${currentVersion}. ` + - `Please use Node.js ${requiredVersion} or a higher patch version.`; - - // Actions to apply when validation fails: error report + exit. - console.error(errorMessage); - process.exit(1); +var versionMatcher = /^\s*v?\s*(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:\D.*)?$/; +var rangeMatcher = /^\s*(>=?|\^|~|=)?\s*(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:[^\d.].*)?$/; + +var ERR_MISSING_REQUIREMENTS = + 'OpenSearch Dashboards did not report its required version of the Node.js runtime'; +var ERR_BAD_REQUIREMENTS = ERR_MISSING_REQUIREMENTS + ' in a valid format'; +var _BAD_REQUIREMENTS_SUFFIX = + '. Please revert any changes that might have been made to the package.json file and try again.'; +ERR_MISSING_REQUIREMENTS += _BAD_REQUIREMENTS_SUFFIX; +ERR_BAD_REQUIREMENTS += _BAD_REQUIREMENTS_SUFFIX; + +var pkgEngineNodeVersion = pkg && pkg.engines && pkg.engines.node; +if (!pkgEngineNodeVersion || typeof pkgEngineNodeVersion !== 'string') { + console.error(ERR_MISSING_REQUIREMENTS); + process.exit(22); +} + +/* Basic semver parsing: This is a very limited subset of what semver supports where only a single comparator, composed + * of an operator and a version, is supported. + * [https://github.com/npm/node-semver/blob/cb1ca1d5480a6c07c12ac31ba5f2071ed530c4ed/README.md#ranges] + * + * The supported operators are: + * > Greater than + * >= Greater than or equal to + * = Equal + * ~ Tilde ranges: Allows patch changes if a minor version is specified but if only a major version is specified, + * it allows minor changes. + * ^ Caret ranges: Allows patch and minor updates when major is non-zero (and we will never have that). + * + * Note: If no operator is specified, equality is assumed. + */ +var requiredParts = pkgEngineNodeVersion.match(rangeMatcher); +if (requiredParts === null) { + console.error(ERR_BAD_REQUIREMENTS); + process.exit(23); +} + +var comparatorVersion = { + major: requiredParts[2], + minor: requiredParts[3], + patch: requiredParts[4], +}; +var comparatorOperator = requiredParts[1] || '='; +var rangeBottom = { + major: parseInt(comparatorVersion.major, 10) || 0, + minor: parseInt(comparatorVersion.minor, 10) || 0, + patch: parseInt(comparatorVersion.patch, 10) || 0, + inclusive: comparatorOperator.indexOf('>') === -1 || comparatorOperator.indexOf('=') > -1, +}; +var rangeTop = undefined; + +if (!rangeBottom.major) { + console.error(ERR_BAD_REQUIREMENTS); + process.exit(24); +} + +if (comparatorOperator === '>') { + if (!comparatorVersion.minor) { + // >3 is >=4.0.0 + rangeBottom.major += 1; + rangeBottom.inclusive = true; + } else if (!comparatorVersion.patch) { + // >3.1 is >=3.2.0 + rangeBottom.minor += 1; + rangeBottom.inclusive = true; + } +} + +// =3 is ~3.0.0 and =3.1 is ~3.1.0 +if (comparatorOperator === '=' && (!comparatorVersion.minor || !comparatorVersion.patch)) { + comparatorOperator = '~'; +} + +// =3.1.4 +if (comparatorOperator === '=') { + rangeTop = { + major: rangeBottom.major, + minor: rangeBottom.minor, + patch: rangeBottom.patch, + inclusive: true, + }; +} else if (comparatorOperator === '~') { + if (comparatorVersion.minor) { + // ~3.1.4 and ~3.1 are <3.2.0 + rangeTop = { + major: rangeBottom.major, + minor: rangeBottom.minor + 1, + patch: 0, + }; + } else { + // ~3 is <4.0.0 + rangeTop = { + major: rangeBottom.major + 1, + minor: 0, + patch: 0, + }; + } +} else if (comparatorOperator === '^') { + // ^3.1.4 is <4.0.0 + rangeTop = { + major: rangeBottom.major + 1, + minor: 0, + patch: 0, + }; +} + +function getVersionCompatibilityMessage() { + var versionBottom = 'v' + rangeBottom.major + '.' + rangeBottom.minor + '.' + rangeBottom.patch; + if (comparatorOperator === '=') { + return 'Please use Node.js ' + versionBottom + '.'; + } + + var message = 'Please use a Node.js runtime version that is greater than ' + versionBottom; + if (rangeBottom.inclusive) { + message = 'Please use a Node.js runtime version that is ' + versionBottom + ' or greater'; + } + + if (!rangeTop) return message + '.'; + + var versionTop = 'v' + rangeTop.major + '.' + rangeTop.minor + '.' + rangeTop.patch; + // The only operator with a truthy `rangeTop.inclusive` is the `=` which was handled above + return message + ' and lower than ' + versionTop + '.'; +} + +/* Compares the 2 versions and returns + * 1: A > B + * 0: A === B + * -1: A < B + */ +function versionCompare(versionA, versionB) { + // 4.x.x > 3.1.4 + if (versionA.major > versionB.major) return 1; + else if (versionA.major === versionB.major) { + // 3.2.x > 3.1.4 + if (versionA.minor > versionB.minor) return 1; + else if (versionA.minor === versionB.minor) { + // 3.1.5 >= 3.1.4 + if (versionA.patch > versionB.patch) return 1; + // 3.1.4 = 3.1.4 + else if (versionA.patch === versionB.patch) return 0; + } + } + + return -1; +} + +var currentVersion = process && process.version; +if (!currentVersion) { + console.error( + 'OpenSearch Dashboards cannot start up because the JavaScript runtime did not report its version. ' + + getVersionCompatibilityMessage() + ); + process.exit(25); +} + +var currentParts = currentVersion.match(versionMatcher); +if (currentParts === null) { + console.error( + 'OpenSearch Dashboards cannot start up because the JavaScript runtime did not report its version in a ' + + 'discernible format. ' + + getVersionCompatibilityMessage() + ); + process.exit(26); +} + +var version = { + major: parseInt(currentParts[1], 10) || 0, + minor: parseInt(currentParts[2], 10) || 0, + patch: parseInt(currentParts[3], 10) || 0, +}; + +var satisfiesBottom = false; + +// Check if version is greater than rangeBottom or if equal, that `rangeBottom` is inclusive +var versionComparedToRangeBottom = versionCompare(version, rangeBottom); +if (versionComparedToRangeBottom === 1) satisfiesBottom = true; +else if (rangeBottom.inclusive && versionComparedToRangeBottom === 0) satisfiesBottom = true; + +var satisfiesTop = false; + +if (satisfiesBottom && rangeTop) { + var versionComparedToRangeTop = versionCompare(version, rangeTop); + if (versionComparedToRangeTop === -1) satisfiesTop = true; + else if (rangeTop.inclusive && versionComparedToRangeTop === 0) satisfiesTop = true; +} + +// Fail if the Node.js version doesn't satisfy the requirements of OpenSearch Dashboards +if (!satisfiesBottom || (rangeTop && !satisfiesTop)) { + console.error( + 'OpenSearch Dashboards cannot start up using the Node.js runtime v' + + version.major + + '.' + + version.minor + + '.' + + version.patch + + '. ' + + getVersionCompatibilityMessage() + ); + process.exit(21); } diff --git a/src/setup_node_env/node_version_validator.test.js b/src/setup_node_env/node_version_validator.test.js index cb3639154c6c..5d3a70cd7b92 100644 --- a/src/setup_node_env/node_version_validator.test.js +++ b/src/setup_node_env/node_version_validator.test.js @@ -28,83 +28,279 @@ * under the License. */ -var exec = require('child_process').exec; -var pkg = require('../../package.json'); +const semver = require('semver'); +const util = require('util'); +const exec = util.promisify(require('child_process').exec); -var REQUIRED_NODE_JS_VERSION = 'v' + pkg.engines.node; +const allPossibleCombinations = [ + 'a patch downgrade', + 'the exact version', + 'a patch upgrade', -describe('NodeVersionValidator', function () { - it('should run the script WITHOUT error when the version is the same', function (done) { - testValidateNodeVersion(done, REQUIRED_NODE_JS_VERSION); - }); + 'a minor upgrade with lower patch', + 'a minor upgrade with same patch', + 'a minor upgrade with higher patch', - it('should run the script WITHOUT error when only the patch version is higher', function (done) { - testValidateNodeVersion(done, requiredNodeVersionWithDiff(0, 0, +1)); - }); + 'a minor downgrade with lower patch', + 'a minor downgrade with same patch', + 'a minor downgrade with higher patch', + + 'a major upgrade with same minor and lower patch', + 'a major upgrade with same minor and same patch', + 'a major upgrade with same minor and higher patch', + + 'a major downgrade with same minor and lower patch', + 'a major downgrade with same minor and same patch', + 'a major downgrade with same minor and higher patch', + + 'a major upgrade with lower minor and lower patch', + 'a major upgrade with lower minor and same patch', + 'a major upgrade with lower minor and higher patch', + + 'a major downgrade with lower minor and lower patch', + 'a major downgrade with lower minor and same patch', + 'a major downgrade with lower minor and higher patch', + + 'a major upgrade with higher minor and lower patch', + 'a major upgrade with higher minor and same patch', + 'a major upgrade with higher minor and higher patch', + + 'a major downgrade with higher minor and lower patch', + 'a major downgrade with higher minor and same patch', + 'a major downgrade with higher minor and higher patch', +]; + +const allPossibleOperators = [ + { title: 'no operator', operator: '' }, + { title: 'the equals operator', operator: '=' }, + { title: 'the greater-than operator', operator: '>' }, + { title: 'the greater-than-or-equals operator', operator: '>=' }, + { title: 'the caret operator', operator: '^' }, + { title: 'the tilde operator', operator: '~' }, +]; + +// Regex pattern to parse test titles which gets used to create new versions +const testTitleMatcher = /(?:(major|minor|patch)\s+(upgrade|downgrade)|(higher|lower)\s+(major|minor|patch))/g; +const testTitleChanges = { + upgrade: 1, + downgrade: -1, + higher: 1, + lower: -1, +}; + +const titleChangesCache = new Map(); + +// Parse the test title and generate a new version +const getUpdatedVersion = (testedVersion, title) => { + let matches; + let majorChange = 0; + let minorChange = 0; + let patchChange = 0; + + if (titleChangesCache.has(title)) { + const cache = titleChangesCache.get(title); + majorChange = cache.majorChange; + minorChange = cache.minorChange; + patchChange = cache.patchChange; + } else { + while ((matches = testTitleMatcher.exec(title)) !== null) { + const change = testTitleChanges[matches[2]] || testTitleChanges[matches[3]]; + if (matches[1] === 'major' || matches[4] === 'major') majorChange = change; + else if (matches[1] === 'minor' || matches[4] === 'minor') minorChange = change; + else if (matches[1] === 'patch' || matches[4] === 'patch') patchChange = change; + } + + titleChangesCache.set(title, { majorChange, minorChange, patchChange }); + } + + return testedVersion.change(majorChange, minorChange, patchChange); +}; + +const getMockedPackageJson = (requiredRange) => { + switch (requiredRange) { + case 'BLANK': + return `{ engines: { node: '' }}`; + case 'NO_NODE': + return `{ engines: { }}`; + case 'NO_ENGINES': + return `{}`; + default: + return `{ engines: { node: '${requiredRange}' }}`; + } +}; + +const checkNodeVersionValidation = async (nodeVersion, requiredRange) => { + const mockedProcessVersion = `Object.defineProperty(process, 'version', { value: '${ + nodeVersion ? 'v' + nodeVersion : '' + }', writable: true });`; + // Node + Windows doesn't like line-feeds + const mockedRequire = + `const Module = require('module');` + + `const req = Module.prototype.require;` + + `Module.prototype.require = name =>` + + `name === '../../package.json' ?` + + getMockedPackageJson(requiredRange) + + `: req(name);`; + try { + /* ToDo: Implement changes so these tests can contribute to the code coverage report + * `jest --coverage` is not capable of handling child processes: https://github.com/facebook/jest/issues/5274 + * + * The workaround is to do + * 1. `nyc node scripts/jest` + * This cleans the cached `.nyc_output` and correctly instruments subprocesses + * 2. `nyc report --reporter=lcov --reporter=text-summary --report-dir target/opensearch-dashboards-coverage/jest` + * This generates the lcov report and shows a summary + * 3. Clean up `.nyc_output` + * + * Note: src/dev/jest/config.js should be checked for any other config that we would like to pass to nyc + */ + await exec( + `node -e "${mockedProcessVersion}${mockedRequire}require('./node_version_validator.js')"`, + { cwd: __dirname } + ); + } catch (ex) { + if (ex.stderr?.indexOf('OpenSearch Dashboards') > -1) + return { + error: ex.code, + stderr: ex.stderr, + }; + + throw ex; + } + + return { + error: 0, + }; +}; - it('should run the script WITH error if the patch version is lower', function (done) { - var lowerPatchversion = requiredNodeVersionWithDiff(0, 0, -1); - testValidateNodeVersion( - done, - lowerPatchversion, - REQUIRED_NODE_JS_VERSION !== lowerPatchversion +// Create an appropriate test based on how semver feels about the version and range +const defineTest = (title, testedVersion, requiredRange) => { + const version = getUpdatedVersion(testedVersion, title); + + return semver.satisfies(version, requiredRange) + ? it(`${requiredRange}, should accept v${version}, ${title}`, async () => { + const { error, stderr } = await checkNodeVersionValidation(version, requiredRange); + expect(error).toEqual(0); // The exit code indicating an acceptable version + expect(stderr).toStrictEqual(undefined); + }) + : it(`${requiredRange}, should not accept v${version}, ${title}`, async () => { + const { error, stderr } = await checkNodeVersionValidation(version, requiredRange); + expect(error).toEqual(21); // The exit code indicating an unacceptable version + expect(stderr.trim()).toMatchSnapshot(); + }); +}; + +const describeSuites = (testsToRun, testedVersion, comparatorVersion) => { + describe.each(allPossibleOperators)('$title', ({ operator }) => { + testsToRun.forEach((title) => + defineTest(title, testedVersion, `${operator}${comparatorVersion}`) ); }); +}; + +const parseVersion = (version) => { + const parts = version?.match(/^\s*v?\s*(\d+)\.(\d+)\.(\d+)(\D.*)?$/) || null; + if (parts === null) throw `<${version}> is not a parsable version.`; + const numericParts = { + major: parseInt(parts[1], 10) || 0, + minor: parseInt(parts[2], 10) || 0, + patch: parseInt(parts[3], 10) || 0, + }; + + // prettier-ignore + const change = (majorChange = 0, minorChange = 0, patchChange = 0) => + (numericParts.major + majorChange) + + '.' + + (numericParts.minor + minorChange) + + '.' + + (numericParts.patch + patchChange); + + return { + get exact() { + return change(); + }, + change, + }; +}; + +describe('Node.js version validation', () => { + describe('non-new Node.js version using a comparator with a complete version, and', () => { + const comparatorVersion = '4.55.666'; + const testedVersion = parseVersion('4.55.666'); + const testsToRun = allPossibleCombinations; - it('should run the script WITH error if the major version is higher', function (done) { - testValidateNodeVersion(done, requiredNodeVersionWithDiff(+1, 0, 0), true); + describeSuites(testsToRun, testedVersion, comparatorVersion); }); - it('should run the script WITH error if the major version is lower', function (done) { - var lowerMajorVersion = requiredNodeVersionWithDiff(-1, 0, 0); - testValidateNodeVersion( - done, - lowerMajorVersion, - REQUIRED_NODE_JS_VERSION !== lowerMajorVersion - ); + describe('non-new Node.js version using a comparator with a version missing its patch, and', () => { + const comparatorVersion = '4.55'; + const testedVersion = parseVersion('4.55.666'); + const testsToRun = allPossibleCombinations; + + describeSuites(testsToRun, testedVersion, comparatorVersion); }); - it('should run the script WITH error if the minor version is higher', function (done) { - testValidateNodeVersion(done, requiredNodeVersionWithDiff(0, +1, 0), true); + describe('new minor Node.js version using a comparator with a version missing its patch, and', () => { + const comparatorVersion = '4.55'; + const testedVersion = parseVersion('4.55.0'); + // The tested version has zero for its patch value so exclude tests that lower it + const testsToRun = allPossibleCombinations.filter( + (title) => !/(patch downgrade|lower patch)/.test(title) + ); + + describeSuites(testsToRun, testedVersion, comparatorVersion); }); - it('should run the script WITH error if the minor version is lower', function (done) { - var lowerMinorVersion = requiredNodeVersionWithDiff(0, -1, 0); - testValidateNodeVersion( - done, - lowerMinorVersion, - REQUIRED_NODE_JS_VERSION !== lowerMinorVersion + describe('new major Node.js version using a comparator with a version missing its patch and minor, and', () => { + const comparatorVersion = '4'; + const testedVersion = parseVersion('4.0.0'); + // The tested version has zeros for patch and minor values so exclude tests that lower them + const testsToRun = allPossibleCombinations.filter( + (title) => !/((patch|minor) downgrade|lower (patch|minor))/.test(title) ); + + describeSuites(testsToRun, testedVersion, comparatorVersion); }); -}); -function requiredNodeVersionWithDiff(majorDiff, minorDiff, patchDiff) { - var matches = REQUIRED_NODE_JS_VERSION.match(/^v(\d+)\.(\d+)\.(\d+)/); - var major = Math.max(parseInt(matches[1], 10) + majorDiff, 0); - var minor = Math.max(parseInt(matches[2], 10) + minorDiff, 0); - var patch = Math.max(parseInt(matches[3], 10) + patchDiff, 0); + it('fails if package.json is missing engines', async () => { + const { error, stderr } = await checkNodeVersionValidation('4.55.666', 'NO_ENGINES'); + expect(error).toEqual(22); // The exit code indicating missing engines.node range + expect(stderr.trim()).toMatchSnapshot(); + }); - return `v${major}.${minor}.${patch}`; -} + it('fails if package.json is missing engines.node', async () => { + const { error, stderr } = await checkNodeVersionValidation('4.55.666', 'NO_NODE'); + expect(error).toEqual(22); // The exit code indicating missing engines.node range + expect(stderr.trim()).toMatchSnapshot(); + }); + + it('fails if package.json has a blank engines.node', async () => { + const { error, stderr } = await checkNodeVersionValidation('4.55.666', 'BLANK'); + expect(error).toEqual(22); // The exit code indicating missing engines.node range + expect(stderr.trim()).toMatchSnapshot(); + }); -function testValidateNodeVersion(done, versionToTest, expectError = false) { - var processVersionOverwrite = `Object.defineProperty(process, 'version', { value: '${versionToTest}', writable: true });`; - var command = `node -e "${processVersionOverwrite}require('./node_version_validator.js')"`; + it('fails if package.json has an invalid engines.node', async () => { + const { error, stderr } = await checkNodeVersionValidation('4.55.666', 'INVALID'); + expect(error).toEqual(23); // The exit code indicating an unacceptable engines.node range + expect(stderr.trim()).toMatchSnapshot(); + }); - exec(command, { cwd: __dirname }, function (error, _stdout, stderr) { - expect(stderr).toBeDefined(); - if (expectError) { - expect(error.code).toBe(1); + it('fails if package.json has a 0.x.x engines.node', async () => { + const { error, stderr } = await checkNodeVersionValidation('4.55.666', '0.11.222'); + expect(error).toEqual(24); // The exit code indicating an unacceptable engines.node range + expect(stderr.trim()).toMatchSnapshot(); + }); - var speficicErrorMessage = - `OpenSearch Dashboards was built with ${REQUIRED_NODE_JS_VERSION} and does not support the current Node.js version ${versionToTest}. ` + - `Please use Node.js ${REQUIRED_NODE_JS_VERSION} or a higher patch version.\n`; + it('fails if process.version is not reported', async () => { + const { error, stderr } = await checkNodeVersionValidation('', '4.55.666'); + expect(error).toEqual(25); // The exit code indicating an unacceptable process.version + expect(stderr.trim()).toMatchSnapshot(); + }); - expect(stderr).toStrictEqual(speficicErrorMessage); - } else { - expect(error).toBeNull(); - expect(stderr).toHaveLength(0); - } - done(); + it('fails if process.version reports an invalid value', async () => { + const { error, stderr } = await checkNodeVersionValidation('INVALID', '4.55.666'); + expect(error).toEqual(26); // The exit code indicating an unacceptable process.version + expect(stderr.trim()).toMatchSnapshot(); }); -} +}); diff --git a/src/setup_node_env/root/force.test.js b/src/setup_node_env/root/force.test.js index f48f3255e4ed..eca20f9547b2 100644 --- a/src/setup_node_env/root/force.test.js +++ b/src/setup_node_env/root/force.test.js @@ -28,7 +28,7 @@ * under the License. */ -var forceRoot = require('./force'); +const forceRoot = require('./force'); describe('forceRoot', function () { it('with flag', function () { @@ -40,7 +40,7 @@ describe('forceRoot', function () { }); test('remove argument', function () { - var args = ['--allow-root', 'foo']; + const args = ['--allow-root', 'foo']; forceRoot(args); expect(args.includes('--allow-root')).toBeFalsy(); }); diff --git a/src/setup_node_env/root/is_root.test.js b/src/setup_node_env/root/is_root.test.js index 81dfbe3616cb..e7f8e0670b77 100644 --- a/src/setup_node_env/root/is_root.test.js +++ b/src/setup_node_env/root/is_root.test.js @@ -28,7 +28,7 @@ * under the License. */ -var isRoot = require('./is_root'); +const isRoot = require('./is_root'); describe('isRoot', function () { test('0 is root', function () { diff --git a/yarn.lock b/yarn.lock index d4c3e3187449..98bb598f9242 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1645,9 +1645,9 @@ "@hapi/hoek" "9.x.x" "@hapi/statehood@^7.0.3": - version "7.0.3" - resolved "https://registry.yarnpkg.com/@hapi/statehood/-/statehood-7.0.3.tgz#655166f3768344ed3c3b50375a303cdeca8040d9" - integrity sha512-pYB+pyCHkf2Amh67QAXz7e/DN9jcMplIL7Z6N8h0K+ZTy0b404JKPEYkbWHSnDtxLjJB/OtgElxocr2fMH4G7w== + version "7.0.4" + resolved "https://registry.yarnpkg.com/@hapi/statehood/-/statehood-7.0.4.tgz#6acb9d0817b5c657089356f7d9fd60af0bce4f41" + integrity sha512-Fia6atroOVmc5+2bNOxF6Zv9vpbNAjEXNcUbWXavDqhnJDlchwUUwKS5LCi5mGtCTxRhUKKHwuxuBZJkmLZ7fw== dependencies: "@hapi/boom" "9.x.x" "@hapi/bounce" "2.x.x" @@ -2338,11 +2338,12 @@ mkdirp "^1.0.4" rimraf "^3.0.2" -"@opensearch-project/opensearch@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@opensearch-project/opensearch/-/opensearch-1.1.0.tgz#8b3c8b4cbcea01755ba092d2997bf0b4ca7f22f7" - integrity sha512-1TDw92JL8rD1b2QGluqBsIBLIiD5SGciIpz4qkrGAe9tcdfQ1ptub5e677rhWl35UULSjr6hP8M6HmISZ/M5HQ== +"@opensearch-project/opensearch@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@opensearch-project/opensearch/-/opensearch-2.1.0.tgz#d79ab4ae643493512099673e117faffe40b4fe56" + integrity sha512-iM2u63j2IlUOuMSbcw1TZFpRqjK6qMwVhb3jLLa/x4aATxdKOiO1i17mgzfkeepqj85efNzXBZzN+jkq1/EXhQ== dependencies: + aws4 "^1.11.0" debug "^4.3.1" hpagent "^0.1.1" ms "^2.1.3" @@ -2540,9 +2541,9 @@ "@hapi/hoek" "^9.0.0" "@sideway/formula@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" - integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" + integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== "@sideway/pinpoint@^2.0.0": version "2.0.0" @@ -2850,7 +2851,7 @@ resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.1.0.tgz#ab8109208106b5e764e5a6c92b2ba1c625b73020" integrity sha512-DCg+Ka+uDQ31lJ/UtEXVlaeV3d6t81gifaVWKJy4MYVVgvJttyX/viREy+If7fz+tK/gVxTGMtyrFPnm4gjrVA== -"@types/elasticsearch@^5.0.33": +"@types/elasticsearch@*", "@types/elasticsearch@^5.0.33": version "5.0.40" resolved "https://registry.yarnpkg.com/@types/elasticsearch/-/elasticsearch-5.0.40.tgz#811f6954088c264173e0a9876b97933250a4da10" integrity sha512-lhnbkC0XorAD7Dt7X+94cXUSHEdDNnEVk/DgFLHgIZQNhixV631Lj4+KpXunTT5rCHyj9RqK3TfO7QrOiwEeUQ== @@ -2884,15 +2885,10 @@ "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== - -"@types/estree@^0.0.50": - version "0.0.50" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" - integrity sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw== +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" + integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== "@types/expect@^1.20.4": version "1.20.4" @@ -2916,6 +2912,11 @@ dependencies: "@types/jquery" "*" +"@types/geojson@^7946.0.10": + version "7946.0.10" + resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.10.tgz#6dfbf5ea17142f7f9a043809f1cd4c448cb68249" + integrity sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA== + "@types/getopts@^2.0.1": version "2.1.0" resolved "https://registry.yarnpkg.com/@types/getopts/-/getopts-2.1.0.tgz#f2c7423b25c8e8d12326cd8c389ff9ec6fc51e79" @@ -3054,6 +3055,15 @@ "@types/react" "*" hoist-non-react-statics "^3.3.0" +"@types/http-aws-es@6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@types/http-aws-es/-/http-aws-es-6.0.2.tgz#3c608f7da83382bb5a1a35c4f9704296b979ca26" + integrity sha512-VfQ/h+xxdeWP2Sf3BDf2feyzC8duBH5rFPJw2RW5m800fJLkZof/oojn1Atw1jCh4XerjiXRTIyqd5gUQ2iWNw== + dependencies: + "@types/elasticsearch" "*" + "@types/node" "*" + aws-sdk "^2.814.0" + "@types/http-cache-semantics@*": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" @@ -4709,6 +4719,27 @@ aws-sdk@^2.650.0: uuid "8.0.0" xml2js "0.4.19" +aws-sdk@^2.814.0: + version "2.1271.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1271.0.tgz#a060fe65ff33afddb7385913200df4a26717f691" + integrity sha512-hQF+mjwe2FXFKOMNQGlfqn9InIL1bRp650ftctRqDo+VpnrYnKqF9eZa5Hk2kugs3/WUa4J2aqQa+foGWeH+Fg== + dependencies: + buffer "4.9.2" + events "1.1.1" + ieee754 "1.1.13" + jmespath "0.16.0" + querystring "0.2.0" + sax "1.2.1" + url "0.10.3" + util "^0.12.4" + uuid "8.0.0" + xml2js "0.4.19" + +aws4@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + axe-core@^4.0.2, axe-core@^4.3.5: version "4.4.1" resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.1.tgz#7dbdc25989298f9ad006645cd396782443757413" @@ -5363,9 +5394,9 @@ camelize@^1.0.0: integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= caniuse-lite@^1.0.30001317: - version "1.0.30001397" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001397.tgz" - integrity sha512-SW9N2TbCdLf0eiNDRrrQXx2sOkaakNZbCjgNpPyMJJbiOrU5QzMIrXOVMRM1myBXTD5iTkdrtU/EguCrBocHlA== + version "1.0.30001460" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001460.tgz" + integrity sha512-Bud7abqjvEjipUkpLs4D7gR0l8hBYBHoa+tGtKJHvT2AYzLp1z7EmVkUT4ERpVUfca8S2HGIVs883D8pUH1ZzQ== ccount@^1.0.0: version "1.1.0" @@ -6366,10 +6397,10 @@ cyclist@^1.0.1: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= -"d3-array@1 - 3", "d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3.1.1, d3-array@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.1.1.tgz#7797eb53ead6b9083c75a45a681e93fc41bc468c" - integrity sha512-33qQ+ZoZlli19IFiQx4QEpf2CBEayMRzhlisJHSCsSUbDXv6ZishqS1x7uFVClKG4Wr7rZVHvaAttoLow6GqdQ== +"d3-array@1 - 3", "d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3.2.2, d3-array@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.2.tgz#f8ac4705c5b06914a7e0025bbf8d5f1513f6a86e" + integrity sha512-yEEyEAbDrF8C6Ob2myOBLjwBLck1Z89jMGFee0oPsn95GqjerpaOA4ch+vc2l0FNFFwMD5N7OCSEN5eAlsUbgQ== dependencies: internmap "1 - 2" @@ -6390,7 +6421,7 @@ d3-collection@1, d3-collection@^1.0.7: resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.7.tgz#349bd2aa9977db071091c13144d5e4f16b5b310e" integrity sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A== -d3-color@1, "d3-color@1 - 3", d3-color@^1.4.0, d3-color@^3.0.1, d3-color@^3.1.0: +d3-color@1, "d3-color@1 - 3", d3-color@^1.4.0, d3-color@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2" integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== @@ -6449,17 +6480,17 @@ d3-geo-projection@^4.0.0: d3-array "1 - 3" d3-geo "1.12.0 - 3" -"d3-geo@1.12.0 - 3", d3-geo@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.0.1.tgz#4f92362fd8685d93e3b1fae0fd97dc8980b1ed7e" - integrity sha512-Wt23xBych5tSy9IYAM1FR2rWIBFWa52B/oF/GYe5zbdHrg08FU8+BuI6X4PvTwPDdqdAdq04fuWJpELtsaEjeA== +"d3-geo@1.12.0 - 3", d3-geo@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.1.0.tgz#74fd54e1f4cebd5185ac2039217a98d39b0a4c0e" + integrity sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA== dependencies: d3-array "2.5.0 - 3" -d3-hierarchy@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.1.tgz#9cbb0ffd2375137a351e6cfeed344a06d4ff4597" - integrity sha512-LtAIu54UctRmhGKllleflmHalttH3zkfSi4NlKrTAoFKjC+AFBJohsCAdgCBYQwH0F8hIOGY89X1pPqAchlMkA== +d3-hierarchy@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz#b01cd42c1eed3d46db77a5966cf726f8c09160c6" + integrity sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA== d3-interpolate@1, d3-interpolate@^1.4.0: version "1.4.0" @@ -6480,10 +6511,10 @@ d3-path@1: resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf" integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== -"d3-path@1 - 3", d3-path@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.0.1.tgz#f09dec0aaffd770b7995f1a399152bf93052321e" - integrity sha512-gq6gZom9AFZby0YLduxT1qmrp4xpBA1YZr19OI717WIdKE2OM5ETq5qrHLb301IgxhLwcuxvGZVLeeWc/k1I6w== +d3-path@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.1.0.tgz#22df939032fb5a71ae8b1800d61ddb7851c42526" + integrity sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ== "d3-quadtree@1 - 3": version "3.0.1" @@ -6521,12 +6552,12 @@ d3-shape@^1.3.4: dependencies: d3-path "1" -d3-shape@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.1.0.tgz#c8a495652d83ea6f524e482fca57aa3f8bc32556" - integrity sha512-tGDh1Muf8kWjEDT/LswZJ8WF85yDZLvVJpYU9Nq+8+yW1Z5enxrmXOhTArlkaElU+CTn0OTVNli+/i+HP45QEQ== +d3-shape@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.2.0.tgz#a1a839cbd9ba45f28674c69d7f855bcf91dfc6a5" + integrity sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA== dependencies: - d3-path "1 - 3" + d3-path "^3.1.0" d3-time-format@2: version "2.3.0" @@ -6547,10 +6578,10 @@ d3-time@1: resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1" integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA== -"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.0.0.tgz#65972cb98ae2d4954ef5c932e8704061335d4975" - integrity sha512-zmV3lRnlaLI08y9IMRXSDshQb5Nj77smnfpnd2LrBa/2K281Jijactokeak14QacHs/kKq0AQ121nidNYlarbQ== +"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.1.0.tgz#9310db56e992e3c0175e1ef385e545e48a9bb5c7" + integrity sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q== dependencies: d3-array "2 - 3" @@ -9676,10 +9707,15 @@ htmlparser2@^7.0: domutils "^2.8.0" entities "^3.0.1" +http-aws-es@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/http-aws-es/-/http-aws-es-6.0.0.tgz#1528978d2bee718b8732dcdced0856efa747aeff" + integrity sha512-g+qp7J110/m4aHrR3iit4akAlnW0UljZ6oTq/rCcbsI8KP9x+95vqUtx49M2XQ2JMpwJio3B6gDYx+E8WDxqiA== + http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + version "4.1.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== http-headers@^3.0.2: version "3.0.2" @@ -12809,10 +12845,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= -node-jose@2.0.0, node-jose@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/node-jose/-/node-jose-2.1.1.tgz#7d82e8d9cef8d0a722d7fa385524babfa9e30614" - integrity sha512-19nyuUGShNmFmVTeqDfP6ZJCiikbcjI0Pw2kykBCH7rl8AZgSiDZK2Ww8EDaMrOSbRg6IlfIMhI5ZvCklmOhzg== +node-jose@2.0.0, node-jose@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/node-jose/-/node-jose-2.2.0.tgz#b64f3225ad6bec328509a420800de597ba2bf3ed" + integrity sha512-XPCvJRr94SjLrSIm4pbYHKLEaOsDvJCpyFw/6V/KK/IXmyZ6SFBzAUDO9HQf4DB/nTEFcRGH87mNciOP23kFjw== dependencies: base64url "^3.0.1" buffer "^6.0.3" @@ -12822,7 +12858,7 @@ node-jose@2.0.0, node-jose@^2.1.0: node-forge "^1.2.1" pako "^2.0.4" process "^0.11.10" - uuid "^8.3.2" + uuid "^9.0.0" "node-libs-browser@^1.0.0 || ^2.0.0", node-libs-browser@^2.2.1: version "2.2.1" @@ -17468,11 +17504,16 @@ uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.3.0, uuid@^8.3.2: +uuid@^8.3.0: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" + integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + v8-compile-cache@^2.0.3, v8-compile-cache@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" @@ -17525,122 +17566,122 @@ value-or-function@^3.0.0: resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" integrity sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= -vega-canvas@^1.2.5, vega-canvas@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/vega-canvas/-/vega-canvas-1.2.6.tgz#55e032ce9a62acd17229f6bac66d99db3d6879cd" - integrity sha512-rgeYUpslYn/amIfnuv3Sw6n4BGns94OjjZNtUc9IDji6b+K8LGS/kW+Lvay8JX/oFqtulBp8RLcHN6QjqPLA9Q== +vega-canvas@^1.2.6, vega-canvas@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/vega-canvas/-/vega-canvas-1.2.7.tgz#cf62169518f5dcd91d24ad352998c2248f8974fb" + integrity sha512-OkJ9CACVcN9R5Pi9uF6MZBF06pO6qFpDYHWSKBJsdHP5o724KrsgR6UvbnXFH82FdsiTOff/HqjuaG8C7FL+9Q== -vega-crossfilter@~4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/vega-crossfilter/-/vega-crossfilter-4.1.0.tgz#b6c5a728ce987f2514074adb22cf86b9bc63e0c8" - integrity sha512-aiOJcvVpiEDIu5uNc4Kf1hakkkPaVOO5fw5T4RSFAw6GEDbdqcB6eZ1xePcsLVic1hxYD5SGiUPdiiIs0SMh2g== +vega-crossfilter@~4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/vega-crossfilter/-/vega-crossfilter-4.1.1.tgz#3ff3ca0574883706f7a399dc6d60f4a0f065ece4" + integrity sha512-yesvlMcwRwxrtAd9IYjuxWJJuAMI0sl7JvAFfYtuDkkGDtqfLXUcCzHIATqW6igVIE7tWwGxnbfvQLhLNgK44Q== dependencies: - d3-array "^3.1.1" - vega-dataflow "^5.7.3" - vega-util "^1.15.2" + d3-array "^3.2.2" + vega-dataflow "^5.7.5" + vega-util "^1.17.1" -vega-dataflow@^5.7.3, vega-dataflow@^5.7.4, vega-dataflow@~5.7.4: - version "5.7.4" - resolved "https://registry.yarnpkg.com/vega-dataflow/-/vega-dataflow-5.7.4.tgz#7cafc0a41b9d0b11dd2e34a513f8b7ca345dfd74" - integrity sha512-JGHTpUo8XGETH3b1V892we6hdjzCWB977ybycIu8DPqRoyrZuj6t1fCVImazfMgQD1LAfJlQybWP+alwKDpKig== +vega-dataflow@^5.7.3, vega-dataflow@^5.7.5, vega-dataflow@~5.7.5: + version "5.7.5" + resolved "https://registry.yarnpkg.com/vega-dataflow/-/vega-dataflow-5.7.5.tgz#0d559f3c3a968831f2995e099a2e270993ddfed9" + integrity sha512-EdsIl6gouH67+8B0f22Owr2tKDiMPNNR8lEvJDcxmFw02nXd8juimclpLvjPQriqn6ta+3Dn5txqfD117H04YA== dependencies: - vega-format "^1.0.4" - vega-loader "^4.3.2" - vega-util "^1.16.1" + vega-format "^1.1.1" + vega-loader "^4.5.1" + vega-util "^1.17.1" -vega-encode@~4.9.0: - version "4.9.0" - resolved "https://registry.yarnpkg.com/vega-encode/-/vega-encode-4.9.0.tgz#3dd1031056bb8029f262afc4b4d58372c8f073a6" - integrity sha512-etv2BHuCn9bzEc0cxyA2TnbtcAFQGVFmsaqmB4sgBCaqTSEfXMoX68LK3yxBrsdm5LU+y3otJVoewi3qWYCx2g== +vega-encode@~4.9.1: + version "4.9.1" + resolved "https://registry.yarnpkg.com/vega-encode/-/vega-encode-4.9.1.tgz#bad0e99bebec86d42184bcb898576c8accd91e89" + integrity sha512-05JB47UZaqIBS9t6rtHI/aKjEuH4EsSIH+wJWItht4BFj33eIl4XRNtlXdE31uuQT2pXWz5ZWW3KboMuaFzKLw== dependencies: - d3-array "^3.1.1" + d3-array "^3.2.2" d3-interpolate "^3.0.1" - vega-dataflow "^5.7.3" - vega-scale "^7.0.3" - vega-util "^1.15.2" + vega-dataflow "^5.7.5" + vega-scale "^7.3.0" + vega-util "^1.17.1" -vega-event-selector@^3.0.0, vega-event-selector@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/vega-event-selector/-/vega-event-selector-3.0.0.tgz#7b855ac0c3ddb59bc5b5caa0d96dbbc9fbd33a4c" - integrity sha512-Gls93/+7tEJGE3kUuUnxrBIxtvaNeF01VIFB2Q2Of2hBIBvtHX74jcAdDtkh5UhhoYGD8Q1J30P5cqEBEwtPoQ== +vega-event-selector@^3.0.1, vega-event-selector@~3.0.0, vega-event-selector@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/vega-event-selector/-/vega-event-selector-3.0.1.tgz#b99e92147b338158f8079d81b28b2e7199c2e259" + integrity sha512-K5zd7s5tjr1LiOOkjGpcVls8GsH/f2CWCrWcpKy74gTCp+llCdwz0Enqo013ZlGaRNjfgD/o1caJRt3GSaec4A== -vega-expression@^5.0.0, vega-expression@~5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/vega-expression/-/vega-expression-5.0.0.tgz#938f26689693a1e0d26716030cdaed43ca7abdfb" - integrity sha512-y5+c2frq0tGwJ7vYXzZcfVcIRF/QGfhf2e+bV1Z0iQs+M2lI1II1GPDdmOcMKimpoCVp/D61KUJDIGE1DSmk2w== +vega-expression@^5.0.1, vega-expression@~5.0.0, vega-expression@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/vega-expression/-/vega-expression-5.0.1.tgz#e6a6eff564d2a93496a9bf34cbc78d8942f236a8" + integrity sha512-atfzrMekrcsuyUgZCMklI5ki8cV763aeo1Y6YrfYU7FBwcQEoFhIV/KAJ1vae51aPDGtfzvwbtVIo3WShFCP2Q== dependencies: - "@types/estree" "^0.0.50" - vega-util "^1.16.0" + "@types/estree" "^1.0.0" + vega-util "^1.17.1" -vega-force@~4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/vega-force/-/vega-force-4.1.0.tgz#cc8dea972baa52adc60840ff744ebb9e57d8f1f5" - integrity sha512-Sssf8iH48vYlz+E7/RpU+SUaJbuLoIL87U4tG2Av4gf/hRiImU49x2TI3EuhFWg1zpaCFxlz0CAaX++Oh/gjdw== +vega-force@~4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/vega-force/-/vega-force-4.1.1.tgz#27bffa96bda293f27d2a2492c2cbf99d49fec77e" + integrity sha512-T6fJAUz9zdXf2qj2Hz0VlmdtaY7eZfcKNazhUV8hza4R3F9ug6r/hSrdovfc9ExmbUjL5iyvDUsf63r8K3/wVQ== dependencies: d3-force "^3.0.0" - vega-dataflow "^5.7.3" - vega-util "^1.15.2" + vega-dataflow "^5.7.5" + vega-util "^1.17.1" -vega-format@^1.0.4, vega-format@^1.1.0, vega-format@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vega-format/-/vega-format-1.1.0.tgz#b9d81cf1bcf222ae5cbd94357ae70245d2c7b18d" - integrity sha512-6mgpeWw8yGdG0Zdi8aVkx5oUrpJGOpNxqazC2858RSDPvChM/jDFlgRMTYw52qk7cxU0L08ARp4BwmXaI75j0w== +vega-format@^1.1.1, vega-format@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/vega-format/-/vega-format-1.1.1.tgz#92e4876e18064e7ad54f39045f7b24dede0030b8" + integrity sha512-Rll7YgpYbsgaAa54AmtEWrxaJqgOh5fXlvM2wewO4trb9vwM53KBv4Q/uBWCLK3LLGeBXIF6gjDt2LFuJAUtkQ== dependencies: - d3-array "^3.1.1" + d3-array "^3.2.2" d3-format "^3.1.0" d3-time-format "^4.1.0" - vega-time "^2.0.3" - vega-util "^1.15.2" - -vega-functions@^5.12.1, vega-functions@^5.13.0, vega-functions@~5.13.0: - version "5.13.0" - resolved "https://registry.yarnpkg.com/vega-functions/-/vega-functions-5.13.0.tgz#c9ab8c6eedbf39f75b424cca6776b1d0b8c74b32" - integrity sha512-Mf53zNyx+c9fFqagEI0T8zc9nMlx0zozOngr8oOpG1tZDKOgwOnUgN99zQKbLHjyv+UzWrq3LYTnSLyVe0ZmhQ== - dependencies: - d3-array "^3.1.1" - d3-color "^3.0.1" - d3-geo "^3.0.1" - vega-dataflow "^5.7.3" - vega-expression "^5.0.0" - vega-scale "^7.2.0" - vega-scenegraph "^4.9.3" - vega-selections "^5.3.1" - vega-statistics "^1.7.9" - vega-time "^2.1.0" - vega-util "^1.16.0" - -vega-geo@~4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/vega-geo/-/vega-geo-4.4.0.tgz#ce792df57f8ca4c54a7a1a29467cfa24bc53f573" - integrity sha512-3YX41y+J5pu0PMjvBCASg0/lgvu9+QXWJZ+vl6FFKa8AlsIopQ67ZL7ObwqjZcoZMolJ4q0rc+ZO8aj1pXCYcw== - dependencies: - d3-array "^3.1.1" - d3-color "^3.0.1" - d3-geo "^3.0.1" - vega-canvas "^1.2.5" - vega-dataflow "^5.7.3" - vega-projection "^1.4.5" - vega-statistics "^1.7.9" - vega-util "^1.15.2" - -vega-hierarchy@~4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/vega-hierarchy/-/vega-hierarchy-4.1.0.tgz#605edbe3a6232853f9e8b57e3b905471d33b1a48" - integrity sha512-DWBK39IEt4FiQru12twzKSFUvFFZ7KtlH9+lAaqrJnKuIZFCyQ1XOUfKScfbKIlk4KS+DuCTNLI/pxC/f7Sk9Q== + vega-time "^2.1.1" + vega-util "^1.17.1" + +vega-functions@^5.13.1, vega-functions@~5.13.1: + version "5.13.1" + resolved "https://registry.yarnpkg.com/vega-functions/-/vega-functions-5.13.1.tgz#504d672924495fe3ea844e6940c7f6e151cde151" + integrity sha512-0LhntimnvBl4VzRO/nkCwCTbtaP8bE552galKQbCg88GDxdmcmlsoTCwUzG0vZ/qmNM3IbqnP5k5/um3zwFqLw== + dependencies: + d3-array "^3.2.2" + d3-color "^3.1.0" + d3-geo "^3.1.0" + vega-dataflow "^5.7.5" + vega-expression "^5.0.1" + vega-scale "^7.3.0" + vega-scenegraph "^4.10.2" + vega-selections "^5.4.1" + vega-statistics "^1.8.1" + vega-time "^2.1.1" + vega-util "^1.17.1" + +vega-geo@~4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/vega-geo/-/vega-geo-4.4.1.tgz#3850232bf28c98fab5e26c5fb401acb6fb37b5e5" + integrity sha512-s4WeZAL5M3ZUV27/eqSD3v0FyJz3PlP31XNSLFy4AJXHxHUeXT3qLiDHoVQnW5Om+uBCPDtTT1ROx1smGIf2aA== + dependencies: + d3-array "^3.2.2" + d3-color "^3.1.0" + d3-geo "^3.1.0" + vega-canvas "^1.2.7" + vega-dataflow "^5.7.5" + vega-projection "^1.6.0" + vega-statistics "^1.8.1" + vega-util "^1.17.1" + +vega-hierarchy@~4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/vega-hierarchy/-/vega-hierarchy-4.1.1.tgz#897974a477dfa70cc0d4efab9465b6cc79a9071f" + integrity sha512-h5mbrDtPKHBBQ9TYbvEb/bCqmGTlUX97+4CENkyH21tJs7naza319B15KRK0NWOHuhbGhFmF8T0696tg+2c8XQ== dependencies: - d3-hierarchy "^3.1.0" - vega-dataflow "^5.7.3" - vega-util "^1.15.2" + d3-hierarchy "^3.1.2" + vega-dataflow "^5.7.5" + vega-util "^1.17.1" "vega-interpreter@npm:@amoo-miki/vega-forced-csp-compliant-interpreter@1.0.6": version "1.0.6" resolved "https://registry.yarnpkg.com/@amoo-miki/vega-forced-csp-compliant-interpreter/-/vega-forced-csp-compliant-interpreter-1.0.6.tgz#5cffdf12b7fe12dc936194edd9e8519506c38716" integrity sha512-9S5nTTVd8JVKobcWp5iwirIeePiamwH1J9uSZPuG5kcF0TUBvGu++ERKjNdst5Qck7e4R6/7vjx2wVf58XUarg== -vega-label@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/vega-label/-/vega-label-1.2.0.tgz#bcb2659aec54f890f9debab3e41ab87a58292dce" - integrity sha512-1prOqkCAfXaUvMqavbGI0nbYGqV8UQR9qvuVwrPJ6Yxm3GIUIOA/JRqNY8eZR8USwMP/kzsqlfVEixj9+Y75VQ== +vega-label@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/vega-label/-/vega-label-1.2.1.tgz#ea45fa5a407991c44edfea9c4ca40874d544a3db" + integrity sha512-n/ackJ5lc0Xs9PInCaGumYn2awomPjJ87EMVT47xNgk2bHmJoZV1Ve/1PUM6Eh/KauY211wPMrNp/9Im+7Ripg== dependencies: vega-canvas "^1.2.6" vega-dataflow "^5.7.3" @@ -17663,219 +17704,221 @@ vega-lite@^5.6.0: vega-util "~1.17.0" yargs "~17.6.0" -vega-loader@^4.3.2, vega-loader@^4.4.0, vega-loader@~4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/vega-loader/-/vega-loader-4.5.0.tgz#b15acc4c8f84191f500e94d35ddfb9721ac943ad" - integrity sha512-EkAyzbx0pCYxH3v3wghGVCaKINWxHfgbQ2pYDiYv0yo8e04S8Mv/IlRGTt6BAe7cLhrk1WZ4zh20QOppnGG05w== +vega-loader@^4.5.1, vega-loader@~4.5.1: + version "4.5.1" + resolved "https://registry.yarnpkg.com/vega-loader/-/vega-loader-4.5.1.tgz#b85262b3cb8376487db0c014a8a13c3a5e6d52ad" + integrity sha512-qy5x32SaT0YkEujQM2yKqvLGV9XWQ2aEDSugBFTdYzu/1u4bxdUSRDREOlrJ9Km3RWIOgFiCkobPmFxo47SKuA== dependencies: d3-dsv "^3.0.1" node-fetch "^2.6.7" topojson-client "^3.1.0" - vega-format "^1.1.0" - vega-util "^1.16.0" + vega-format "^1.1.1" + vega-util "^1.17.1" -vega-parser@~6.1.4: - version "6.1.4" - resolved "https://registry.yarnpkg.com/vega-parser/-/vega-parser-6.1.4.tgz#4868e41af2c9645b6d7daeeb205cfad06b9d465c" - integrity sha512-tORdpWXiH/kkXcpNdbSVEvtaxBuuDtgYp9rBunVW9oLsjFvFXbSWlM1wvJ9ZFSaTfx6CqyTyGMiJemmr1QnTjQ== +vega-parser@~6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/vega-parser/-/vega-parser-6.2.0.tgz#c982aff0a6409486cbbe743a5799412b8b897654" + integrity sha512-as+QnX8Qxe9q51L1C2sVBd+YYYctP848+zEvkBT2jlI2g30aZ6Uv7sKsq7QTL6DUbhXQKR0XQtzlanckSFdaOQ== dependencies: - vega-dataflow "^5.7.3" - vega-event-selector "^3.0.0" - vega-functions "^5.12.1" - vega-scale "^7.1.1" - vega-util "^1.16.0" + vega-dataflow "^5.7.5" + vega-event-selector "^3.0.1" + vega-functions "^5.13.1" + vega-scale "^7.3.0" + vega-util "^1.17.1" -vega-projection@^1.4.5, vega-projection@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/vega-projection/-/vega-projection-1.5.0.tgz#51c5f0455170cd35b3c5f3e653e99c3616520640" - integrity sha512-aob7qojh555x3hQWZ/tr8cIJNSWQbm6EoWTJaheZgFOY2x3cDa4Qrg3RJbGw6KwVj/IQk2p40paRzixKZ2kr+A== +vega-projection@^1.6.0, vega-projection@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/vega-projection/-/vega-projection-1.6.0.tgz#921acd3220e7d9d04ccd5ce0109433afb3236966" + integrity sha512-LGUaO/kpOEYuTlul+x+lBzyuL9qmMwP1yShdUWYLW+zXoeyGbs5OZW+NbPPwLYqJr5lpXDr/vGztFuA/6g2xvQ== dependencies: - d3-geo "^3.0.1" + d3-geo "^3.1.0" d3-geo-projection "^4.0.0" + vega-scale "^7.3.0" -vega-regression@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vega-regression/-/vega-regression-1.1.0.tgz#b4394db403ada93de52bb4536d04be336c983a8c" - integrity sha512-09K0RemY6cdaXBAyakDUNFfEkRcLkGjkDJyWQPAUqGK59hV2J+G3i4uxkZp18Vu0t8oqU7CgzwWim1s5uEpOcA== +vega-regression@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/vega-regression/-/vega-regression-1.1.1.tgz#b53a964152a2fec4847e31571f522bfda23089af" + integrity sha512-98i/z0vdDhOIEhJUdYoJ2nlfVdaHVp2CKB39Qa7G/XyRw0+QwDFFrp8ZRec2xHjHfb6bYLGNeh1pOsC13FelJg== dependencies: - d3-array "^3.1.1" + d3-array "^3.2.2" vega-dataflow "^5.7.3" vega-statistics "^1.7.9" vega-util "^1.15.2" -vega-runtime@^6.1.3, vega-runtime@~6.1.3: - version "6.1.3" - resolved "https://registry.yarnpkg.com/vega-runtime/-/vega-runtime-6.1.3.tgz#01e18246f7a80cee034a96017ac30113b92c4034" - integrity sha512-gE+sO2IfxMUpV0RkFeQVnHdmPy3K7LjHakISZgUGsDI/ZFs9y+HhBf8KTGSL5pcZPtQsZh3GBQ0UonqL1mp9PA== +vega-runtime@^6.1.4, vega-runtime@~6.1.4: + version "6.1.4" + resolved "https://registry.yarnpkg.com/vega-runtime/-/vega-runtime-6.1.4.tgz#98b67160cea9554e690bfd44719f9d17f90c4220" + integrity sha512-0dDYXyFLQcxPQ2OQU0WuBVYLRZnm+/CwVu6i6N4idS7R9VXIX5581EkCh3pZ20pQ/+oaA7oJ0pR9rJgJ6rukRQ== dependencies: - vega-dataflow "^5.7.3" - vega-util "^1.15.2" + vega-dataflow "^5.7.5" + vega-util "^1.17.1" -vega-scale@^7.0.3, vega-scale@^7.1.1, vega-scale@^7.2.0, vega-scale@~7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/vega-scale/-/vega-scale-7.2.0.tgz#9e298cc02ad340498cb56847436b19439911f0fc" - integrity sha512-QYltO/otrZHLrCGGf06Y99XtPtqWXITr6rw7rO9oL+l3d9o5RFl9sjHrVxiM7v+vGoZVWbBd5IPbFhPsXZ6+TA== +vega-scale@^7.3.0, vega-scale@~7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/vega-scale/-/vega-scale-7.3.0.tgz#02b83435a892c6d91a87ee7d3d350fac987f464b" + integrity sha512-pMOAI2h+e1z7lsqKG+gMfR6NKN2sTcyjZbdJwntooW0uFHwjLGjMSY7kSd3nSEquF0HQ8qF7zR6gs1eRwlGimw== dependencies: - d3-array "^3.1.1" + d3-array "^3.2.2" d3-interpolate "^3.0.1" d3-scale "^4.0.2" - vega-time "^2.1.0" - vega-util "^1.17.0" + vega-time "^2.1.1" + vega-util "^1.17.1" -vega-scenegraph@^4.10.0, vega-scenegraph@^4.9.2, vega-scenegraph@^4.9.3, vega-scenegraph@~4.10.1: - version "4.10.1" - resolved "https://registry.yarnpkg.com/vega-scenegraph/-/vega-scenegraph-4.10.1.tgz#944da67b8a28758fab2e1306259fb7ff6be89f6b" - integrity sha512-takIpkmNxYHhJYALOYzhTin3EDzbys6U4g+l1yJZVlXG9YTdiCMuEVAdtaQOCqF9/7qytD6pCrMxJY2HaoN0qQ== - dependencies: - d3-path "^3.0.1" - d3-shape "^3.1.0" - vega-canvas "^1.2.5" - vega-loader "^4.4.0" - vega-scale "^7.2.0" - vega-util "^1.15.2" +vega-scenegraph@^4.10.2, vega-scenegraph@^4.9.2, vega-scenegraph@~4.10.2: + version "4.10.2" + resolved "https://registry.yarnpkg.com/vega-scenegraph/-/vega-scenegraph-4.10.2.tgz#3ae9ad8e99bbf75e2a4f3ebf2c1f9dee7562d245" + integrity sha512-R8m6voDZO5+etwNMcXf45afVM3XAtokMqxuDyddRl9l1YqSJfS+3u8hpolJ50c2q6ZN20BQiJwKT1o0bB7vKkA== + dependencies: + d3-path "^3.1.0" + d3-shape "^3.2.0" + vega-canvas "^1.2.7" + vega-loader "^4.5.1" + vega-scale "^7.3.0" + vega-util "^1.17.1" vega-schema-url-parser@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/vega-schema-url-parser/-/vega-schema-url-parser-2.2.0.tgz#a0d1e02915adfbfcb1fd517c8c2ebe2419985c1e" integrity sha512-yAtdBnfYOhECv9YC70H2gEiqfIbVkq09aaE4y/9V/ovEFmH9gPKaEgzIZqgT7PSPQjKhsNkb6jk6XvSoboxOBw== -vega-selections@^5.3.1: - version "5.4.0" - resolved "https://registry.yarnpkg.com/vega-selections/-/vega-selections-5.4.0.tgz#c2783897421fa39b674c015fa8f15a0023b8054e" - integrity sha512-Un3JdLDPjIpF9Dh4sw6m1c/QAcfam6m1YXHJ9vJxE/GdJ+sOrPxc7bcEU8VhOmTUN7IQUn4/1ry4JqqOVMbEhw== +vega-selections@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/vega-selections/-/vega-selections-5.4.1.tgz#3233acb920703bfc323df8b960aa52e55ac08c70" + integrity sha512-EtYc4DvA+wXqBg9tq+kDomSoVUPCmQfS7hUxy2qskXEed79YTimt3Hcl1e1fW226I4AVDBEqTTKebmKMzbSgAA== dependencies: - d3-array "3.1.1" - vega-expression "^5.0.0" - vega-util "^1.16.0" + d3-array "3.2.2" + vega-expression "^5.0.1" + vega-util "^1.17.1" vega-spec-injector@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/vega-spec-injector/-/vega-spec-injector-0.0.2.tgz#f1d990109dd9d845c524738f818baa4b72a60ca6" integrity sha512-wOMMqmpssn0/ZFPW7wl1v26vbseRX7zHPWzEyS9TwNXTRCu1TcjIBIR+X23lCWocxhoBqFxmqyn8UowMhlGtAg== -vega-statistics@^1.7.9, vega-statistics@^1.8.0, vega-statistics@~1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/vega-statistics/-/vega-statistics-1.8.0.tgz#ad66f7461473d58bc96671588981a059ffd60b59" - integrity sha512-dl+LCRS6qS4jWDme/NEdPVt5r649uB4IK6Kyr2/czmGA5JqjuFmtQ9lHQOnRu8945XLkqLf+JIQQo7vnw+nslA== - dependencies: - d3-array "^3.1.1" - -vega-time@^2.0.3, vega-time@^2.1.0, vega-time@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/vega-time/-/vega-time-2.1.0.tgz#acfbab88d7798b87ff63913b0dce2ca5eb0d46ca" - integrity sha512-Q9/l3S6Br1RPX5HZvyLD/cQ4K6K8DtpR09/1y7D66gxNorg2+HGzYZINH9nUvN3mxoXcBWg4cCUh3+JvmkDaEg== - dependencies: - d3-array "^3.1.1" - d3-time "^3.0.0" - vega-util "^1.15.2" - -vega-tooltip@^0.24.2: - version "0.24.2" - resolved "https://registry.yarnpkg.com/vega-tooltip/-/vega-tooltip-0.24.2.tgz#da55a171a96ea48a8ff135a728622e1cbb1152af" - integrity sha512-b7IeYQl/piNVsMmTliOgTnwSOhBs67KqoZ9UzP1I3XpH7TKbSuc3YHA7b1CSxkRR0hHKdradby4UI8c9rdH74w== - dependencies: - vega-util "^1.15.2" - -vega-transforms@~4.10.0: - version "4.10.0" - resolved "https://registry.yarnpkg.com/vega-transforms/-/vega-transforms-4.10.0.tgz#a1017ede13cf4e25499f588610a3be4da615d82d" - integrity sha512-Yk6ByzVq5F2niFfPlSsrU5wi+NZhsF7IBpJCcTfms4U7eoyNepUXagdFEJ3VWBD/Lit6GorLXFgO17NYcyS5gg== +vega-statistics@^1.7.9, vega-statistics@^1.8.1, vega-statistics@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/vega-statistics/-/vega-statistics-1.8.1.tgz#596fc3713ac68cc649bf28d0faf7def5ef34fef6" + integrity sha512-eRR3LZBusnTXUkc/uunAvWi1PjCJK+Ba4vFvEISc5Iv5xF4Aw2cBhEz1obEt6ID5fGVCTAl0E1LOSFxubS89hQ== dependencies: - d3-array "^3.1.1" - vega-dataflow "^5.7.4" - vega-statistics "^1.8.0" - vega-time "^2.1.0" - vega-util "^1.16.1" + d3-array "^3.2.2" -vega-typings@~0.22.0: - version "0.22.2" - resolved "https://registry.yarnpkg.com/vega-typings/-/vega-typings-0.22.2.tgz#c5f5037680778664f5246c19a56e4cfffeb0d90b" - integrity sha512-op4bNiyS150V7gnuIdjwFYB1belYB8qnapqLQQ+ZBJQ+r7a+IbvXphEUf8AkBlOoGPN1ITNdhlIsq9WWiuxu8Q== +vega-time@^2.1.1, vega-time@~2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/vega-time/-/vega-time-2.1.1.tgz#0f1fb4e220dd5ed57401b58fb2293241f049ada0" + integrity sha512-z1qbgyX0Af2kQSGFbApwBbX2meenGvsoX8Nga8uyWN8VIbiySo/xqizz1KrP6NbB6R+x5egKmkjdnyNThPeEWA== dependencies: - vega-event-selector "^3.0.0" - vega-expression "^5.0.0" - vega-util "^1.15.2" - -vega-util@^1.15.2, vega-util@^1.16.0, vega-util@^1.16.1, vega-util@^1.17.0, vega-util@~1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/vega-util/-/vega-util-1.17.0.tgz#b72ae0baa97f943bf591f8f5bb27ceadf06834ac" - integrity sha512-HTaydZd9De3yf+8jH66zL4dXJ1d1p5OIFyoBzFiOli4IJbwkL1jrefCKz6AHDm1kYBzDJ0X4bN+CzZSCTvNk1w== + d3-array "^3.2.2" + d3-time "^3.1.0" + vega-util "^1.17.1" -vega-view-transforms@~4.5.8: - version "4.5.8" - resolved "https://registry.yarnpkg.com/vega-view-transforms/-/vega-view-transforms-4.5.8.tgz#c8dc42c3c7d4aa725d40b8775180c9f23bc98f4e" - integrity sha512-966m7zbzvItBL8rwmF2nKG14rBp7q+3sLCKWeMSUrxoG+M15Smg5gWEGgwTG3A/RwzrZ7rDX5M1sRaAngRH25g== +vega-tooltip@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/vega-tooltip/-/vega-tooltip-0.30.0.tgz#b8a48a0d1be717b7410cf75021aaaff75818b212" + integrity sha512-dBuqp1HgNvxrc3MU4KAE3gU7AiD0AvCiyu7IMwubI6TQa0l9A5c+B+ZLjDZP2Ool0J9eAaGgVhqjXWaUjUAfAQ== dependencies: - vega-dataflow "^5.7.3" - vega-scenegraph "^4.9.2" - vega-util "^1.15.2" + vega-util "^1.17.0" -vega-view@~5.11.0: - version "5.11.0" - resolved "https://registry.yarnpkg.com/vega-view/-/vega-view-5.11.0.tgz#8a7b29a36776e43cc6599e087ed7f48a918b805d" - integrity sha512-MI9NTRFmtFX6ADk6KOHhi8bhHjC9pPm42Bj2+74c6l1d3NQZf9Jv7lkiGqKohdkQDNH9LPwz/6slhKwPU9JdkQ== - dependencies: - d3-array "^3.1.1" +vega-transforms@~4.10.1: + version "4.10.1" + resolved "https://registry.yarnpkg.com/vega-transforms/-/vega-transforms-4.10.1.tgz#5e51f4f3a745d43609e0d8ba1d74a7e53014030a" + integrity sha512-0uWrUZaYl8kjWrGbvPOQSKk6kcNXQFY9moME+bUmkADAvFptphCGbaEIn/nSsG6uCxj8E3rqKmKfjSWdU5yOqA== + dependencies: + d3-array "^3.2.2" + vega-dataflow "^5.7.5" + vega-statistics "^1.8.1" + vega-time "^2.1.1" + vega-util "^1.17.1" + +vega-typings@~0.23.0: + version "0.23.0" + resolved "https://registry.yarnpkg.com/vega-typings/-/vega-typings-0.23.0.tgz#5b001f5b51a477e67d2446ef9b964e1dac48a20e" + integrity sha512-10ZRRGoUZoQLS5jMiIFhSZMDc3UkPhDP2VMUN/oHZXElvPCGjfjvgmiC6XzvvN4sRXdccMcZX1lZPoyYPERVkA== + dependencies: + "@types/geojson" "^7946.0.10" + vega-event-selector "^3.0.1" + vega-expression "^5.0.1" + vega-util "^1.17.1" + +vega-util@^1.15.2, vega-util@^1.17.0, vega-util@^1.17.1, vega-util@~1.17.0, vega-util@~1.17.1: + version "1.17.1" + resolved "https://registry.yarnpkg.com/vega-util/-/vega-util-1.17.1.tgz#717865fc6b660ceb3ae16273d21166ed471c2db4" + integrity sha512-ToPkWoBdP6awoK+bnYaFhgdqZhsNwKxWbuMnFell+4K/Cb6Q1st5Pi9I7iI5Y6n5ZICDDsd6eL7/IhBjEg1NUQ== + +vega-view-transforms@~4.5.9: + version "4.5.9" + resolved "https://registry.yarnpkg.com/vega-view-transforms/-/vega-view-transforms-4.5.9.tgz#5f109555c08ee9ac23ff9183d578eb9cbac6fe61" + integrity sha512-NxEq4ZD4QwWGRrl2yDLnBRXM9FgCI+vvYb3ZC2+nVDtkUxOlEIKZsMMw31op5GZpfClWLbjCT3mVvzO2xaTF+g== + dependencies: + vega-dataflow "^5.7.5" + vega-scenegraph "^4.10.2" + vega-util "^1.17.1" + +vega-view@~5.11.1: + version "5.11.1" + resolved "https://registry.yarnpkg.com/vega-view/-/vega-view-5.11.1.tgz#a703d7d6344489c6a6e9e9d9c7a732519bf4432c" + integrity sha512-RoWxuoEMI7xVQJhPqNeLEHCezudsf3QkVMhH5tCovBqwBADQGqq9iWyax3ZzdyX1+P3eBgm7cnLvpqtN2hU8kA== + dependencies: + d3-array "^3.2.2" d3-timer "^3.0.1" - vega-dataflow "^5.7.3" - vega-format "^1.1.0" - vega-functions "^5.13.0" - vega-runtime "^6.1.3" - vega-scenegraph "^4.10.0" - vega-util "^1.16.1" - -vega-voronoi@~4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/vega-voronoi/-/vega-voronoi-4.2.0.tgz#14c74c84f52d9a16be2facd1bede879d32d988f2" - integrity sha512-1iuNAVZgUHRlBpdq4gSga3KlQmrgFfwy+KpyDgPLQ8HbLkhcVeT7RDh2L6naluqD7Op0xVLms3clR920WsYryQ== + vega-dataflow "^5.7.5" + vega-format "^1.1.1" + vega-functions "^5.13.1" + vega-runtime "^6.1.4" + vega-scenegraph "^4.10.2" + vega-util "^1.17.1" + +vega-voronoi@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/vega-voronoi/-/vega-voronoi-4.2.1.tgz#521a22d3d4c545fe1d5eea19eac0fd3ac5e58b1b" + integrity sha512-zzi+fxU/SBad4irdLLsG3yhZgXWZezraGYVQfZFWe8kl7W/EHUk+Eqk/eetn4bDeJ6ltQskX+UXH3OP5Vh0Q0Q== dependencies: d3-delaunay "^6.0.2" - vega-dataflow "^5.7.3" - vega-util "^1.15.2" + vega-dataflow "^5.7.5" + vega-util "^1.17.1" -vega-wordcloud@~4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/vega-wordcloud/-/vega-wordcloud-4.1.3.tgz#ce90900333f4e0d3ee706ba4f36bb0905f8b4a9f" - integrity sha512-is4zYn9FMAyp9T4SAcz2P/U/wqc0Lx3P5YtpWKCbOH02a05vHjUQrQ2TTPOuvmMfAEDCSKvbMSQIJMOE018lJA== - dependencies: - vega-canvas "^1.2.5" - vega-dataflow "^5.7.3" - vega-scale "^7.1.1" - vega-statistics "^1.7.9" - vega-util "^1.15.2" - -vega@^5.17.3: - version "5.22.1" - resolved "https://registry.yarnpkg.com/vega/-/vega-5.22.1.tgz#e028f3645de18e0070317bc04410282975549e1e" - integrity sha512-KJBI7OWSzpfCPbmWl3GQCqBqbf2TIdpWS0mzO6MmWbvdMhWHf74P9IVnx1B1mhg0ZTqWFualx9ZYhWzMMwudaQ== - dependencies: - vega-crossfilter "~4.1.0" - vega-dataflow "~5.7.4" - vega-encode "~4.9.0" - vega-event-selector "~3.0.0" - vega-expression "~5.0.0" - vega-force "~4.1.0" - vega-format "~1.1.0" - vega-functions "~5.13.0" - vega-geo "~4.4.0" - vega-hierarchy "~4.1.0" - vega-label "~1.2.0" - vega-loader "~4.5.0" - vega-parser "~6.1.4" - vega-projection "~1.5.0" - vega-regression "~1.1.0" - vega-runtime "~6.1.3" - vega-scale "~7.2.0" - vega-scenegraph "~4.10.1" - vega-statistics "~1.8.0" - vega-time "~2.1.0" - vega-transforms "~4.10.0" - vega-typings "~0.22.0" - vega-util "~1.17.0" - vega-view "~5.11.0" - vega-view-transforms "~4.5.8" - vega-voronoi "~4.2.0" - vega-wordcloud "~4.1.3" +vega-wordcloud@~4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/vega-wordcloud/-/vega-wordcloud-4.1.4.tgz#38584cf47ef52325d6a8dc38908b5d2378cc6e62" + integrity sha512-oeZLlnjiusLAU5vhk0IIdT5QEiJE0x6cYoGNq1th+EbwgQp153t4r026fcib9oq15glHFOzf81a8hHXHSJm1Jw== + dependencies: + vega-canvas "^1.2.7" + vega-dataflow "^5.7.5" + vega-scale "^7.3.0" + vega-statistics "^1.8.1" + vega-util "^1.17.1" + +vega@^5.23.0: + version "5.23.0" + resolved "https://registry.yarnpkg.com/vega/-/vega-5.23.0.tgz#7e3899b65f1a84095545b74dcf71289890844c49" + integrity sha512-FjgDD/VmL9yl36ByLq66mEusDF/wZGRktK4JA5MkF68hQqj3F8BFMDDVNwCASuwY97H6wr7kw/RFqNI6XocjJQ== + dependencies: + vega-crossfilter "~4.1.1" + vega-dataflow "~5.7.5" + vega-encode "~4.9.1" + vega-event-selector "~3.0.1" + vega-expression "~5.0.1" + vega-force "~4.1.1" + vega-format "~1.1.1" + vega-functions "~5.13.1" + vega-geo "~4.4.1" + vega-hierarchy "~4.1.1" + vega-label "~1.2.1" + vega-loader "~4.5.1" + vega-parser "~6.2.0" + vega-projection "~1.6.0" + vega-regression "~1.1.1" + vega-runtime "~6.1.4" + vega-scale "~7.3.0" + vega-scenegraph "~4.10.2" + vega-statistics "~1.8.1" + vega-time "~2.1.1" + vega-transforms "~4.10.1" + vega-typings "~0.23.0" + vega-util "~1.17.1" + vega-view "~5.11.1" + vega-view-transforms "~4.5.9" + vega-voronoi "~4.2.1" + vega-wordcloud "~4.1.4" vfile-location@^2.0.0: version "2.0.6"