diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..06939361 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,6 @@ +# Ignore list +/* + +# Do not ignore these folders: +!__tests__/ +!src/ \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..b20b0add --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,50 @@ +// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update. +module.exports = { + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:eslint-plugin-jest/recommended', + 'eslint-config-prettier' + ], + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint', 'eslint-plugin-jest'], + rules: { + '@typescript-eslint/no-require-imports': 'error', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/ban-ts-comment': [ + 'error', + { + 'ts-ignore': 'allow-with-description' + } + ], + 'no-console': 'error', + 'yoda': 'error', + 'prefer-const': [ + 'error', + { + destructuring: 'all' + } + ], + 'no-control-regex': 'off', + 'no-constant-condition': ['error', {checkLoops: false}] + }, + overrides: [ + { + files: ['**/*{test,spec}.ts'], + rules: { + '@typescript-eslint/no-unused-vars': 'off', + 'jest/no-standalone-expect': 'off', + 'jest/no-conditional-expect': 'off', + 'no-console': 'off', + + } + } + ], + env: { + node: true, + es6: true, + 'jest/globals': true + } +}; diff --git a/.gitattributes b/.gitattributes index bff632db..535b415a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ +* text=auto eol=lf dist/index.js -diff -merge dist/index.js linguist-generated=true .licenses/** -diff linguist-generated=true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 65610319..ca56653d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1 @@ -* @actions/actions-service -* @actions/virtual-environments-owners +* @actions/setup-actions-team diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index ec4bb386..3ba13e0c 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1 @@ -blank_issues_enabled: false \ No newline at end of file +blank_issues_enabled: false diff --git a/.github/workflows/basic-validation.yml b/.github/workflows/basic-validation.yml new file mode 100644 index 00000000..e8c957ef --- /dev/null +++ b/.github/workflows/basic-validation.yml @@ -0,0 +1,17 @@ +name: Basic validation + +on: + push: + branches: + - main + - releases/* + paths-ignore: + - '**.md' + pull_request: + paths-ignore: + - '**.md' + +jobs: + call-basic-validation: + name: Basic validation + uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 9d665b38..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Build Action - -on: - push: - branches: - - main - - releases/* - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - uses: actions/checkout@v3 - - name: Setup Node.JS 16 - uses: actions/setup-node@v3 - with: - node-version: 16.x - cache: npm - - run: npm ci - - run: npm run build - - run: npm run format-check - - run: npm test \ No newline at end of file diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 6274fd28..c9522913 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -1,8 +1,3 @@ -# `dist/index.js` is a special file in Actions. -# When you reference an action with `uses:` in a workflow, -# `index.js` is the code that will run. -# For our project, we generate this file through a build process from other source files. -# We need to make sure the checked-in `index.js` actually matches what we expect it to be. name: Check dist/ on: @@ -17,36 +12,6 @@ on: workflow_dispatch: jobs: - check-dist: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Set Node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x - cache: npm - - - name: Install dependencies - run: npm ci - - - name: Rebuild the dist/ directory - run: npm run build - - - name: Compare the expected and actual dist/ directories - run: | - if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then - echo "Detected uncommitted changes after build. See status below:" - git diff - exit 1 - fi - id: diff - - # If index.js was different than expected, upload the expected version as an artifact - - uses: actions/upload-artifact@v3 - if: ${{ failure() && steps.diff.conclusion == 'failure' }} - with: - name: dist - path: dist/ + call-check-dist: + name: Check dist/ + uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..7a826123 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,14 @@ +name: CodeQL analysis + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: '0 3 * * 0' + +jobs: + call-codeQL-analysis: + name: CodeQL analysis + uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml index 74998dc0..e66e8040 100644 --- a/.github/workflows/e2e-cache.yml +++ b/.github/workflows/e2e-cache.yml @@ -1,4 +1,5 @@ name: Validate cache + on: push: branches: @@ -150,7 +151,6 @@ jobs: exit 1 fi - - name: Check files to cache on ubuntu-latest if: matrix.os == 'ubuntu-latest' run: | diff --git a/.github/workflows/e2e-local-file.yml b/.github/workflows/e2e-local-file.yml index 1361bb0f..39593945 100644 --- a/.github/workflows/e2e-local-file.yml +++ b/.github/workflows/e2e-local-file.yml @@ -1,4 +1,5 @@ name: Validate local file + on: push: branches: diff --git a/.github/workflows/e2e-publishing.yml b/.github/workflows/e2e-publishing.yml index cf179fc0..d092487e 100644 --- a/.github/workflows/e2e-publishing.yml +++ b/.github/workflows/e2e-publishing.yml @@ -1,4 +1,5 @@ name: Validate publishing functionality + on: push: branches: @@ -85,7 +86,7 @@ jobs: if ($content -notlike '*maven*') { throw "settings.xml file is not overwritten" } - + test-publishing-skip-overwrite: name: settings.xml is not overwritten if flag is false runs-on: ${{ matrix.os }} @@ -149,4 +150,4 @@ jobs: $path = Join-Path $env:RUNNER_TEMP "settings.xml" if (-not (Test-Path $path)) { throw "settings.xml file is not found in expected location" - } \ No newline at end of file + } diff --git a/.github/workflows/e2e-versions.yml b/.github/workflows/e2e-versions.yml index b0454f3e..7af524ef 100644 --- a/.github/workflows/e2e-versions.yml +++ b/.github/workflows/e2e-versions.yml @@ -1,4 +1,5 @@ name: Validate Java e2e + on: push: branches: @@ -10,7 +11,7 @@ on: paths-ignore: - '**.md' schedule: - - cron: '0 */12 * * *' + - cron: '0 */12 * * *' workflow_dispatch: jobs: setup-java-major-versions: @@ -20,11 +21,30 @@ jobs: fail-fast: false matrix: os: [macos-latest, windows-latest, ubuntu-latest] - distribution: ['temurin', 'adopt', 'adopt-openj9', 'zulu', 'liberica', 'microsoft', 'corretto' ] # internally 'adopt-hotspot' is the same as 'adopt' + distribution: [ + 'temurin', + 'adopt', + 'adopt-openj9', + 'zulu', + 'liberica', + 'microsoft', + 'semeru', + 'corretto' + ] # internally 'adopt-hotspot' is the same as 'adopt' version: ['8', '11', '16'] exclude: - - distribution: microsoft - version: 8 + - distribution: microsoft + version: 8 + include: + - distribution: oracle + os: macos-latest + version: 17 + - distribution: oracle + os: windows-latest + version: 19 + - distribution: oracle + os: ubuntu-latest + version: 19 steps: - name: Checkout uses: actions/checkout@v3 @@ -48,9 +68,13 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] distribution: ['temurin', 'zulu', 'liberica'] version: - - '11.0' - - '8.0.302' - - '16.0.2+7' + - '11.0' + - '8.0.302' + - '16.0.2+7' + include: + - distribution: oracle + os: ubuntu-latest + version: '19.0.1' steps: - name: Checkout uses: actions/checkout@v3 @@ -176,7 +200,7 @@ jobs: fail-fast: false matrix: os: [macos-latest, windows-latest, ubuntu-latest] - distribution: ['temurin', 'zulu', 'liberica'] + distribution: ['temurin', 'zulu', 'liberica', 'semeru'] java-package: ['jre'] version: ['17.0'] include: @@ -240,4 +264,99 @@ jobs: run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" shell: bash - # Only Microsoft provides AArch64. However, GitHub-hosted runners do not support this architecture. \ No newline at end of file + setup-java-version-both-version-inputs-presents: + name: ${{ matrix.distribution }} version (should be from input) - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + distribution: ['temurin', 'microsoft', 'corretto'] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Create .java-version file + shell: bash + run: echo "8" > .java-version + - name: setup-java + uses: ./ + id: setup-java + with: + distribution: ${{ matrix.distribution }} + java-version: 11 + java-version-file: '.java-version' + - name: Verify Java + run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}" + shell: bash + + setup-java-version-from-file-major-notation: + name: ${{ matrix.distribution }} version from file X - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + distribution: ['temurin', 'zulu', 'liberica', 'microsoft', 'corretto'] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Create .java-version file + shell: bash + run: echo "11" > .java-version + - name: setup-java + uses: ./ + id: setup-java + with: + distribution: ${{ matrix.distribution }} + java-version-file: '.java-version' + - name: Verify Java + run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}" + shell: bash + + setup-java-version-from-file-major-minor-patch-notation: + name: ${{ matrix.distribution }} version from file X.Y.Z - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + distribution: ['adopt', 'adopt-openj9', 'zulu'] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Create .java-version file + shell: bash + run: echo "11.0.2" > .java-version + - name: setup-java + uses: ./ + id: setup-java + with: + distribution: ${{ matrix.distribution }} + java-version-file: '.java-version' + - name: Verify Java + run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}" + shell: bash + + setup-java-version-from-file-major-minor-patch-with-dist: + name: ${{ matrix.distribution }} version from file 'openjdk64-11.0.2' - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + distribution: ['adopt', 'zulu', 'liberica'] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Create .java-version file + shell: bash + run: echo "openjdk64-11.0.2" > .java-version + - name: setup-java + uses: ./ + id: setup-java + with: + distribution: ${{ matrix.distribution }} + java-version-file: '.java-version' + - name: Verify Java + run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}" + shell: bash diff --git a/.github/workflows/licensed.yml b/.github/workflows/licensed.yml index fd707024..37f1560c 100644 --- a/.github/workflows/licensed.yml +++ b/.github/workflows/licensed.yml @@ -10,16 +10,6 @@ on: workflow_dispatch: jobs: - test: - runs-on: ubuntu-latest - name: Check licenses - steps: - - uses: actions/checkout@v3 - - run: npm ci - - name: Install licensed - run: | - cd $RUNNER_TEMP - curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.4.4/licensed-3.4.4-linux-x64.tar.gz - sudo tar -xzf licensed.tar.gz - sudo mv licensed /usr/local/bin/licensed - - run: licensed status + call-licensed: + name: Licensed + uses: actions/reusable-workflows/.github/workflows/licensed.yml@main diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml index b14c183b..e584e46f 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release-new-action-version.yml @@ -1,4 +1,5 @@ name: Release new action version + on: release: types: [released] @@ -20,9 +21,9 @@ jobs: name: releaseNewActionVersion runs-on: ubuntu-latest steps: - - name: Update the ${{ env.TAG_NAME }} tag - id: update-major-tag - uses: actions/publish-action@v0.1.0 - with: - source-tag: ${{ env.TAG_NAME }} - slack-webhook: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file + - name: Update the ${{ env.TAG_NAME }} tag + id: update-major-tag + uses: actions/publish-action@v0.2.2 + with: + source-tag: ${{ env.TAG_NAME }} + slack-webhook: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/update-config-files.yml b/.github/workflows/update-config-files.yml new file mode 100644 index 00000000..87af5004 --- /dev/null +++ b/.github/workflows/update-config-files.yml @@ -0,0 +1,11 @@ +name: Update configuration files + +on: + schedule: + - cron: '0 3 * * 0' + workflow_dispatch: + +jobs: + call-update-configuration-files: + name: Update configuration files + uses: actions/reusable-workflows/.github/workflows/update-config-files.yml@main diff --git a/.gitignore b/.gitignore index e6dc0cc5..77afd536 100644 --- a/.gitignore +++ b/.gitignore @@ -94,3 +94,6 @@ typings/ # DynamoDB Local files .dynamodb/ .vscode/ + +# IntelliJ / WebStorm +/.idea/ diff --git a/.licenses/npm/minimatch.dep.yml b/.licenses/npm/minimatch.dep.yml index 317e4bc8..869816f5 100644 --- a/.licenses/npm/minimatch.dep.yml +++ b/.licenses/npm/minimatch.dep.yml @@ -1,6 +1,6 @@ --- name: minimatch -version: 3.0.4 +version: 3.1.2 type: npm summary: a glob matcher in javascript homepage: https://github.com/isaacs/minimatch#readme diff --git a/.licenses/npm/semver-7.3.8.dep.yml b/.licenses/npm/semver-7.3.8.dep.yml new file mode 100644 index 00000000..609663b5 --- /dev/null +++ b/.licenses/npm/semver-7.3.8.dep.yml @@ -0,0 +1,26 @@ +--- +name: semver +version: 7.3.8 +type: npm +summary: The semantic version parser used by npm. +homepage: +license: isc +licenses: +- sources: LICENSE + text: | + The ISC License + + Copyright (c) Isaac Z. Schlueter and Contributors + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +notices: [] diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..a3c81cb0 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +# Ignore list +/* + +# Do not ignore these folders: +!__tests__/ +!.github/ +!src/ \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 00000000..468cdb1e --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,11 @@ +// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update. +module.exports = { + printWidth: 80, + tabWidth: 2, + useTabs: false, + semi: true, + singleQuote: true, + trailingComma: 'none', + bracketSpacing: false, + arrowParens: 'avoid' +}; diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index a2f723bf..00000000 --- a/.prettierrc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "printWidth": 100, - "tabWidth": 2, - "useTabs": false, - "semi": true, - "singleQuote": true, - "trailingComma": "none", - "bracketSpacing": true, - "arrowParens": "avoid", - "parser": "typescript" -} diff --git a/README.md b/README.md index 4c19157d..c174abe3 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,45 @@ # Setup Java -[![Main workflow](https://github.com/actions/setup-java/actions/workflows/workflow.yml/badge.svg)](https://github.com/actions/setup-java/actions/workflows/workflow.yml) +[![Basic validation](https://github.com/actions/setup-java/actions/workflows/basic-validation.yml/badge.svg?branch=main)](https://github.com/actions/setup-java/actions/workflows/basic-validation.yml) +[![Validate Java e2e](https://github.com/actions/setup-java/actions/workflows/e2e-versions.yml/badge.svg?branch=main)](https://github.com/actions/setup-java/actions/workflows/e2e-versions.yml) +[![Validate cache](https://github.com/actions/setup-java/actions/workflows/e2e-cache.yml/badge.svg?branch=main)](https://github.com/actions/setup-java/actions/workflows/e2e-cache.yml) The `setup-java` action provides the following functionality for GitHub Actions runners: -- Downloading and setting up a requested version of Java. See [Usage](#Usage) for a list of supported distributions -- Extracting and caching custom version of Java from a local file -- Configuring runner for publishing using Apache Maven -- Configuring runner for publishing using Gradle -- Configuring runner for using GPG private key -- Registering problem matchers for error output -- Caching dependencies managed by Apache Maven -- Caching dependencies managed by Gradle -- Caching dependencies managed by sbt -- [Maven Toolchains declaration](https://maven.apache.org/guides/mini/guide-using-toolchains.html) for specified JDK versions +- Downloading and setting up a requested version of Java. See [Usage](#Usage) for a list of supported distributions. +- Extracting and caching custom version of Java from a local file. +- Configuring runner for publishing using Apache Maven. +- Configuring runner for publishing using Gradle. +- Configuring runner for using GPG private key. +- Registering problem matchers for error output. +- Caching dependencies managed by Apache Maven. +- Caching dependencies managed by Gradle. +- Caching dependencies managed by sbt. +- [Maven Toolchains declaration](https://maven.apache.org/guides/mini/guide-using-toolchains.html) for specified JDK versions. This action allows you to work with Java and Scala projects. ## V2 vs V1 -- V2 supports custom distributions and provides support for Azul Zulu OpenJDK, Eclipse Temurin and AdoptOpenJDK out of the box. V1 supports only Azul Zulu OpenJDK -- V2 requires you to specify distribution along with the version. V1 defaults to Azul Zulu OpenJDK, only version input is required. Follow [the migration guide](docs/switching-to-v2.md) to switch from V1 to V2 +- V2 supports custom distributions and provides support for Azul Zulu OpenJDK, Eclipse Temurin and AdoptOpenJDK out of the box. V1 supports only Azul Zulu OpenJDK. +- V2 requires you to specify distribution along with the version. V1 defaults to Azul Zulu OpenJDK, only version input is required. Follow [the migration guide](docs/switching-to-v2.md) to switch from V1 to V2. ## Usage - - `java-version`: _(required)_ The Java version to set up. Takes a whole or [semver](#supported-version-syntax) Java version. + - `java-version`: The Java version that is going to be set up. Takes a whole or [semver](#supported-version-syntax) Java version. If not specified, the action will expect `java-version-file` input to be specified. + + - `java-version-file`: The path to the `.java-version` file. See more details in [about `.java-version` file](docs/advanced-usage.md#Java-version-file). - `distribution`: _(required)_ Java [distribution](#supported-distributions). - `java-package`: The packaging variant of the choosen distribution. Possible values: `jdk`, `jre`, `jdk+fx`, `jre+fx`. Default value: `jdk`. - - `architecture`: The target architecture of the package. Possible values: `x86`, `x64`, `armv7`, `aarch64`, `ppc64le`. Default value: `x64`. + - `architecture`: The target architecture of the package. Possible values: `x86`, `x64`, `armv7`, `aarch64`, `ppc64le`. Default value: Derived from the runner machine. - `jdkFile`: If a use-case requires a custom distribution setup-java uses the compressed JDK from the location pointed by this input and will take care of the installation and caching on the VM. - `check-latest`: Setting this option makes the action to check for the latest available version for the version spec. - - `cache`: Quick [setup caching](#caching-packages-dependencies) for the dependencies managed through one of the predifined package managers. It can be one of "maven", "gradle" or "sbt". + - `cache`: Quick [setup caching](#caching-packages-dependencies) for the dependencies managed through one of the predifined package managers. It can be one of "maven", "gradle" or "sbt". #### Maven options The action has a bunch of inputs to generate maven's [settings.xml](https://maven.apache.org/settings.html) on the fly and pass the values to Apache Maven GPG Plugin as well as Apache Maven Toolchains. See [advanced usage](docs/advanced-usage.md) for more. @@ -48,11 +52,11 @@ This action allows you to work with Java and Scala projects. - `server-password`: Environment variable name for password or token for authentication to the Apache Maven repository. Default is GITHUB_TOKEN. - - `settings-path`: Maven related setting to point to the diractory where the settings.xml file will be written. Default is ~/.m2. + - `settings-path`: Maven related setting to point to the directory where the settings.xml file will be written. Default is ~/.m2. - - `gpg-private-key`: GPG private key to import. Default is empty string.' + - `gpg-private-key`: GPG private key to import. Default is empty string. - - `gpg-passphrase`: description: 'Environment variable name for the GPG private key passphrase. Default is GPG_PASSPHRASE. + - `gpg-passphrase`: description: Environment variable name for the GPG private key passphrase. Default is GPG_PASSPHRASE. - `mvn-toolchain-id`: Name of Maven Toolchain ID if the default name of `${distribution}_${java-version}` is not wanted. @@ -99,10 +103,12 @@ Currently, the following distributions are supported: | `liberica` | Liberica JDK | [Link](https://bell-sw.com/) | [Link](https://bell-sw.com/liberica_eula/) | | `microsoft` | Microsoft Build of OpenJDK | [Link](https://www.microsoft.com/openjdk) | [Link](https://docs.microsoft.com/java/openjdk/faq) | `corretto` | Amazon Corretto Build of OpenJDK | [Link](https://aws.amazon.com/corretto/) | [Link](https://aws.amazon.com/corretto/faqs/) +| `semeru` | IBM Semeru Runtime Open Edition | [Link](https://developer.ibm.com/languages/java/semeru-runtimes/downloads/) | [Link](https://openjdk.java.net/legal/gplv2+ce.html) | +| `oracle` | Oracle JDK | [Link](https://www.oracle.com/java/technologies/downloads/) | [Link](https://java.com/freeuselicense) **NOTE:** The different distributors can provide discrepant list of available versions / supported configurations. Please refer to the official documentation to see the list of supported versions. -**NOTE:** AdoptOpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from `adopt` to `temurin` to keep receiving software and security updates. See more details in the [Good-bye AdoptOpenJDK post](https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/). +**NOTE:** AdoptOpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from `adopt` and `adopt-openj9`, to `temurin` and `semeru` respectively, to keep receiving software and security updates. See more details in the [Good-bye AdoptOpenJDK post](https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/). **NOTE:** For Azul Zulu OpenJDK architectures x64 and arm64 are mapped to x86 / arm with proper hw_bitness. @@ -160,7 +166,7 @@ In the basic examples above, the `check-latest` flag defaults to `false`. When s If `check-latest` is set to `true`, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, the latest version of Java will be downloaded. Set `check-latest` to `true` if you want the most up-to-date version of Java to always be used. Setting `check-latest` to `true` has performance implications as downloading versions of Java is slower than using cached versions. -For Java distributions that are not cached on Hosted images, `check-latest` always behaves as `true` and downloads Java on-flight. Check out [Hosted Tool Cache](docs/advanced-usage.md#Hosted-Tool-Cache) for more details about pre-cached Java versions. +For Java distributions that are not cached on Hosted images, `check-latest` always behaves as `true` and downloads Java on-flight. Check out [Hosted Tool Cache](docs/advanced-usage.md#Hosted-Tool-Cache) for more details about pre-cached Java versions. ```yaml @@ -220,6 +226,7 @@ In the example above multiple JDKs are installed for the same job. The result af - [Liberica](docs/advanced-usage.md#Liberica) - [Microsoft](docs/advanced-usage.md#Microsoft) - [Amazon Corretto](docs/advanced-usage.md#Amazon-Corretto) + - [Oracle](docs/advanced-usage.md#Oracle) - [Installing custom Java package type](docs/advanced-usage.md#Installing-custom-Java-package-type) - [Installing custom Java architecture](docs/advanced-usage.md#Installing-custom-Java-architecture) - [Installing custom Java distribution from local file](docs/advanced-usage.md#Installing-Java-from-local-file) diff --git a/__tests__/auth.test.ts b/__tests__/auth.test.ts index c5d2ffc3..06591da7 100644 --- a/__tests__/auth.test.ts +++ b/__tests__/auth.test.ts @@ -1,11 +1,11 @@ -import io = require('@actions/io'); -import fs = require('fs'); -import path = require('path'); +import * as io from '@actions/io'; import * as core from '@actions/core'; +import * as fs from 'fs'; +import * as path from 'path'; import os from 'os'; import * as auth from '../src/auth'; -import { M2_DIR, MVN_SETTINGS_FILE } from '../src/constants'; +import {M2_DIR, MVN_SETTINGS_FILE} from '../src/constants'; const m2Dir = path.join(__dirname, M2_DIR); const settingsFile = path.join(m2Dir, MVN_SETTINGS_FILE); @@ -42,7 +42,13 @@ describe('auth tests', () => { const altSettingsFile = path.join(altHome, MVN_SETTINGS_FILE); await io.rmRF(altHome); // ensure it doesn't already exist - await auth.createAuthenticationSettings(id, username, password, altHome, true); + await auth.createAuthenticationSettings( + id, + username, + password, + altHome, + true + ); expect(fs.existsSync(m2Dir)).toBe(false); expect(fs.existsSync(settingsFile)).toBe(false); @@ -61,11 +67,19 @@ describe('auth tests', () => { const username = 'UNAME'; const password = 'TOKEN'; - await auth.createAuthenticationSettings(id, username, password, m2Dir, true); + await auth.createAuthenticationSettings( + id, + username, + password, + m2Dir, + true + ); expect(fs.existsSync(m2Dir)).toBe(true); expect(fs.existsSync(settingsFile)).toBe(true); - expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual(auth.generate(id, username, password)); + expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual( + auth.generate(id, username, password) + ); }, 100000); it('creates settings.xml with additional configuration', async () => { @@ -74,7 +88,14 @@ describe('auth tests', () => { const password = 'TOKEN'; const gpgPassphrase = 'GPG'; - await auth.createAuthenticationSettings(id, username, password, m2Dir, true, gpgPassphrase); + await auth.createAuthenticationSettings( + id, + username, + password, + m2Dir, + true, + gpgPassphrase + ); expect(fs.existsSync(m2Dir)).toBe(true); expect(fs.existsSync(settingsFile)).toBe(true); @@ -88,16 +109,24 @@ describe('auth tests', () => { const username = 'USERNAME'; const password = 'PASSWORD'; - fs.mkdirSync(m2Dir, { recursive: true }); + fs.mkdirSync(m2Dir, {recursive: true}); fs.writeFileSync(settingsFile, 'FAKE FILE'); expect(fs.existsSync(m2Dir)).toBe(true); expect(fs.existsSync(settingsFile)).toBe(true); - await auth.createAuthenticationSettings(id, username, password, m2Dir, true); + await auth.createAuthenticationSettings( + id, + username, + password, + m2Dir, + true + ); expect(fs.existsSync(m2Dir)).toBe(true); expect(fs.existsSync(settingsFile)).toBe(true); - expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual(auth.generate(id, username, password)); + expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual( + auth.generate(id, username, password) + ); }, 100000); it('does not overwrite existing settings.xml files', async () => { @@ -105,12 +134,18 @@ describe('auth tests', () => { const username = 'USERNAME'; const password = 'PASSWORD'; - fs.mkdirSync(m2Dir, { recursive: true }); + fs.mkdirSync(m2Dir, {recursive: true}); fs.writeFileSync(settingsFile, 'FAKE FILE'); expect(fs.existsSync(m2Dir)).toBe(true); expect(fs.existsSync(settingsFile)).toBe(true); - await auth.createAuthenticationSettings(id, username, password, m2Dir, false); + await auth.createAuthenticationSettings( + id, + username, + password, + m2Dir, + false + ); expect(fs.existsSync(m2Dir)).toBe(true); expect(fs.existsSync(settingsFile)).toBe(true); @@ -159,6 +194,8 @@ describe('auth tests', () => { `; - expect(auth.generate(id, username, password, gpgPassphrase)).toEqual(expectedSettings); + expect(auth.generate(id, username, password, gpgPassphrase)).toEqual( + expectedSettings + ); }); }); diff --git a/__tests__/cache.test.ts b/__tests__/cache.test.ts index 987da4a0..8bcb6353 100644 --- a/__tests__/cache.test.ts +++ b/__tests__/cache.test.ts @@ -1,7 +1,7 @@ -import { mkdtempSync } from 'fs'; -import { tmpdir } from 'os'; -import { join } from 'path'; -import { restore, save } from '../src/cache'; +import {mkdtempSync} from 'fs'; +import {tmpdir} from 'os'; +import {join} from 'path'; +import {restore, save} from '../src/cache'; import * as fs from 'fs'; import * as os from 'os'; import * as core from '@actions/core'; @@ -68,17 +68,21 @@ describe('dependency cache', () => { beforeEach(() => { spyCacheRestore = jest .spyOn(cache, 'restoreCache') - .mockImplementation((paths: string[], primaryKey: string) => Promise.resolve(undefined)); + .mockImplementation((paths: string[], primaryKey: string) => + Promise.resolve(undefined) + ); spyWarning.mockImplementation(() => null); }); it('throws error if unsupported package manager specified', () => { - return expect(restore('ant')).rejects.toThrowError('unknown package manager specified: ant'); + return expect(restore('ant')).rejects.toThrow( + 'unknown package manager specified: ant' + ); }); describe('for maven', () => { it('throws error if no pom.xml found', async () => { - await expect(restore('maven')).rejects.toThrowError( + await expect(restore('maven')).rejects.toThrow( `No file in ${projectRoot( workspace )} matched to [**/pom.xml], make sure you have checked out the target repository` @@ -88,14 +92,14 @@ describe('dependency cache', () => { createFile(join(workspace, 'pom.xml')); await restore('maven'); - expect(spyCacheRestore).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith('maven cache is not found'); + expect(spyCacheRestore).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith('maven cache is not found'); }); }); describe('for gradle', () => { it('throws error if no build.gradle found', async () => { - await expect(restore('gradle')).rejects.toThrowError( + await expect(restore('gradle')).rejects.toThrow( `No file in ${projectRoot( workspace )} matched to [**/*.gradle*,**/gradle-wrapper.properties,buildSrc/**/Versions.kt,buildSrc/**/Dependencies.kt,gradle/*.versions.toml], make sure you have checked out the target repository` @@ -105,26 +109,26 @@ describe('dependency cache', () => { createFile(join(workspace, 'build.gradle')); await restore('gradle'); - expect(spyCacheRestore).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith('gradle cache is not found'); + expect(spyCacheRestore).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found'); }); it('downloads cache based on build.gradle.kts', async () => { createFile(join(workspace, 'build.gradle.kts')); await restore('gradle'); - expect(spyCacheRestore).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith('gradle cache is not found'); + expect(spyCacheRestore).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found'); }); it('downloads cache based on libs.versions.toml', async () => { createDirectory(join(workspace, 'gradle')); createFile(join(workspace, 'gradle', 'libs.versions.toml')); await restore('gradle'); - expect(spyCacheRestore).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith('gradle cache is not found'); + expect(spyCacheRestore).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found'); }); }); it('downloads cache based on buildSrc/Versions.kt', async () => { @@ -132,13 +136,13 @@ describe('dependency cache', () => { createFile(join(workspace, 'buildSrc', 'Versions.kt')); await restore('gradle'); - expect(spyCacheRestore).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith('gradle cache is not found'); + expect(spyCacheRestore).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found'); }); describe('for sbt', () => { it('throws error if no build.sbt found', async () => { - await expect(restore('sbt')).rejects.toThrowError( + await expect(restore('sbt')).rejects.toThrow( `No file in ${projectRoot( workspace )} matched to [**/*.sbt,**/project/build.properties,**/project/**.{scala,sbt}], make sure you have checked out the target repository` @@ -148,9 +152,9 @@ describe('dependency cache', () => { createFile(join(workspace, 'build.sbt')); await restore('sbt'); - expect(spyCacheRestore).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith('sbt cache is not found'); + expect(spyCacheRestore).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith('sbt cache is not found'); }); }); }); @@ -163,12 +167,16 @@ describe('dependency cache', () => { beforeEach(() => { spyCacheSave = jest .spyOn(cache, 'saveCache') - .mockImplementation((paths: string[], key: string) => Promise.resolve(0)); + .mockImplementation((paths: string[], key: string) => + Promise.resolve(0) + ); spyWarning.mockImplementation(() => null); }); it('throws error if unsupported package manager specified', () => { - return expect(save('ant')).rejects.toThrowError('unknown package manager specified: ant'); + return expect(save('ant')).rejects.toThrow( + 'unknown package manager specified: ant' + ); }); it('save with -1 cacheId , should not fail workflow', async () => { @@ -176,10 +184,12 @@ describe('dependency cache', () => { createStateForMissingBuildFile(); await save('maven'); - expect(spyCacheSave).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalled(); - expect(spyInfo).toBeCalledWith(expect.stringMatching(/^Cache saved with the key:.*/)); + expect(spyCacheSave).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith( + expect.stringMatching(/^Cache saved with the key:.*/) + ); }); it('saves with error from toolkit, should fail workflow', async () => { @@ -189,31 +199,37 @@ describe('dependency cache', () => { createStateForMissingBuildFile(); expect.assertions(1); - await expect(save('maven')).rejects.toEqual(new cache.ValidationError('Validation failed')); + await expect(save('maven')).rejects.toEqual( + new cache.ValidationError('Validation failed') + ); }); describe('for maven', () => { it('uploads cache even if no pom.xml found', async () => { createStateForMissingBuildFile(); await save('maven'); - expect(spyCacheSave).toBeCalled(); - expect(spyWarning).not.toBeCalled(); + expect(spyCacheSave).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); }); it('does not upload cache if no restore run before', async () => { createFile(join(workspace, 'pom.xml')); await save('maven'); - expect(spyCacheSave).not.toBeCalled(); - expect(spyWarning).toBeCalledWith('Error retrieving key from state.'); + expect(spyCacheSave).not.toHaveBeenCalled(); + expect(spyWarning).toHaveBeenCalledWith( + 'Error retrieving key from state.' + ); }); it('uploads cache', async () => { createFile(join(workspace, 'pom.xml')); createStateForSuccessfulRestore(); await save('maven'); - expect(spyCacheSave).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith(expect.stringMatching(/^Cache saved with the key:.*/)); + expect(spyCacheSave).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith( + expect.stringMatching(/^Cache saved with the key:.*/) + ); }); }); describe('for gradle', () => { @@ -221,33 +237,39 @@ describe('dependency cache', () => { createStateForMissingBuildFile(); await save('gradle'); - expect(spyCacheSave).toBeCalled(); - expect(spyWarning).not.toBeCalled(); + expect(spyCacheSave).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); }); it('does not upload cache if no restore run before', async () => { createFile(join(workspace, 'build.gradle')); await save('gradle'); - expect(spyCacheSave).not.toBeCalled(); - expect(spyWarning).toBeCalledWith('Error retrieving key from state.'); + expect(spyCacheSave).not.toHaveBeenCalled(); + expect(spyWarning).toHaveBeenCalledWith( + 'Error retrieving key from state.' + ); }); it('uploads cache based on build.gradle', async () => { createFile(join(workspace, 'build.gradle')); createStateForSuccessfulRestore(); await save('gradle'); - expect(spyCacheSave).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith(expect.stringMatching(/^Cache saved with the key:.*/)); + expect(spyCacheSave).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith( + expect.stringMatching(/^Cache saved with the key:.*/) + ); }); it('uploads cache based on build.gradle.kts', async () => { createFile(join(workspace, 'build.gradle.kts')); createStateForSuccessfulRestore(); await save('gradle'); - expect(spyCacheSave).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith(expect.stringMatching(/^Cache saved with the key:.*/)); + expect(spyCacheSave).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith( + expect.stringMatching(/^Cache saved with the key:.*/) + ); }); it('uploads cache based on buildSrc/Versions.kt', async () => { createDirectory(join(workspace, 'buildSrc')); @@ -255,33 +277,39 @@ describe('dependency cache', () => { createStateForSuccessfulRestore(); await save('gradle'); - expect(spyCacheSave).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith(expect.stringMatching(/^Cache saved with the key:.*/)); + expect(spyCacheSave).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith( + expect.stringMatching(/^Cache saved with the key:.*/) + ); }); }); describe('for sbt', () => { it('uploads cache even if no build.sbt found', async () => { createStateForMissingBuildFile(); await save('sbt'); - expect(spyCacheSave).toBeCalled(); - expect(spyWarning).not.toBeCalled(); + expect(spyCacheSave).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); }); it('does not upload cache if no restore run before', async () => { createFile(join(workspace, 'build.sbt')); await save('sbt'); - expect(spyCacheSave).not.toBeCalled(); - expect(spyWarning).toBeCalledWith('Error retrieving key from state.'); + expect(spyCacheSave).not.toHaveBeenCalled(); + expect(spyWarning).toHaveBeenCalledWith( + 'Error retrieving key from state.' + ); }); it('uploads cache', async () => { createFile(join(workspace, 'build.sbt')); createStateForSuccessfulRestore(); await save('sbt'); - expect(spyCacheSave).toBeCalled(); - expect(spyWarning).not.toBeCalled(); - expect(spyInfo).toBeCalledWith(expect.stringMatching(/^Cache saved with the key:.*/)); + expect(spyCacheSave).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); + expect(spyInfo).toHaveBeenCalledWith( + expect.stringMatching(/^Cache saved with the key:.*/) + ); }); }); }); diff --git a/__tests__/cleanup-java.test.ts b/__tests__/cleanup-java.test.ts index 0a15cc0c..375a2ad1 100644 --- a/__tests__/cleanup-java.test.ts +++ b/__tests__/cleanup-java.test.ts @@ -1,4 +1,4 @@ -import { run as cleanup } from '../src/cleanup-java'; +import {run as cleanup} from '../src/cleanup-java'; import * as core from '@actions/core'; import * as cache from '@actions/cache'; import * as util from '../src/util'; @@ -38,8 +38,8 @@ describe('cleanup', () => { return name === 'cache' ? 'gradle' : ''; }); await cleanup(); - expect(spyCacheSave).toBeCalled(); - expect(spyWarning).not.toBeCalled(); + expect(spyCacheSave).toHaveBeenCalled(); + expect(spyWarning).not.toHaveBeenCalled(); }); it('does not fail even though the save process throws error', async () => { @@ -50,7 +50,7 @@ describe('cleanup', () => { return name === 'cache' ? 'gradle' : ''; }); await cleanup(); - expect(spyCacheSave).toBeCalled(); + expect(spyCacheSave).toHaveBeenCalled(); }); }); diff --git a/__tests__/data/semeru.json b/__tests__/data/semeru.json new file mode 100644 index 00000000..409a53ef --- /dev/null +++ b/__tests__/data/semeru.json @@ -0,0 +1,2168 @@ +[ + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 87, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "50ad0862a4bb395480d65ef936dec083133e741667bc2e9fc2a526b7a22a3508", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_17.0.2_8_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 87, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_17.0.2_8_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "size": 202318708 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T05:11:16Z" + }, + { + "architecture": "ppc64le", + "download_count": 9, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "fca6b34696be3661f95aafe14318c0b7d8b86a0dd0a26ab0d68be1489273e9dc", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_17.0.2_8_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 9, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_17.0.2_8_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "size": 207879163 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T05:11:34Z" + }, + { + "architecture": "s390x", + "download_count": 10, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "a06fb421563952a4fbd12fcd2f4b0c9b9ee22154604553baa8eb0428406ecf1b", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_17.0.2_8_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 10, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_17.0.2_8_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "size": 203657967 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T05:11:42Z" + }, + { + "architecture": "x64", + "download_count": 224, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "784b15f6d5ac5bc83ad9018dd5998854af21d2c468038cc8935abe40cf02f730", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_17.0.2_8_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 224, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_17.0.2_8_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "size": 207514103 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T05:11:50Z" + } + ], + "download_count": 514, + "id": "RE_kwDOGgIW6M4Dd2_r.qiAvl8XCnvMGWg==", + "release_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/tag/jdk-17.0.2%2B8_openj9-0.30.0", + "release_name": "jdk-17.0.2+8_openj9-0.30.0", + "release_type": "ga", + "timestamp": "2022-01-28T14:12:15Z", + "updated_at": "2022-01-28T14:12:15Z", + "vendor": "ibm", + "version_data": { + "build": 8, + "major": 17, + "minor": 0, + "openjdk_version": "17.0.2+8", + "security": 2, + "semver": "17.0.2+8" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 247, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "7a8ba2ca08e7ceaed2a8d349087184dc4fce57da5ab8e538e82667cf42c1c9cb", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_aarch64_linux_17.0.1_12_openj9-0.29.1.tar.gz.sha256.txt", + "download_count": 247, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_aarch64_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_aarch64_linux_17.0.1_12_openj9-0.29.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "size": 202169246 + }, + "project": "jdk", + "scm_ref": "v0.29.1-release", + "updated_at": "2021-12-09T16:17:24Z" + }, + { + "architecture": "ppc64le", + "download_count": 53, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "919a26f4098fd16680388e30fc3ed2056c8b0009205447511ba119f1be07dd08", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_ppc64le_linux_17.0.1_12_openj9-0.29.1.tar.gz.sha256.txt", + "download_count": 53, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_ppc64le_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_ppc64le_linux_17.0.1_12_openj9-0.29.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "size": 207687300 + }, + "project": "jdk", + "scm_ref": "v0.29.1-release", + "updated_at": "2021-12-09T16:17:43Z" + }, + { + "architecture": "s390x", + "download_count": 53, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "6cc23f5467e3e339da8d4ce180c537dc3f23d76db83c7d6b1d80c4ce00239fc0", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_s390x_linux_17.0.1_12_openj9-0.29.1.tar.gz.sha256.txt", + "download_count": 53, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_s390x_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_s390x_linux_17.0.1_12_openj9-0.29.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "size": 203493613 + }, + "project": "jdk", + "scm_ref": "v0.29.1-release", + "updated_at": "2021-12-09T16:17:52Z" + }, + { + "architecture": "x64", + "download_count": 1391, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "e02870ff175ed131481c4258d5b9069f39add8376e48527a5d4b87dfac196af9", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_x64_linux_17.0.1_12_openj9-0.29.1.tar.gz.sha256.txt", + "download_count": 1391, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_x64_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_x64_linux_17.0.1_12_openj9-0.29.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "size": 207287538 + }, + "project": "jdk", + "scm_ref": "v0.29.1-release", + "updated_at": "2021-12-09T16:18:01Z" + } + ], + "download_count": 4164, + "id": "RE_kwDOGgIW6M4DRt0H.NPTs+7PN5sPqSg==", + "release_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/tag/jdk-17.0.1%2B12_openj9-0.29.1", + "release_name": "jdk-17.0.1+12_openj9-0.29.1", + "release_type": "ga", + "timestamp": "2021-12-09T19:35:32Z", + "updated_at": "2021-12-09T19:35:32Z", + "vendor": "ibm", + "version_data": { + "build": 12, + "major": 17, + "minor": 0, + "openjdk_version": "17.0.1+12", + "security": 1, + "semver": "17.0.1+12" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 909, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "edc972a824a8c9993b1403eb33a2148f59d1fd8d6faa5e89582be9d518999441", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.1.tar.gz.sha256.txt", + "download_count": 909, + "link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.1.tar.gz", + "size": 206335729 + }, + "project": "jdk", + "scm_ref": "v0.27.1-release", + "updated_at": "2021-09-16T20:45:40Z" + } + ], + "download_count": 1520, + "id": "MDc6UmVsZWFzZTQ5NzA2NjE3.thCg2143ldcHOw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/tag/jdk-16.0.2%2B7_openj9-0.27.1", + "release_name": "jdk-16.0.2+7_openj9-0.27.1", + "release_type": "ga", + "timestamp": "2021-09-16T20:46:21Z", + "updated_at": "2021-09-16T20:46:21Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 16, + "minor": 0, + "openjdk_version": "16.0.2+7", + "security": 2, + "semver": "16.0.2+7" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 217, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "d5901996f2c0889b2b92de97fed0b36d5068da308be0fbd6c8293a6b6b91634d", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 217, + "link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "size": 206337625 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T17:03:32Z" + }, + { + "architecture": "s390x", + "download_count": 412, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "3a2741a2e14b9934405a6c0b6af9e865687a70814af355e62dd84025707ccfdc", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_16.0.2_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 412, + "link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_16.0.2_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "size": 203152325 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T17:03:38Z" + }, + { + "architecture": "x64", + "download_count": 13739, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "1349eb9a1d9af491a1984d66a80126730357c4a5c4fcbe7112a2c832f6c0886e", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 13739, + "link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "size": 205317058 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T17:03:46Z" + } + ], + "download_count": 59895, + "id": "MDc6UmVsZWFzZTQ3MjQxNTU3.thCg2143ldcHOw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/tag/jdk-16.0.2%2B7_openj9-0.27.0", + "release_name": "jdk-16.0.2+7_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T17:56:51Z", + "updated_at": "2021-08-03T17:56:51Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 16, + "minor": 0, + "openjdk_version": "16.0.2+7", + "security": 2, + "semver": "16.0.2+7" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 191, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "022cda1210331488c3db3d0d1282ea74467397fdabc34cb482cdfe81c45f6a15", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 191, + "link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "size": 200907027 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T17:03:20Z" + } + ], + "download_count": 304, + "id": "MDc6UmVsZWFzZTQ3MjQxNTU3.bCP9NcEAVyL3kw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/tag/jdk-16.0.2%2B7_openj9-0.27.0", + "release_name": "jdk-16.0.2+7_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T17:56:51Z", + "updated_at": "2021-08-03T17:56:51Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 16, + "minor": 0, + "openjdk_version": "16.0.2-ea+7", + "pre": "ea", + "security": 2, + "semver": "16.0.2-ea+7" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 22, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "5411e55aa50862c396f8f01ae6f84822b13a18138813a1831310adc926b58c37", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_11.0.14_9_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 22, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_11.0.14_9_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "size": 197962280 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T07:14:39Z" + }, + { + "architecture": "ppc64le", + "download_count": 86, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "9237ba2b221c523bc4ce4fdebcc5ad508801cfe7cbeae0f8f2897c120f8c1683", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.14_9_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 86, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.14_9_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "size": 203330982 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T07:14:55Z" + }, + { + "architecture": "s390x", + "download_count": 58, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "49adc9ea3ab77e7319ef1e9cd7937a227a3e4d650f99a539c59a05f3915cee99", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_11.0.14_9_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 58, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_11.0.14_9_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "size": 200096167 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T07:15:03Z" + }, + { + "architecture": "x64", + "download_count": 1223, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "17a4841299a17b84dcfecbb568a28e8ab2ebfb37320e642dfa2cc8758cda48e3", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_11.0.14_9_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 1223, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_11.0.14_9_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "size": 202536056 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T07:15:11Z" + } + ], + "download_count": 1988, + "id": "MDc6UmVsZWFzZTU4MTYyODc1.RKbT1cigFXPSvw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/tag/jdk-11.0.14%2B9_openj9-0.30.0", + "release_name": "jdk-11.0.14+9_openj9-0.30.0", + "release_type": "ga", + "timestamp": "2022-01-28T14:13:43Z", + "updated_at": "2022-01-28T14:13:43Z", + "vendor": "ibm", + "version_data": { + "build": 9, + "major": 11, + "minor": 0, + "openjdk_version": "11.0.14+9", + "security": 14, + "semver": "11.0.14+9" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 350, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "151dca23e1fdb43eaa60631c96895be9aa7bb751e7fdf88ddffa1c32157fb417", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_11.0.13_8_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 350, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_11.0.13_8_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "size": 197781632 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T14:35:04Z" + }, + { + "architecture": "ppc64le", + "download_count": 559, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "7b304c52974f51611b45a2ab7949503e33a204b8a4ae705eb3c74789350174d3", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.13_8_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 559, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.13_8_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "size": 203079177 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T14:35:22Z" + }, + { + "architecture": "s390x", + "download_count": 705, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "6c3ebb4af0f4066e721e1f0078438458775f4b93bfd2d0be1066c54ccf015654", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_11.0.13_8_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 705, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_11.0.13_8_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "size": 199870826 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T14:35:30Z" + }, + { + "architecture": "x64", + "download_count": 23275, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "3975e2732cf632ca8f41c237ba7e033fd96bda262b79861f83b4e2ac62c90c3d", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_11.0.13_8_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 23275, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_11.0.13_8_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "size": 202193589 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T14:35:38Z" + } + ], + "download_count": 41804, + "id": "MDc6UmVsZWFzZTUxODcxNDUz.DrSSnWfQGA0+fw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/tag/jdk-11.0.13%2B8_openj9-0.29.0", + "release_name": "jdk-11.0.13+8_openj9-0.29.0", + "release_type": "ga", + "timestamp": "2021-10-22T16:14:14Z", + "updated_at": "2021-11-11T16:27:32Z", + "vendor": "ibm", + "version_data": { + "build": 8, + "major": 11, + "minor": 0, + "openjdk_version": "11.0.13+8", + "security": 13, + "semver": "11.0.13+8" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 248, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "4465df8798e84d62dd951a10913e817a9611856fa64166691bb30182402dec4f", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.1.tar.gz.sha256.txt", + "download_count": 248, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.1.tar.gz", + "size": 203028556 + }, + "project": "jdk", + "scm_ref": "v0.27.1-release", + "updated_at": "2021-09-16T20:38:36Z" + } + ], + "download_count": 472, + "id": "MDc6UmVsZWFzZTQ5NzA2MTQx.Xk3KfzrxRzXZIw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/tag/jdk-11.0.12%2B7_openj9-0.27.1", + "release_name": "jdk-11.0.12+7_openj9-0.27.1", + "release_type": "ga", + "timestamp": "2021-09-16T20:39:08Z", + "updated_at": "2021-09-16T20:39:08Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 11, + "minor": 0, + "openjdk_version": "11.0.12+7", + "security": 12, + "semver": "11.0.12+7" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 362, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "7d49a5b29a84831526f7bffaaee399ac9a26d05712ac4b9cb7ca0a370ed3f020", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 362, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "size": 203013889 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:07:26Z" + }, + { + "architecture": "s390x", + "download_count": 1567, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "991f8df53079378782b9de3bbfd4c52a19920ea9ba90e9a54c871ce47b599cdb", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_11.0.12_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 1567, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_11.0.12_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "size": 200393575 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:07:31Z" + }, + { + "architecture": "x64", + "download_count": 27364, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "4c2d776f69e3ff7d01cd57c0938b7a7f058264425faf18e3708b905e93f915c4", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_11.0.12_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 27364, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_11.0.12_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "size": 202156239 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:07:36Z" + } + ], + "download_count": 61477, + "id": "MDc6UmVsZWFzZTQ3MjM4NDA4.Xk3KfzrxRzXZIw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/tag/jdk-11.0.12%2B7_openj9-0.27.0", + "release_name": "jdk-11.0.12+7_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T16:16:45Z", + "updated_at": "2021-08-03T16:16:45Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 11, + "minor": 0, + "openjdk_version": "11.0.12+7", + "security": 12, + "semver": "11.0.12+7" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 328, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "f025af94a65872653baeb6f889ec6d592ce9d92391fa04e82fb68a50b96178a7", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_11.0.12_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 328, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_11.0.12_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "size": 197763167 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:07:13Z" + } + ], + "download_count": 387, + "id": "MDc6UmVsZWFzZTQ3MjM4NDA4.P5vAkWZRL+vIuA==", + "release_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/tag/jdk-11.0.12%2B7_openj9-0.27.0", + "release_name": "jdk-11.0.12+7_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T16:16:45Z", + "updated_at": "2021-08-03T16:16:45Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 11, + "minor": 0, + "openjdk_version": "11.0.12-ea+7", + "pre": "ea", + "security": 12, + "semver": "11.0.12-ea+7" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 20, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "82f4b84bf52693c798db943d0f68a5ec912c44dc1137ce627687b7fb6f86645d", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_8u322b06_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 20, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_8u322b06_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_8u322b06_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_8u322b06_openj9-0.30.0.tar.gz", + "size": 113415046 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T04:56:41Z" + }, + { + "architecture": "ppc64le", + "download_count": 77, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "fcc679ac35f33756f88375382ff96f01dea19e15e1edbc202bce5b5f74581f90", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_8u322b06_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 77, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_8u322b06_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_8u322b06_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_8u322b06_openj9-0.30.0.tar.gz", + "size": 116100956 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T04:56:56Z" + }, + { + "architecture": "s390x", + "download_count": 58, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "d479426395696d30b8b215d3d008f897043b8cf6b8f3fced83650693d0b2ab30", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_8u322b06_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 58, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_8u322b06_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_8u322b06_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_8u322b06_openj9-0.30.0.tar.gz", + "size": 114746857 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T04:57:05Z" + }, + { + "architecture": "x64", + "download_count": 934, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "d31ab3c9eab5436d3bb1315d7690d3548c42633edcbd952a625cccc7cb129aad", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_8u322b06_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 934, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_8u322b06_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_8u322b06_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_8u322b06_openj9-0.30.0.tar.gz", + "size": 116002995 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T04:57:12Z" + } + ], + "download_count": 1930, + "id": "MDc6UmVsZWFzZTU4MTU4Nzc2.EnUUTzyeM/7M8Q==", + "release_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/tag/jdk8u322-b06_openj9-0.30.0", + "release_name": "jdk8u322-b06_openj9-0.30.0", + "release_type": "ga", + "timestamp": "2022-01-28T14:13:47Z", + "updated_at": "2022-01-28T14:13:47Z", + "vendor": "ibm", + "version_data": { + "build": 6, + "major": 8, + "minor": 0, + "openjdk_version": "1.8.0_322-b06", + "security": 322, + "semver": "8.0.322+6" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 306, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "055e51b462fac3af198424ab41804959bf769274ebdffef9ac8bf036a9d73b95", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_8u312b07_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 306, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_8u312b07_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_8u312b07_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_8u312b07_openj9-0.29.0.tar.gz", + "size": 113313103 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T15:26:24Z" + }, + { + "architecture": "ppc64le", + "download_count": 332, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "ebd9d0b4e9ecca578b684e080f0c45fa4edb1a4d5f572ea21ff61b301dd7c870", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_8u312b07_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 332, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_8u312b07_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_8u312b07_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_8u312b07_openj9-0.29.0.tar.gz", + "size": 115990151 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T15:26:35Z" + }, + { + "architecture": "s390x", + "download_count": 345, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "6908fb701b5834cbf2e8d6f1345aa29039ab95bc0c125631f310afe1c1715eae", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_8u312b07_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 345, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_8u312b07_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_8u312b07_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_8u312b07_openj9-0.29.0.tar.gz", + "size": 114646513 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T15:26:41Z" + }, + { + "architecture": "x64", + "download_count": 12691, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "c7306112201b45cc8b96e6d6fb3f6de727ddbbb51022cbd9cff98b661e37a510", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_8u312b07_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 12691, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_8u312b07_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_8u312b07_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_8u312b07_openj9-0.29.0.tar.gz", + "size": 115894347 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T15:26:47Z" + } + ], + "download_count": 36633, + "id": "MDc6UmVsZWFzZTUxODc1OTky.ONE85BtmOGD9Uw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/tag/jdk8u312-b07_openj9-0.29.0", + "release_name": "jdk8u312-b07_openj9-0.29.0", + "release_type": "ga", + "timestamp": "2021-10-22T16:14:40Z", + "updated_at": "2021-11-11T16:39:44Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 8, + "minor": 0, + "openjdk_version": "1.8.0_312-b07", + "security": 312, + "semver": "8.0.312+7" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 165, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "9aa400cba9fc88f0eb819e633c725258b7def8424a181cb1e949bd457da10065", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.1.tar.gz.sha256.txt", + "download_count": 165, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.1.tar.gz", + "size": 115933314 + }, + "project": "jdk", + "scm_ref": "v0.27.1-release", + "updated_at": "2021-09-16T19:53:06Z" + } + ], + "download_count": 331, + "id": "MDc6UmVsZWFzZTQ5NzAzNjIz.ZZ5uD1yix/X1Qg==", + "release_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/tag/jdk8u302-b08_openj9-0.27.1", + "release_name": "jdk8u302-b08_openj9-0.27.1", + "release_type": "ga", + "timestamp": "2021-09-16T19:53:57Z", + "updated_at": "2021-09-16T19:53:57Z", + "vendor": "ibm", + "version_data": { + "build": 8, + "major": 8, + "minor": 0, + "openjdk_version": "1.8.0_302-b08", + "security": 302, + "semver": "8.0.302+8" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 168, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "ce3f5f46ed4bcee187a5734d20fa4f7914765026f1ad2799b7020feed22a19ef", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 168, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.0.tar.gz", + "size": 115933990 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:46:14Z" + }, + { + "architecture": "s390x", + "download_count": 188, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "4ae2fff725327937dc9cf74e714a8e349f00fad0f543052bd95a9a79ee99d121", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_8u302b08_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 188, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_8u302b08_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_8u302b08_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_8u302b08_openj9-0.27.0.tar.gz", + "size": 114605370 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:46:19Z" + }, + { + "architecture": "x64", + "download_count": 10381, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "f1fea5d3049754ad13f9b90d90beb9157dbd7e84e00c255c2cef81441f0f348e", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_8u302b08_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 10381, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_8u302b08_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_8u302b08_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_8u302b08_openj9-0.27.0.tar.gz", + "size": 115788440 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:46:24Z" + } + ], + "download_count": 48028, + "id": "MDc6UmVsZWFzZTQ3MjQwNjMy.ZZ5uD1yix/X1Qg==", + "release_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/tag/jdk8u302-b08_openj9-0.27.0", + "release_name": "jdk8u302-b08_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T18:02:49Z", + "updated_at": "2021-08-03T18:02:49Z", + "vendor": "ibm", + "version_data": { + "build": 8, + "major": 8, + "minor": 0, + "openjdk_version": "1.8.0_302-b08", + "security": 302, + "semver": "8.0.302+8" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 109, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "d802b80e8022c81973da0e56056ecd09ce44fc3dad6496aff24a7005e9f5e77e", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_8u302b08_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 109, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_8u302b08_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_8u302b08_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_8u302b08_openj9-0.27.0.tar.gz", + "size": 113208788 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:46:04Z" + } + ], + "download_count": 162, + "id": "MDc6UmVsZWFzZTQ3MjQwNjMy.wiccQXilryXyYQ==", + "release_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/tag/jdk8u302-b08_openj9-0.27.0", + "release_name": "jdk8u302-b08_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T18:02:49Z", + "updated_at": "2021-08-03T18:02:49Z", + "vendor": "ibm", + "version_data": { + "build": 8, + "major": 8, + "minor": 0, + "openjdk_version": "1.8.0_302-ea-b08", + "pre": "ea", + "security": 302, + "semver": "8.0.302-ea+8" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 87, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "50ad0862a4bb395480d65ef936dec083133e741667bc2e9fc2a526b7a22a3508", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_17.0.2_8_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 87, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_17.0.2_8_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "size": 202318708 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T05:11:16Z" + }, + { + "architecture": "ppc64le", + "download_count": 9, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "fca6b34696be3661f95aafe14318c0b7d8b86a0dd0a26ab0d68be1489273e9dc", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_17.0.2_8_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 9, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_17.0.2_8_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "size": 207879163 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T05:11:34Z" + }, + { + "architecture": "s390x", + "download_count": 10, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "a06fb421563952a4fbd12fcd2f4b0c9b9ee22154604553baa8eb0428406ecf1b", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_17.0.2_8_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 10, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_17.0.2_8_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "size": 203657967 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T05:11:42Z" + }, + { + "architecture": "x64", + "download_count": 224, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "784b15f6d5ac5bc83ad9018dd5998854af21d2c468038cc8935abe40cf02f730", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_17.0.2_8_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 224, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.2%2B8_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_17.0.2_8_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_17.0.2_8_openj9-0.30.0.tar.gz", + "size": 207514103 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T05:11:50Z" + } + ], + "download_count": 514, + "id": "RE_kwDOGgIW6M4Dd2_r.qiAvl8XCnvMGWg==", + "release_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/tag/jdk-17.0.2%2B8_openj9-0.30.0", + "release_name": "jdk-17.0.2+8_openj9-0.30.0", + "release_type": "ga", + "timestamp": "2022-01-28T14:12:15Z", + "updated_at": "2022-01-28T14:12:15Z", + "vendor": "ibm", + "version_data": { + "build": 8, + "major": 17, + "minor": 0, + "openjdk_version": "17.0.2+8", + "security": 2, + "semver": "17.0.2+8" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 247, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "7a8ba2ca08e7ceaed2a8d349087184dc4fce57da5ab8e538e82667cf42c1c9cb", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_aarch64_linux_17.0.1_12_openj9-0.29.1.tar.gz.sha256.txt", + "download_count": 247, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_aarch64_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_aarch64_linux_17.0.1_12_openj9-0.29.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "size": 202169246 + }, + "project": "jdk", + "scm_ref": "v0.29.1-release", + "updated_at": "2021-12-09T16:17:24Z" + }, + { + "architecture": "ppc64le", + "download_count": 53, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "919a26f4098fd16680388e30fc3ed2056c8b0009205447511ba119f1be07dd08", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_ppc64le_linux_17.0.1_12_openj9-0.29.1.tar.gz.sha256.txt", + "download_count": 53, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_ppc64le_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_ppc64le_linux_17.0.1_12_openj9-0.29.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "size": 207687300 + }, + "project": "jdk", + "scm_ref": "v0.29.1-release", + "updated_at": "2021-12-09T16:17:43Z" + }, + { + "architecture": "s390x", + "download_count": 53, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "6cc23f5467e3e339da8d4ce180c537dc3f23d76db83c7d6b1d80c4ce00239fc0", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_s390x_linux_17.0.1_12_openj9-0.29.1.tar.gz.sha256.txt", + "download_count": 53, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_s390x_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_s390x_linux_17.0.1_12_openj9-0.29.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "size": 203493613 + }, + "project": "jdk", + "scm_ref": "v0.29.1-release", + "updated_at": "2021-12-09T16:17:52Z" + }, + { + "architecture": "x64", + "download_count": 1391, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "e02870ff175ed131481c4258d5b9069f39add8376e48527a5d4b87dfac196af9", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_x64_linux_17.0.1_12_openj9-0.29.1.tar.gz.sha256.txt", + "download_count": 1391, + "link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_x64_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/download/jdk-17.0.1%2B12_openj9-0.29.1/ibm-semeru-open-jdk_x64_linux_17.0.1_12_openj9-0.29.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_17.0.1_12_openj9-0.29.1.tar.gz", + "size": 207287538 + }, + "project": "jdk", + "scm_ref": "v0.29.1-release", + "updated_at": "2021-12-09T16:18:01Z" + } + ], + "download_count": 4164, + "id": "RE_kwDOGgIW6M4DRt0H.NPTs+7PN5sPqSg==", + "release_link": "https://github.com/AdoptOpenJDK/semeru17-binaries/releases/tag/jdk-17.0.1%2B12_openj9-0.29.1", + "release_name": "jdk-17.0.1+12_openj9-0.29.1", + "release_type": "ga", + "timestamp": "2021-12-09T19:35:32Z", + "updated_at": "2021-12-09T19:35:32Z", + "vendor": "ibm", + "version_data": { + "build": 12, + "major": 17, + "minor": 0, + "openjdk_version": "17.0.1+12", + "security": 1, + "semver": "17.0.1+12" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 909, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "edc972a824a8c9993b1403eb33a2148f59d1fd8d6faa5e89582be9d518999441", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.1.tar.gz.sha256.txt", + "download_count": 909, + "link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.1.tar.gz", + "size": 206335729 + }, + "project": "jdk", + "scm_ref": "v0.27.1-release", + "updated_at": "2021-09-16T20:45:40Z" + } + ], + "download_count": 1520, + "id": "MDc6UmVsZWFzZTQ5NzA2NjE3.thCg2143ldcHOw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/tag/jdk-16.0.2%2B7_openj9-0.27.1", + "release_name": "jdk-16.0.2+7_openj9-0.27.1", + "release_type": "ga", + "timestamp": "2021-09-16T20:46:21Z", + "updated_at": "2021-09-16T20:46:21Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 16, + "minor": 0, + "openjdk_version": "16.0.2+7", + "security": 2, + "semver": "16.0.2+7" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 217, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "d5901996f2c0889b2b92de97fed0b36d5068da308be0fbd6c8293a6b6b91634d", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 217, + "link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "size": 206337625 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T17:03:32Z" + }, + { + "architecture": "s390x", + "download_count": 412, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "3a2741a2e14b9934405a6c0b6af9e865687a70814af355e62dd84025707ccfdc", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_16.0.2_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 412, + "link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_16.0.2_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "size": 203152325 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T17:03:38Z" + }, + { + "architecture": "x64", + "download_count": 13739, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "1349eb9a1d9af491a1984d66a80126730357c4a5c4fcbe7112a2c832f6c0886e", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 13739, + "link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "size": 205317058 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T17:03:46Z" + } + ], + "download_count": 59895, + "id": "MDc6UmVsZWFzZTQ3MjQxNTU3.thCg2143ldcHOw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/tag/jdk-16.0.2%2B7_openj9-0.27.0", + "release_name": "jdk-16.0.2+7_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T17:56:51Z", + "updated_at": "2021-08-03T17:56:51Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 16, + "minor": 0, + "openjdk_version": "16.0.2+7", + "security": 2, + "semver": "16.0.2+7" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 191, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "022cda1210331488c3db3d0d1282ea74467397fdabc34cb482cdfe81c45f6a15", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 191, + "link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/download/jdk-16.0.2%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_16.0.2_7_openj9-0.27.0.tar.gz", + "size": 200907027 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T17:03:20Z" + } + ], + "download_count": 304, + "id": "MDc6UmVsZWFzZTQ3MjQxNTU3.bCP9NcEAVyL3kw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru16-binaries/releases/tag/jdk-16.0.2%2B7_openj9-0.27.0", + "release_name": "jdk-16.0.2+7_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T17:56:51Z", + "updated_at": "2021-08-03T17:56:51Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 16, + "minor": 0, + "openjdk_version": "16.0.2-ea+7", + "pre": "ea", + "security": 2, + "semver": "16.0.2-ea+7" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 22, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "5411e55aa50862c396f8f01ae6f84822b13a18138813a1831310adc926b58c37", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_11.0.14_9_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 22, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_11.0.14_9_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "size": 197962280 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T07:14:39Z" + }, + { + "architecture": "ppc64le", + "download_count": 86, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "9237ba2b221c523bc4ce4fdebcc5ad508801cfe7cbeae0f8f2897c120f8c1683", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.14_9_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 86, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.14_9_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "size": 203330982 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T07:14:55Z" + }, + { + "architecture": "s390x", + "download_count": 58, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "49adc9ea3ab77e7319ef1e9cd7937a227a3e4d650f99a539c59a05f3915cee99", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_11.0.14_9_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 58, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_11.0.14_9_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "size": 200096167 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T07:15:03Z" + }, + { + "architecture": "x64", + "download_count": 1223, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "17a4841299a17b84dcfecbb568a28e8ab2ebfb37320e642dfa2cc8758cda48e3", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_11.0.14_9_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 1223, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.14%2B9_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_11.0.14_9_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_11.0.14_9_openj9-0.30.0.tar.gz", + "size": 202536056 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T07:15:11Z" + } + ], + "download_count": 1988, + "id": "MDc6UmVsZWFzZTU4MTYyODc1.RKbT1cigFXPSvw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/tag/jdk-11.0.14%2B9_openj9-0.30.0", + "release_name": "jdk-11.0.14+9_openj9-0.30.0", + "release_type": "ga", + "timestamp": "2022-01-28T14:13:43Z", + "updated_at": "2022-01-28T14:13:43Z", + "vendor": "ibm", + "version_data": { + "build": 9, + "major": 11, + "minor": 0, + "openjdk_version": "11.0.14+9", + "security": 14, + "semver": "11.0.14+9" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 350, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "151dca23e1fdb43eaa60631c96895be9aa7bb751e7fdf88ddffa1c32157fb417", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_11.0.13_8_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 350, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_11.0.13_8_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "size": 197781632 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T14:35:04Z" + }, + { + "architecture": "ppc64le", + "download_count": 559, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "7b304c52974f51611b45a2ab7949503e33a204b8a4ae705eb3c74789350174d3", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.13_8_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 559, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.13_8_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "size": 203079177 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T14:35:22Z" + }, + { + "architecture": "s390x", + "download_count": 705, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "6c3ebb4af0f4066e721e1f0078438458775f4b93bfd2d0be1066c54ccf015654", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_11.0.13_8_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 705, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_11.0.13_8_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "size": 199870826 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T14:35:30Z" + }, + { + "architecture": "x64", + "download_count": 23275, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "3975e2732cf632ca8f41c237ba7e033fd96bda262b79861f83b4e2ac62c90c3d", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_11.0.13_8_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 23275, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.13%2B8_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_11.0.13_8_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_11.0.13_8_openj9-0.29.0.tar.gz", + "size": 202193589 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T14:35:38Z" + } + ], + "download_count": 41804, + "id": "MDc6UmVsZWFzZTUxODcxNDUz.DrSSnWfQGA0+fw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/tag/jdk-11.0.13%2B8_openj9-0.29.0", + "release_name": "jdk-11.0.13+8_openj9-0.29.0", + "release_type": "ga", + "timestamp": "2021-10-22T16:14:14Z", + "updated_at": "2021-11-11T16:27:32Z", + "vendor": "ibm", + "version_data": { + "build": 8, + "major": 11, + "minor": 0, + "openjdk_version": "11.0.13+8", + "security": 13, + "semver": "11.0.13+8" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 248, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "4465df8798e84d62dd951a10913e817a9611856fa64166691bb30182402dec4f", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.1.tar.gz.sha256.txt", + "download_count": 248, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.1.tar.gz", + "size": 203028556 + }, + "project": "jdk", + "scm_ref": "v0.27.1-release", + "updated_at": "2021-09-16T20:38:36Z" + } + ], + "download_count": 472, + "id": "MDc6UmVsZWFzZTQ5NzA2MTQx.Xk3KfzrxRzXZIw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/tag/jdk-11.0.12%2B7_openj9-0.27.1", + "release_name": "jdk-11.0.12+7_openj9-0.27.1", + "release_type": "ga", + "timestamp": "2021-09-16T20:39:08Z", + "updated_at": "2021-09-16T20:39:08Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 11, + "minor": 0, + "openjdk_version": "11.0.12+7", + "security": 12, + "semver": "11.0.12+7" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 362, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "7d49a5b29a84831526f7bffaaee399ac9a26d05712ac4b9cb7ca0a370ed3f020", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 362, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "size": 203013889 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:07:26Z" + }, + { + "architecture": "s390x", + "download_count": 1567, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "991f8df53079378782b9de3bbfd4c52a19920ea9ba90e9a54c871ce47b599cdb", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_11.0.12_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 1567, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_11.0.12_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "size": 200393575 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:07:31Z" + }, + { + "architecture": "x64", + "download_count": 27364, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "4c2d776f69e3ff7d01cd57c0938b7a7f058264425faf18e3708b905e93f915c4", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_11.0.12_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 27364, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_11.0.12_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "size": 202156239 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:07:36Z" + } + ], + "download_count": 61477, + "id": "MDc6UmVsZWFzZTQ3MjM4NDA4.Xk3KfzrxRzXZIw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/tag/jdk-11.0.12%2B7_openj9-0.27.0", + "release_name": "jdk-11.0.12+7_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T16:16:45Z", + "updated_at": "2021-08-03T16:16:45Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 11, + "minor": 0, + "openjdk_version": "11.0.12+7", + "security": 12, + "semver": "11.0.12+7" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 328, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "f025af94a65872653baeb6f889ec6d592ce9d92391fa04e82fb68a50b96178a7", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_11.0.12_7_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 328, + "link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/download/jdk-11.0.12%2B7_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_11.0.12_7_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_11.0.12_7_openj9-0.27.0.tar.gz", + "size": 197763167 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:07:13Z" + } + ], + "download_count": 387, + "id": "MDc6UmVsZWFzZTQ3MjM4NDA4.P5vAkWZRL+vIuA==", + "release_link": "https://github.com/AdoptOpenJDK/semeru11-binaries/releases/tag/jdk-11.0.12%2B7_openj9-0.27.0", + "release_name": "jdk-11.0.12+7_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T16:16:45Z", + "updated_at": "2021-08-03T16:16:45Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 11, + "minor": 0, + "openjdk_version": "11.0.12-ea+7", + "pre": "ea", + "security": 12, + "semver": "11.0.12-ea+7" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 20, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "82f4b84bf52693c798db943d0f68a5ec912c44dc1137ce627687b7fb6f86645d", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_8u322b06_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 20, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_8u322b06_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_aarch64_linux_8u322b06_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_8u322b06_openj9-0.30.0.tar.gz", + "size": 113415046 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T04:56:41Z" + }, + { + "architecture": "ppc64le", + "download_count": 77, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "fcc679ac35f33756f88375382ff96f01dea19e15e1edbc202bce5b5f74581f90", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_8u322b06_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 77, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_8u322b06_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_ppc64le_linux_8u322b06_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_8u322b06_openj9-0.30.0.tar.gz", + "size": 116100956 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T04:56:56Z" + }, + { + "architecture": "s390x", + "download_count": 58, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "d479426395696d30b8b215d3d008f897043b8cf6b8f3fced83650693d0b2ab30", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_8u322b06_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 58, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_8u322b06_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_s390x_linux_8u322b06_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_8u322b06_openj9-0.30.0.tar.gz", + "size": 114746857 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T04:57:05Z" + }, + { + "architecture": "x64", + "download_count": 934, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "d31ab3c9eab5436d3bb1315d7690d3548c42633edcbd952a625cccc7cb129aad", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_8u322b06_openj9-0.30.0.tar.gz.sha256.txt", + "download_count": 934, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_8u322b06_openj9-0.30.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u322-b06_openj9-0.30.0/ibm-semeru-open-jdk_x64_linux_8u322b06_openj9-0.30.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_8u322b06_openj9-0.30.0.tar.gz", + "size": 116002995 + }, + "project": "jdk", + "scm_ref": "v0.30.0-release", + "updated_at": "2022-01-28T04:57:12Z" + } + ], + "download_count": 1930, + "id": "MDc6UmVsZWFzZTU4MTU4Nzc2.EnUUTzyeM/7M8Q==", + "release_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/tag/jdk8u322-b06_openj9-0.30.0", + "release_name": "jdk8u322-b06_openj9-0.30.0", + "release_type": "ga", + "timestamp": "2022-01-28T14:13:47Z", + "updated_at": "2022-01-28T14:13:47Z", + "vendor": "ibm", + "version_data": { + "build": 6, + "major": 8, + "minor": 0, + "openjdk_version": "1.8.0_322-b06", + "security": 322, + "semver": "8.0.322+6" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 306, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "055e51b462fac3af198424ab41804959bf769274ebdffef9ac8bf036a9d73b95", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_8u312b07_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 306, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_8u312b07_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_aarch64_linux_8u312b07_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_8u312b07_openj9-0.29.0.tar.gz", + "size": 113313103 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T15:26:24Z" + }, + { + "architecture": "ppc64le", + "download_count": 332, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "ebd9d0b4e9ecca578b684e080f0c45fa4edb1a4d5f572ea21ff61b301dd7c870", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_8u312b07_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 332, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_8u312b07_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_ppc64le_linux_8u312b07_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_8u312b07_openj9-0.29.0.tar.gz", + "size": 115990151 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T15:26:35Z" + }, + { + "architecture": "s390x", + "download_count": 345, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "6908fb701b5834cbf2e8d6f1345aa29039ab95bc0c125631f310afe1c1715eae", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_8u312b07_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 345, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_8u312b07_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_s390x_linux_8u312b07_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_8u312b07_openj9-0.29.0.tar.gz", + "size": 114646513 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T15:26:41Z" + }, + { + "architecture": "x64", + "download_count": 12691, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "c7306112201b45cc8b96e6d6fb3f6de727ddbbb51022cbd9cff98b661e37a510", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_8u312b07_openj9-0.29.0.tar.gz.sha256.txt", + "download_count": 12691, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_8u312b07_openj9-0.29.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u312-b07_openj9-0.29.0/ibm-semeru-open-jdk_x64_linux_8u312b07_openj9-0.29.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_8u312b07_openj9-0.29.0.tar.gz", + "size": 115894347 + }, + "project": "jdk", + "scm_ref": "v0.29.0-release", + "updated_at": "2021-10-22T15:26:47Z" + } + ], + "download_count": 36633, + "id": "MDc6UmVsZWFzZTUxODc1OTky.ONE85BtmOGD9Uw==", + "release_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/tag/jdk8u312-b07_openj9-0.29.0", + "release_name": "jdk8u312-b07_openj9-0.29.0", + "release_type": "ga", + "timestamp": "2021-10-22T16:14:40Z", + "updated_at": "2021-11-11T16:39:44Z", + "vendor": "ibm", + "version_data": { + "build": 7, + "major": 8, + "minor": 0, + "openjdk_version": "1.8.0_312-b07", + "security": 312, + "semver": "8.0.312+7" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 165, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "9aa400cba9fc88f0eb819e633c725258b7def8424a181cb1e949bd457da10065", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.1.tar.gz.sha256.txt", + "download_count": 165, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.1.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.1/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.1.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.1.tar.gz", + "size": 115933314 + }, + "project": "jdk", + "scm_ref": "v0.27.1-release", + "updated_at": "2021-09-16T19:53:06Z" + } + ], + "download_count": 331, + "id": "MDc6UmVsZWFzZTQ5NzAzNjIz.ZZ5uD1yix/X1Qg==", + "release_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/tag/jdk8u302-b08_openj9-0.27.1", + "release_name": "jdk8u302-b08_openj9-0.27.1", + "release_type": "ga", + "timestamp": "2021-09-16T19:53:57Z", + "updated_at": "2021-09-16T19:53:57Z", + "vendor": "ibm", + "version_data": { + "build": 8, + "major": 8, + "minor": 0, + "openjdk_version": "1.8.0_302-b08", + "security": 302, + "semver": "8.0.302+8" + } + }, + { + "binaries": [ + { + "architecture": "ppc64le", + "download_count": 168, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "ce3f5f46ed4bcee187a5734d20fa4f7914765026f1ad2799b7020feed22a19ef", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 168, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_ppc64le_linux_8u302b08_openj9-0.27.0.tar.gz", + "size": 115933990 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:46:14Z" + }, + { + "architecture": "s390x", + "download_count": 188, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "4ae2fff725327937dc9cf74e714a8e349f00fad0f543052bd95a9a79ee99d121", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_8u302b08_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 188, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_8u302b08_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_s390x_linux_8u302b08_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_s390x_linux_8u302b08_openj9-0.27.0.tar.gz", + "size": 114605370 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:46:19Z" + }, + { + "architecture": "x64", + "download_count": 10381, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "f1fea5d3049754ad13f9b90d90beb9157dbd7e84e00c255c2cef81441f0f348e", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_8u302b08_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 10381, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_8u302b08_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_x64_linux_8u302b08_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_x64_linux_8u302b08_openj9-0.27.0.tar.gz", + "size": 115788440 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:46:24Z" + } + ], + "download_count": 48028, + "id": "MDc6UmVsZWFzZTQ3MjQwNjMy.ZZ5uD1yix/X1Qg==", + "release_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/tag/jdk8u302-b08_openj9-0.27.0", + "release_name": "jdk8u302-b08_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T18:02:49Z", + "updated_at": "2021-08-03T18:02:49Z", + "vendor": "ibm", + "version_data": { + "build": 8, + "major": 8, + "minor": 0, + "openjdk_version": "1.8.0_302-b08", + "security": 302, + "semver": "8.0.302+8" + } + }, + { + "binaries": [ + { + "architecture": "aarch64", + "download_count": 109, + "heap_size": "normal", + "image_type": "jdk", + "jvm_impl": "openj9", + "os": "linux", + "package": { + "checksum": "d802b80e8022c81973da0e56056ecd09ce44fc3dad6496aff24a7005e9f5e77e", + "checksum_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_8u302b08_openj9-0.27.0.tar.gz.sha256.txt", + "download_count": 109, + "link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_8u302b08_openj9-0.27.0.tar.gz", + "metadata_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/download/jdk8u302-b08_openj9-0.27.0/ibm-semeru-open-jdk_aarch64_linux_8u302b08_openj9-0.27.0.tar.gz.json", + "name": "ibm-semeru-open-jdk_aarch64_linux_8u302b08_openj9-0.27.0.tar.gz", + "size": 113208788 + }, + "project": "jdk", + "scm_ref": "v0.27.0-release", + "updated_at": "2021-08-03T16:46:04Z" + } + ], + "download_count": 162, + "id": "MDc6UmVsZWFzZTQ3MjQwNjMy.wiccQXilryXyYQ==", + "release_link": "https://github.com/AdoptOpenJDK/semeru8-binaries/releases/tag/jdk8u302-b08_openj9-0.27.0", + "release_name": "jdk8u302-b08_openj9-0.27.0", + "release_type": "ga", + "timestamp": "2021-08-03T18:02:49Z", + "updated_at": "2021-08-03T18:02:49Z", + "vendor": "ibm", + "version_data": { + "build": 8, + "major": 8, + "minor": 0, + "openjdk_version": "1.8.0_302-ea-b08", + "pre": "ea", + "security": 302, + "semver": "8.0.302-ea+8" + } + } +] diff --git a/__tests__/distributors/adopt-installer.test.ts b/__tests__/distributors/adopt-installer.test.ts index a900f858..8a112243 100644 --- a/__tests__/distributors/adopt-installer.test.ts +++ b/__tests__/distributors/adopt-installer.test.ts @@ -1,11 +1,14 @@ -import { HttpClient } from '@actions/http-client'; - -import { AdoptDistribution, AdoptImplementation } from '../../src/distributions/adopt/installer'; -import { JavaInstallerOptions } from '../../src/distributions/base-models'; +import {HttpClient} from '@actions/http-client'; +import {IAdoptAvailableVersions} from '../../src/distributions/adopt/models'; +import { + AdoptDistribution, + AdoptImplementation +} from '../../src/distributions/adopt/installer'; +import {JavaInstallerOptions} from '../../src/distributions/base-models'; import os from 'os'; -let manifestData = require('../data/adopt.json') as []; +import manifestData from '../data/adopt.json'; describe('getAvailableVersions', () => { let spyHttpClient: jest.SpyInstance; @@ -27,42 +30,82 @@ describe('getAvailableVersions', () => { it.each([ [ - { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.Hotspot, 'os=mac&architecture=x64&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' ], [ - { version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.Hotspot, 'os=mac&architecture=x86&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' ], [ - { version: '11', architecture: 'x64', packageType: 'jre', checkLatest: false }, + { + version: '11', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + }, AdoptImplementation.Hotspot, 'os=mac&architecture=x64&image_type=jre&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' ], [ - { version: '11-ea', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11-ea', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.Hotspot, 'os=mac&architecture=x64&image_type=jdk&release_type=ea&jvm_impl=hotspot&page_size=20&page=0' ], [ - { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.OpenJ9, 'os=mac&architecture=x64&image_type=jdk&release_type=ga&jvm_impl=openj9&page_size=20&page=0' ], [ - { version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.OpenJ9, 'os=mac&architecture=x86&image_type=jdk&release_type=ga&jvm_impl=openj9&page_size=20&page=0' ], [ - { version: '11', architecture: 'x64', packageType: 'jre', checkLatest: false }, + { + version: '11', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + }, AdoptImplementation.OpenJ9, 'os=mac&architecture=x64&image_type=jre&release_type=ga&jvm_impl=openj9&page_size=20&page=0' ], [ - { version: '11-ea', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11-ea', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.OpenJ9, 'os=mac&architecture=x64&image_type=jdk&release_type=ea&jvm_impl=openj9&page_size=20&page=0' ] @@ -74,7 +117,8 @@ describe('getAvailableVersions', () => { expectedParameters ) => { const distribution = new AdoptDistribution(installerOptions, impl); - const baseUrl = 'https://api.adoptopenjdk.net/v3/assets/version/%5B1.0,100.0%5D'; + const baseUrl = + 'https://api.adoptopenjdk.net/v3/assets/version/%5B1.0,100.0%5D'; const expectedUrl = `${baseUrl}?project=jdk&vendor=adoptopenjdk&heap_size=normal&sort_method=DEFAULT&sort_order=DESC&${expectedParameters}`; distribution['getPlatformOption'] = () => 'mac'; @@ -91,12 +135,12 @@ describe('getAvailableVersions', () => { .mockReturnValueOnce({ statusCode: 200, headers: {}, - result: manifestData + result: manifestData as any }) .mockReturnValueOnce({ statusCode: 200, headers: {}, - result: manifestData + result: manifestData as any }) .mockReturnValueOnce({ statusCode: 200, @@ -105,7 +149,12 @@ describe('getAvailableVersions', () => { }); const distribution = new AdoptDistribution( - { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.Hotspot ); const availableVersions = await distribution['getAvailableVersions'](); @@ -122,7 +171,12 @@ describe('getAvailableVersions', () => { 'find right toolchain folder', (impl: AdoptImplementation, packageType: string, expected: string) => { const distribution = new AdoptDistribution( - { version: '11', architecture: 'x64', packageType: packageType, checkLatest: false }, + { + version: '11', + architecture: 'x64', + packageType: packageType, + checkLatest: false + }, impl ); @@ -148,8 +202,12 @@ describe('getAvailableVersions', () => { const expectedParameters = `os=mac&architecture=${distroArch}&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0`; - const distribution = new AdoptDistribution(installerOptions, AdoptImplementation.Hotspot); - const baseUrl = 'https://api.adoptopenjdk.net/v3/assets/version/%5B1.0,100.0%5D'; + const distribution = new AdoptDistribution( + installerOptions, + AdoptImplementation.Hotspot + ); + const baseUrl = + 'https://api.adoptopenjdk.net/v3/assets/version/%5B1.0,100.0%5D'; const expectedUrl = `${baseUrl}?project=jdk&vendor=adoptopenjdk&heap_size=normal&sort_method=DEFAULT&sort_order=DESC&${expectedParameters}`; distribution['getPlatformOption'] = () => 'mac'; @@ -176,43 +234,63 @@ describe('findPackageForDownload', () => { ['15.0.1+9.1', '15.0.1+9.1'] ])('version is resolved correctly %s -> %s', async (input, expected) => { const distribution = new AdoptDistribution( - { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.Hotspot ); - distribution['getAvailableVersions'] = async () => manifestData; + distribution['getAvailableVersions'] = async () => manifestData as any; const resolvedVersion = await distribution['findPackageForDownload'](input); expect(resolvedVersion.version).toBe(expected); }); it('version is found but binaries list is empty', async () => { const distribution = new AdoptDistribution( - { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.Hotspot ); - distribution['getAvailableVersions'] = async () => manifestData; - await expect(distribution['findPackageForDownload']('9.0.8')).rejects.toThrowError( - /Could not find satisfied version for SemVer */ - ); + distribution['getAvailableVersions'] = async () => manifestData as any; + await expect( + distribution['findPackageForDownload']('9.0.8') + ).rejects.toThrow(/Could not find satisfied version for SemVer */); }); it('version is not found', async () => { const distribution = new AdoptDistribution( - { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.Hotspot ); - distribution['getAvailableVersions'] = async () => manifestData; - await expect(distribution['findPackageForDownload']('7.x')).rejects.toThrowError( + distribution['getAvailableVersions'] = async () => manifestData as any; + await expect(distribution['findPackageForDownload']('7.x')).rejects.toThrow( /Could not find satisfied version for SemVer */ ); }); it('version list is empty', async () => { const distribution = new AdoptDistribution( - { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, AdoptImplementation.Hotspot ); distribution['getAvailableVersions'] = async () => []; - await expect(distribution['findPackageForDownload']('11')).rejects.toThrowError( + await expect(distribution['findPackageForDownload']('11')).rejects.toThrow( /Could not find satisfied version for SemVer */ ); }); diff --git a/__tests__/distributors/base-installer.test.ts b/__tests__/distributors/base-installer.test.ts index 44ec50bb..b2c61026 100644 --- a/__tests__/distributors/base-installer.test.ts +++ b/__tests__/distributors/base-installer.test.ts @@ -5,7 +5,7 @@ import * as util from '../../src/util'; import path from 'path'; import * as semver from 'semver'; -import { JavaBase } from '../../src/distributions/base-installer'; +import {JavaBase} from '../../src/distributions/base-installer'; import { JavaDownloadRelease, JavaInstallerOptions, @@ -19,14 +19,23 @@ class EmptyJavaBase extends JavaBase { super('Empty', installerOptions); } - protected async downloadTool(javaRelease: JavaDownloadRelease): Promise { + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { return { version: '11.0.9', - path: path.join('toolcache', this.toolcacheFolderName, '11.0.9', this.architecture) + path: path.join( + 'toolcache', + this.toolcacheFolderName, + '11.0.9', + this.architecture + ) }; } - protected async findPackageForDownload(range: string): Promise { + protected async findPackageForDownload( + range: string + ): Promise { const availableVersion = '11.0.9'; if (!semver.satisfies(availableVersion, range)) { throw new Error('Available version not found'); @@ -60,44 +69,111 @@ describe('findInToolcache', () => { it.each([ [ - { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, - { version: actualJavaVersion, path: javaPath } + { + version: '11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, + {version: actualJavaVersion, path: javaPath} ], [ - { version: '11.0', architecture: 'x64', packageType: 'jdk', checkLatest: false }, - { version: actualJavaVersion, path: javaPath } + { + version: '11.0', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, + {version: actualJavaVersion, path: javaPath} ], [ - { version: '11.0.8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, - { version: actualJavaVersion, path: javaPath } + { + version: '11.0.8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, + {version: actualJavaVersion, path: javaPath} ], [ - { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: true }, - { version: actualJavaVersion, path: javaPath } + { + version: '11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: true + }, + {version: actualJavaVersion, path: javaPath} ], [ - { version: '11.0', architecture: 'x64', packageType: 'jdk', checkLatest: true }, - { version: actualJavaVersion, path: javaPath } + { + version: '11.0', + architecture: 'x64', + packageType: 'jdk', + checkLatest: true + }, + {version: actualJavaVersion, path: javaPath} ], [ - { version: '11.0.8', architecture: 'x64', packageType: 'jdk', checkLatest: true }, - { version: actualJavaVersion, path: javaPath } + { + version: '11.0.8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: true + }, + {version: actualJavaVersion, path: javaPath} ], - [{ version: '11', architecture: 'x64', packageType: 'jre', checkLatest: false }, null], - [{ version: '8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, null], - [{ version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: false }, null], - [{ version: '11', architecture: 'x86', packageType: 'jre', checkLatest: false }, null] + [ + { + version: '11', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + }, + null + ], + [ + { + version: '8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, + null + ], + [ + { + version: '11', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, + null + ], + [ + { + version: '11', + architecture: 'x86', + packageType: 'jre', + checkLatest: false + }, + null + ] ])(`should find java for path %s -> %s`, (input, expected) => { spyTcFindAllVersions.mockReturnValue([actualJavaVersion]); spyGetToolcachePath.mockImplementation( (toolname: string, javaVersion: string, architecture: string) => { const semverVersion = new semver.Range(javaVersion); - if (path.basename(javaPath) !== architecture || !javaPath.includes(toolname)) { + if ( + path.basename(javaPath) !== architecture || + !javaPath.includes(toolname) + ) { return ''; } - return semver.satisfies(actualJavaVersion, semverVersion) ? javaPath : ''; + return semver.satisfies(actualJavaVersion, semverVersion) + ? javaPath + : ''; } ); mockJavaBase = new EmptyJavaBase(input); @@ -105,52 +181,63 @@ describe('findInToolcache', () => { }); it.each([ - ['11', { version: '11.0.3+2', versionInPath: '11.0.3-2' }], - ['11.0', { version: '11.0.3+2', versionInPath: '11.0.3-2' }], - ['11.0.1', { version: '11.0.1', versionInPath: '11.0.1' }], - ['11.0.3', { version: '11.0.3+2', versionInPath: '11.0.3-2' }], - ['15', { version: '15.0.2+4', versionInPath: '15.0.2-4' }], - ['x', { version: '15.0.2+4', versionInPath: '15.0.2-4' }], - ['x-ea', { version: '17.4.4', versionInPath: '17.4.4-ea' }], - ['11-ea', { version: '11.3.3+5.2.1231421', versionInPath: '11.3.3-ea.5.2.1231421' }], - ['11.2-ea', { version: '11.2.1', versionInPath: '11.2.1-ea' }], - ['11.2.1-ea', { version: '11.2.1', versionInPath: '11.2.1-ea' }] - ])('should choose correct java from tool-cache for input %s', (input, expected) => { - spyTcFindAllVersions.mockReturnValue([ - '17.4.4-ea', - '11.0.2', - '15.0.2-4', - '11.0.3-2', - '11.2.1-ea', - '11.3.2-ea', - '11.3.2-ea.5', - '11.3.3-ea.5.2.1231421', - '12.3.2-0', - '11.0.1' - ]); - spyGetToolcachePath.mockImplementation( - (toolname: string, javaVersion: string, architecture: string) => - `/hostedtoolcache/${toolname}/${javaVersion}/${architecture}` - ); - mockJavaBase = new EmptyJavaBase({ - version: input, - architecture: 'x64', - packageType: 'jdk', - checkLatest: false - }); - const foundVersion = mockJavaBase['findInToolcache'](); - expect(foundVersion).toEqual({ - version: expected.version, - path: `/hostedtoolcache/Java_Empty_jdk/${expected.versionInPath}/x64` - }); - }); + ['11', {version: '11.0.3+2', versionInPath: '11.0.3-2'}], + ['11.0', {version: '11.0.3+2', versionInPath: '11.0.3-2'}], + ['11.0.1', {version: '11.0.1', versionInPath: '11.0.1'}], + ['11.0.3', {version: '11.0.3+2', versionInPath: '11.0.3-2'}], + ['15', {version: '15.0.2+4', versionInPath: '15.0.2-4'}], + ['x', {version: '15.0.2+4', versionInPath: '15.0.2-4'}], + ['x-ea', {version: '17.4.4', versionInPath: '17.4.4-ea'}], + [ + '11-ea', + {version: '11.3.3+5.2.1231421', versionInPath: '11.3.3-ea.5.2.1231421'} + ], + ['11.2-ea', {version: '11.2.1', versionInPath: '11.2.1-ea'}], + ['11.2.1-ea', {version: '11.2.1', versionInPath: '11.2.1-ea'}] + ])( + 'should choose correct java from tool-cache for input %s', + (input, expected) => { + spyTcFindAllVersions.mockReturnValue([ + '17.4.4-ea', + '11.0.2', + '15.0.2-4', + '11.0.3-2', + '11.2.1-ea', + '11.3.2-ea', + '11.3.2-ea.5', + '11.3.3-ea.5.2.1231421', + '12.3.2-0', + '11.0.1' + ]); + spyGetToolcachePath.mockImplementation( + (toolname: string, javaVersion: string, architecture: string) => + `/hostedtoolcache/${toolname}/${javaVersion}/${architecture}` + ); + mockJavaBase = new EmptyJavaBase({ + version: input, + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + const foundVersion = mockJavaBase['findInToolcache'](); + expect(foundVersion).toEqual({ + version: expected.version, + path: `/hostedtoolcache/Java_Empty_jdk/${expected.versionInPath}/x64` + }); + } + ); }); describe('setupJava', () => { const actualJavaVersion = '11.0.9'; const installedJavaVersion = '11.0.8'; const javaPath = path.join('Java_Empty_jdk', installedJavaVersion, 'x86'); - const javaPathInstalled = path.join('toolcache', 'Java_Empty_jdk', actualJavaVersion, 'x86'); + const javaPathInstalled = path.join( + 'toolcache', + 'Java_Empty_jdk', + actualJavaVersion, + 'x86' + ); let mockJavaBase: EmptyJavaBase; @@ -168,11 +255,16 @@ describe('setupJava', () => { (toolname: string, javaVersion: string, architecture: string) => { const semverVersion = new semver.Range(javaVersion); - if (path.basename(javaPath) !== architecture || !javaPath.includes(toolname)) { + if ( + path.basename(javaPath) !== architecture || + !javaPath.includes(toolname) + ) { return ''; } - return semver.satisfies(installedJavaVersion, semverVersion) ? javaPath : ''; + return semver.satisfies(installedJavaVersion, semverVersion) + ? javaPath + : ''; } ); @@ -206,27 +298,46 @@ describe('setupJava', () => { it.each([ [ - { version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: false }, - { version: installedJavaVersion, path: javaPath } + { + version: '11', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, + {version: installedJavaVersion, path: javaPath} ], [ - { version: '11.0', architecture: 'x86', packageType: 'jdk', checkLatest: false }, - { version: installedJavaVersion, path: javaPath } + { + version: '11.0', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, + {version: installedJavaVersion, path: javaPath} ], [ - { version: '11.0.8', architecture: 'x86', packageType: 'jdk', checkLatest: false }, - { version: installedJavaVersion, path: javaPath } + { + version: '11.0.8', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, + {version: installedJavaVersion, path: javaPath} ], [ - { version: '11', architecture: '', packageType: 'jdk', checkLatest: false }, - { version: installedJavaVersion, path: javaPath } + {version: '11', architecture: '', packageType: 'jdk', checkLatest: false}, + {version: installedJavaVersion, path: javaPath} ] - ])('should find java locally for %s', (input, expected) => { + ])('should find java locally for %s', async (input, expected) => { mockJavaBase = new EmptyJavaBase(input); - expect(mockJavaBase.setupJava()).resolves.toEqual(expected); + await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); expect(spyGetToolcachePath).toHaveBeenCalled(); - expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved Java ${expected.version} from tool-cache`); - expect(spyCoreInfo).toHaveBeenCalledWith(`Setting Java ${expected.version} as the default`); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Resolved Java ${expected.version} from tool-cache` + ); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Setting Java ${expected.version} as the default` + ); expect(spyCoreInfo).not.toHaveBeenCalledWith( 'Trying to resolve the latest version from remote' ); @@ -235,20 +346,47 @@ describe('setupJava', () => { it.each([ [ - { version: '11', architecture: 'x86', packageType: 'jre', checkLatest: false }, - { path: path.join('toolcache', 'Java_Empty_jre', '11.0.9', 'x86'), version: '11.0.9' } + { + version: '11', + architecture: 'x86', + packageType: 'jre', + checkLatest: false + }, + { + path: path.join('toolcache', 'Java_Empty_jre', '11.0.9', 'x86'), + version: '11.0.9' + } ], [ - { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, - { path: path.join('toolcache', 'Java_Empty_jdk', '11.0.9', 'x64'), version: '11.0.9' } + { + version: '11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, + { + path: path.join('toolcache', 'Java_Empty_jdk', '11.0.9', 'x64'), + version: '11.0.9' + } ], [ - { version: '11', architecture: 'x64', packageType: 'jre', checkLatest: false }, - { path: path.join('toolcache', 'Java_Empty_jre', '11.0.9', 'x64'), version: '11.0.9' } + { + version: '11', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + }, + { + path: path.join('toolcache', 'Java_Empty_jre', '11.0.9', 'x64'), + version: '11.0.9' + } ], [ - { version: '11', architecture: '', packageType: 'jre', checkLatest: false }, - { path: path.join('toolcache', 'Java_Empty_jre', '11.0.9', 'x86'), version: '11.0.9' } + {version: '11', architecture: '', packageType: 'jre', checkLatest: false}, + { + path: path.join('toolcache', 'Java_Empty_jre', '11.0.9', 'x86'), + version: '11.0.9' + } ] ])('download java with configuration %s', async (input, expected) => { mockJavaBase = new EmptyJavaBase(input); @@ -257,93 +395,176 @@ describe('setupJava', () => { expect(spyCoreAddPath).toHaveBeenCalled(); expect(spyCoreExportVariable).toHaveBeenCalled(); expect(spyCoreExportVariable).toHaveBeenCalledWith( - `JAVA_HOME_${input.version}_${(input.architecture || 'x86').toLocaleUpperCase()}`, + `JAVA_HOME_${input.version}_${( + input.architecture || 'x86' + ).toLocaleUpperCase()}`, expected.path ); expect(spyCoreSetOutput).toHaveBeenCalled(); - expect(spyCoreInfo).toHaveBeenCalledWith('Trying to resolve the latest version from remote'); - expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved latest version as ${expected.version}`); + expect(spyCoreInfo).toHaveBeenCalledWith( + 'Trying to resolve the latest version from remote' + ); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Resolved latest version as ${expected.version}` + ); expect(spyCoreInfo).toHaveBeenCalledWith('Trying to download...'); - expect(spyCoreInfo).toHaveBeenCalledWith(`Java ${expected.version} was downloaded`); - expect(spyCoreInfo).toHaveBeenCalledWith(`Setting Java ${expected.version} as the default`); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Java ${expected.version} was downloaded` + ); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Setting Java ${expected.version} as the default` + ); }); it.each([ [ - { version: '11.0.9', architecture: 'x86', packageType: 'jdk', checkLatest: true }, - { version: '11.0.9', path: javaPathInstalled } + { + version: '11.0.9', + architecture: 'x86', + packageType: 'jdk', + checkLatest: true + }, + {version: '11.0.9', path: javaPathInstalled} ], [ - { version: '11.0.9', architecture: '', packageType: 'jdk', checkLatest: true }, - { version: '11.0.9', path: javaPathInstalled } + { + version: '11.0.9', + architecture: '', + packageType: 'jdk', + checkLatest: true + }, + {version: '11.0.9', path: javaPathInstalled} ] - ])('should check the latest java version for %s and resolve locally', async (input, expected) => { - mockJavaBase = new EmptyJavaBase(input); - mockJavaBase['findInToolcache'] = () => ({ version: '11.0.9', path: expected.path }); - await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); - expect(spyCoreInfo).toHaveBeenCalledWith('Trying to resolve the latest version from remote'); - expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved latest version as ${expected.version}`); - expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved Java ${expected.version} from tool-cache`); - expect(spyCoreInfo).toHaveBeenCalledWith(`Setting Java ${expected.version} as the default`); - }); + ])( + 'should check the latest java version for %s and resolve locally', + async (input, expected) => { + mockJavaBase = new EmptyJavaBase(input); + mockJavaBase['findInToolcache'] = () => ({ + version: '11.0.9', + path: expected.path + }); + await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); + expect(spyCoreInfo).toHaveBeenCalledWith( + 'Trying to resolve the latest version from remote' + ); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Resolved latest version as ${expected.version}` + ); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Resolved Java ${expected.version} from tool-cache` + ); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Setting Java ${expected.version} as the default` + ); + } + ); it.each([ [ - { version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: true }, - { version: actualJavaVersion, path: javaPathInstalled } + { + version: '11', + architecture: 'x86', + packageType: 'jdk', + checkLatest: true + }, + {version: actualJavaVersion, path: javaPathInstalled} ], [ - { version: '11.0', architecture: 'x86', packageType: 'jdk', checkLatest: true }, - { version: actualJavaVersion, path: javaPathInstalled } + { + version: '11.0', + architecture: 'x86', + packageType: 'jdk', + checkLatest: true + }, + {version: actualJavaVersion, path: javaPathInstalled} ], [ - { version: '11.0.x', architecture: 'x86', packageType: 'jdk', checkLatest: true }, - { version: actualJavaVersion, path: javaPathInstalled } + { + version: '11.0.x', + architecture: 'x86', + packageType: 'jdk', + checkLatest: true + }, + {version: actualJavaVersion, path: javaPathInstalled} ], [ - { version: '11', architecture: '', packageType: 'jdk', checkLatest: true }, - { version: actualJavaVersion, path: javaPathInstalled } + {version: '11', architecture: '', packageType: 'jdk', checkLatest: true}, + {version: actualJavaVersion, path: javaPathInstalled} ] - ])('should check the latest java version for %s and download', async (input, expected) => { - mockJavaBase = new EmptyJavaBase(input); - await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); - expect(spyGetToolcachePath).toHaveBeenCalled(); - expect(spyCoreInfo).toHaveBeenCalledWith('Trying to resolve the latest version from remote'); - expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved latest version as ${actualJavaVersion}`); - expect(spyCoreInfo).toHaveBeenCalledWith('Trying to download...'); - expect(spyCoreInfo).toHaveBeenCalledWith(`Java ${actualJavaVersion} was downloaded`); - expect(spyCoreInfo).toHaveBeenCalledWith(`Setting Java ${expected.version} as the default`); - }); + ])( + 'should check the latest java version for %s and download', + async (input, expected) => { + mockJavaBase = new EmptyJavaBase(input); + await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); + expect(spyGetToolcachePath).toHaveBeenCalled(); + expect(spyCoreInfo).toHaveBeenCalledWith( + 'Trying to resolve the latest version from remote' + ); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Resolved latest version as ${actualJavaVersion}` + ); + expect(spyCoreInfo).toHaveBeenCalledWith('Trying to download...'); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Java ${actualJavaVersion} was downloaded` + ); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Setting Java ${expected.version} as the default` + ); + } + ); it.each([ - [{ version: '15', architecture: 'x86', packageType: 'jre', checkLatest: false }], - [{ version: '11.0.7', architecture: 'x64', packageType: 'jre', checkLatest: false }] - ])('should throw an error for Available version not found for %s', async input => { - mockJavaBase = new EmptyJavaBase(input); - await expect(mockJavaBase.setupJava()).rejects.toThrowError('Available version not found'); - expect(spyTcFindAllVersions).toHaveBeenCalled(); - expect(spyCoreAddPath).not.toHaveBeenCalled(); - expect(spyCoreExportVariable).not.toHaveBeenCalled(); - expect(spyCoreSetOutput).not.toHaveBeenCalled(); - }); + [ + { + version: '15', + architecture: 'x86', + packageType: 'jre', + checkLatest: false + } + ], + [ + { + version: '11.0.7', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + } + ] + ])( + 'should throw an error for Available version not found for %s', + async input => { + mockJavaBase = new EmptyJavaBase(input); + await expect(mockJavaBase.setupJava()).rejects.toThrow( + 'Available version not found' + ); + expect(spyTcFindAllVersions).toHaveBeenCalled(); + expect(spyCoreAddPath).not.toHaveBeenCalled(); + expect(spyCoreExportVariable).not.toHaveBeenCalled(); + expect(spyCoreSetOutput).not.toHaveBeenCalled(); + } + ); }); describe('normalizeVersion', () => { const DummyJavaBase = JavaBase as any; it.each([ - ['11', { version: '11', stable: true }], - ['11.0', { version: '11.0', stable: true }], - ['11.0.10', { version: '11.0.10', stable: true }], - ['11-ea', { version: '11', stable: false }], - ['11.0.2-ea', { version: '11.0.2', stable: false }] + ['11', {version: '11', stable: true}], + ['11.0', {version: '11.0', stable: true}], + ['11.0.10', {version: '11.0.10', stable: true}], + ['11-ea', {version: '11', stable: false}], + ['11.0.2-ea', {version: '11.0.2', stable: false}] ])('normalizeVersion from %s to %s', (input, expected) => { - expect(DummyJavaBase.prototype.normalizeVersion.call(null, input)).toEqual(expected); + expect(DummyJavaBase.prototype.normalizeVersion.call(null, input)).toEqual( + expected + ); }); it('normalizeVersion should throw an error for non semver', () => { const version = '11g'; - expect(DummyJavaBase.prototype.normalizeVersion.bind(null, version)).toThrowError( + expect( + DummyJavaBase.prototype.normalizeVersion.bind(null, version) + ).toThrow( `The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information` ); }); @@ -353,14 +574,14 @@ describe('getToolcacheVersionName', () => { const DummyJavaBase = JavaBase as any; it.each([ - [{ version: '11', stable: true }, '11'], - [{ version: '11.0.2', stable: true }, '11.0.2'], - [{ version: '11.0.2+4', stable: true }, '11.0.2-4'], - [{ version: '11.0.2+4.1.2563234', stable: true }, '11.0.2-4.1.2563234'], - [{ version: '11.0', stable: false }, '11.0-ea'], - [{ version: '11.0.3', stable: false }, '11.0.3-ea'], - [{ version: '11.0.3+4', stable: false }, '11.0.3-ea.4'], - [{ version: '11.0.3+4.2.256', stable: false }, '11.0.3-ea.4.2.256'] + [{version: '11', stable: true}, '11'], + [{version: '11.0.2', stable: true}, '11.0.2'], + [{version: '11.0.2+4', stable: true}, '11.0.2-4'], + [{version: '11.0.2+4.1.2563234', stable: true}, '11.0.2-4.1.2563234'], + [{version: '11.0', stable: false}, '11.0-ea'], + [{version: '11.0.3', stable: false}, '11.0.3-ea'], + [{version: '11.0.3+4', stable: false}, '11.0.3-ea.4'], + [{version: '11.0.3+4.2.256', stable: false}, '11.0.3-ea.4.2.256'] ])('returns correct version name for %s', (input, expected) => { const inputVersion = input.stable ? '11' : '11-ea'; const mockJavaBase = new EmptyJavaBase({ diff --git a/__tests__/distributors/corretto-installer.test.ts b/__tests__/distributors/corretto-installer.test.ts index eae259da..a8ffef22 100644 --- a/__tests__/distributors/corretto-installer.test.ts +++ b/__tests__/distributors/corretto-installer.test.ts @@ -1,12 +1,12 @@ -import { HttpClient } from '@actions/http-client'; -import { JavaInstallerOptions } from '../../src/distributions/base-models'; +import {HttpClient} from '@actions/http-client'; +import {JavaInstallerOptions} from '../../src/distributions/base-models'; -import { CorrettoDistribution } from '../../src/distributions/corretto/installer'; +import {CorrettoDistribution} from '../../src/distributions/corretto/installer'; import * as util from '../../src/util'; import os from 'os'; -import { isGeneratorFunction } from 'util/types'; +import {isGeneratorFunction} from 'util/types'; -const manifestData = require('../data/corretto.json') as []; +import manifestData from '../data/corretto.json'; describe('getAvailableVersions', () => { let spyHttpClient: jest.SpyInstance; @@ -19,7 +19,10 @@ describe('getAvailableVersions', () => { headers: {}, result: manifestData }); - spyGetDownloadArchiveExtension = jest.spyOn(util, 'getDownloadArchiveExtension'); + spyGetDownloadArchiveExtension = jest.spyOn( + util, + 'getDownloadArchiveExtension' + ); }); afterEach(() => { @@ -44,16 +47,66 @@ describe('getAvailableVersions', () => { }); it.each([ - [{ version: '16', architecture: 'x64', packageType: 'jdk', checkLatest: false }, 'macos', 6], - [{ version: '16', architecture: 'x86', packageType: 'jdk', checkLatest: false }, 'macos', 0], - [{ version: '16', architecture: 'x64', packageType: 'jre', checkLatest: false }, 'macos', 0], - [{ version: '16', architecture: 'x64', packageType: 'jdk', checkLatest: false }, 'linux', 6], [ - { version: '18', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '16', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, + 'macos', + 6 + ], + [ + { + version: '16', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, + 'macos', + 0 + ], + [ + { + version: '16', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + }, + 'macos', + 0 + ], + [ + { + version: '16', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, + 'linux', + 6 + ], + [ + { + version: '18', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, 'windows', 6 ], - [{ version: '18', architecture: 'x64', packageType: 'jre', checkLatest: false }, 'windows', 1] + [ + { + version: '18', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + }, + 'windows', + 1 + ] ])( 'fetch expected amount of available versions for %s', async ( @@ -66,7 +119,9 @@ describe('getAvailableVersions', () => { const availableVersions = await distribution['getAvailableVersions'](); expect(availableVersions).not.toBeNull(); - expect(availableVersions.length).toBe(expectedAmountOfAvailableVersions); + expect(availableVersions.length).toBe( + expectedAmountOfAvailableVersions + ); } ); }); @@ -95,7 +150,9 @@ describe('getAvailableVersions', () => { }); mockPlatform(distribution, platform); - const availableVersion = await distribution['findPackageForDownload'](version); + const availableVersion = await distribution['findPackageForDownload']( + version + ); expect(availableVersion).not.toBeNull(); expect(availableVersion.url).toBe(expectedLink); }); @@ -110,9 +167,9 @@ describe('getAvailableVersions', () => { }); mockPlatform(distribution, 'linux'); - await expect(distribution['findPackageForDownload'](version)).rejects.toThrowError( - 'Early access versions are not supported' - ); + await expect( + distribution['findPackageForDownload'](version) + ).rejects.toThrow('Early access versions are not supported'); }); it('with non major version expect to throw not supported error', async () => { @@ -125,9 +182,9 @@ describe('getAvailableVersions', () => { }); mockPlatform(distribution, 'linux'); - await expect(distribution['findPackageForDownload'](version)).rejects.toThrowError( - 'Only major versions are supported' - ); + await expect( + distribution['findPackageForDownload'](version) + ).rejects.toThrow('Only major versions are supported'); }); it('with unfound version throw could not find error', async () => { @@ -140,9 +197,9 @@ describe('getAvailableVersions', () => { }); mockPlatform(distribution, 'linux'); - await expect(distribution['findPackageForDownload'](version)).rejects.toThrowError( - "Could not find satisfied version for SemVer '4'" - ); + await expect( + distribution['findPackageForDownload'](version) + ).rejects.toThrow("Could not find satisfied version for SemVer '4'"); }); it.each([ @@ -166,14 +223,19 @@ describe('getAvailableVersions', () => { const expectedLink = `https://corretto.aws/downloads/resources/17.0.2.8.1/amazon-corretto-17.0.2.8.1-macosx-${distroArch}.tar.gz`; - const availableVersion = await distribution['findPackageForDownload'](version); + const availableVersion = await distribution['findPackageForDownload']( + version + ); expect(availableVersion).not.toBeNull(); expect(availableVersion.url).toBe(expectedLink); } ); }); - const mockPlatform = (distribution: CorrettoDistribution, platform: string) => { + const mockPlatform = ( + distribution: CorrettoDistribution, + platform: string + ) => { distribution['getPlatformOption'] = () => platform; const mockedExtension = platform === 'windows' ? 'zip' : 'tar.gz'; spyGetDownloadArchiveExtension.mockReturnValue(mockedExtension); diff --git a/__tests__/distributors/liberica-installer.test.ts b/__tests__/distributors/liberica-installer.test.ts index 18135f29..33a51017 100644 --- a/__tests__/distributors/liberica-installer.test.ts +++ b/__tests__/distributors/liberica-installer.test.ts @@ -1,9 +1,12 @@ -import { LibericaDistributions } from '../../src/distributions/liberica/installer'; -import { ArchitectureOptions, LibericaVersion } from '../../src/distributions/liberica/models'; -import { HttpClient } from '@actions/http-client'; +import {LibericaDistributions} from '../../src/distributions/liberica/installer'; +import { + ArchitectureOptions, + LibericaVersion +} from '../../src/distributions/liberica/models'; +import {HttpClient} from '@actions/http-client'; import os from 'os'; -const manifestData = require('../data/liberica.json') as LibericaVersion[]; +import manifestData from '../data/liberica.json'; describe('getAvailableVersions', () => { let spyHttpClient: jest.SpyInstance; @@ -13,7 +16,7 @@ describe('getAvailableVersions', () => { spyHttpClient.mockReturnValue({ statusCode: 200, headers: {}, - result: manifestData + result: manifestData as LibericaVersion[] }); }); @@ -25,27 +28,57 @@ describe('getAvailableVersions', () => { it.each([ [ - { version: '11.x', architecture: 'x86', packageType: 'jdk', checkLatest: false }, + { + version: '11.x', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, 'bundle-type=jdk&bitness=32&arch=x86&build-type=all' ], [ - { version: '11-ea', architecture: 'x86', packageType: 'jdk', checkLatest: false }, + { + version: '11-ea', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, 'bundle-type=jdk&bitness=32&arch=x86&build-type=ea' ], [ - { version: '16.0.2', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '16.0.2', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, 'bundle-type=jdk&bitness=64&arch=x86&build-type=all' ], [ - { version: '16.0.2', architecture: 'x64', packageType: 'jre', checkLatest: false }, + { + version: '16.0.2', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + }, 'bundle-type=jre&bitness=64&arch=x86&build-type=all' ], [ - { version: '8', architecture: 'armv7', packageType: 'jdk+fx', checkLatest: false }, + { + version: '8', + architecture: 'armv7', + packageType: 'jdk+fx', + checkLatest: false + }, 'bundle-type=jdk-full&bitness=32&arch=arm&build-type=all' ], [ - { version: '8', architecture: 'aarch64', packageType: 'jre+fx', checkLatest: false }, + { + version: '8', + architecture: 'aarch64', + packageType: 'jre+fx', + checkLatest: false + }, 'bundle-type=jre-full&bitness=64&arch=arm&build-type=all' ] ])('build correct url for %s -> %s', async (input, urlParams) => { @@ -67,8 +100,8 @@ describe('getAvailableVersions', () => { arch: string; }; it.each([ - ['amd64', { bitness: '64', arch: 'x86' }], - ['arm64', { bitness: '64', arch: 'arm' }] + ['amd64', {bitness: '64', arch: 'x86'}], + ['arm64', {bitness: '64', arch: 'arm'}] ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: DistroArch) => { @@ -109,21 +142,24 @@ describe('getAvailableVersions', () => { describe('getArchitectureOptions', () => { it.each([ - ['x86', { bitness: '32', arch: 'x86' }], - ['x64', { bitness: '64', arch: 'x86' }], - ['armv7', { bitness: '32', arch: 'arm' }], - ['aarch64', { bitness: '64', arch: 'arm' }], - ['ppc64le', { bitness: '64', arch: 'ppc' }] - ] as [string, ArchitectureOptions][])('parse architecture %s -> %s', (input, expected) => { - const distributions = new LibericaDistributions({ - architecture: input, - checkLatest: false, - packageType: '', - version: '' - }); + ['x86', {bitness: '32', arch: 'x86'}], + ['x64', {bitness: '64', arch: 'x86'}], + ['armv7', {bitness: '32', arch: 'arm'}], + ['aarch64', {bitness: '64', arch: 'arm'}], + ['ppc64le', {bitness: '64', arch: 'ppc'}] + ] as [string, ArchitectureOptions][])( + 'parse architecture %s -> %s', + (input, expected) => { + const distributions = new LibericaDistributions({ + architecture: input, + checkLatest: false, + packageType: '', + version: '' + }); - expect(distributions['getArchitectureOptions']()).toEqual(expected); - }); + expect(distributions['getArchitectureOptions']()).toEqual(expected); + } + ); it.each(['armv6', 's390x'])('not support architecture %s', input => { const distributions = new LibericaDistributions({ @@ -199,9 +235,9 @@ describe('getPlatformOption', () => { it.each(['aix', 'android', 'freebsd', 'openbsd', 'netbsd'])( 'not support os version %s', input => { - expect(() => distributions['getPlatformOption'](input as NodeJS.Platform)).toThrow( - /Platform '\w+' is not supported\. Supported platforms: .+/ - ); + expect(() => + distributions['getPlatformOption'](input as NodeJS.Platform) + ).toThrow(/Platform '\w+' is not supported\. Supported platforms: .+/); } ); }); @@ -215,9 +251,33 @@ describe('convertVersionToSemver', () => { }); it.each([ - [{ featureVersion: 11, interimVersion: 0, updateVersion: 12, buildVersion: 7 }, '11.0.12+7'], - [{ featureVersion: 11, interimVersion: 0, updateVersion: 12, buildVersion: 0 }, '11.0.12'], - [{ featureVersion: 11, interimVersion: 0, updateVersion: 0, buildVersion: 13 }, '11.0.0+13'] + [ + { + featureVersion: 11, + interimVersion: 0, + updateVersion: 12, + buildVersion: 7 + }, + '11.0.12+7' + ], + [ + { + featureVersion: 11, + interimVersion: 0, + updateVersion: 12, + buildVersion: 0 + }, + '11.0.12' + ], + [ + { + featureVersion: 11, + interimVersion: 0, + updateVersion: 0, + buildVersion: 13 + }, + '11.0.0+13' + ] ])('%s -> %s', (input, expected) => { const actual = distributions['convertVersionToSemver']({ downloadUrl: '', diff --git a/__tests__/distributors/local-installer.test.ts b/__tests__/distributors/local-installer.test.ts index e1a4a4bb..825ea983 100644 --- a/__tests__/distributors/local-installer.test.ts +++ b/__tests__/distributors/local-installer.test.ts @@ -7,7 +7,7 @@ import path from 'path'; import * as semver from 'semver'; import * as util from '../../src/util'; -import { LocalDistribution } from '../../src/distributions/local/installer'; +import {LocalDistribution} from '../../src/distributions/local/installer'; describe('setupJava', () => { const actualJavaVersion = '11.1.10'; @@ -27,7 +27,7 @@ describe('setupJava', () => { let spyFsReadDir: jest.SpyInstance; let spyUtilsExtractJdkFile: jest.SpyInstance; let spyPathResolve: jest.SpyInstance; - let expectedJdkFile = 'JavaLocalJdkFile'; + const expectedJdkFile = 'JavaLocalJdkFile'; beforeEach(() => { spyGetToolcachePath = jest.spyOn(util, 'getToolcachePath'); @@ -35,18 +35,27 @@ describe('setupJava', () => { (toolname: string, javaVersion: string, architecture: string) => { const semverVersion = new semver.Range(javaVersion); - if (path.basename(javaPath) !== architecture || !javaPath.includes(toolname)) { + if ( + path.basename(javaPath) !== architecture || + !javaPath.includes(toolname) + ) { return ''; } - return semver.satisfies(actualJavaVersion, semverVersion) ? javaPath : ''; + return semver.satisfies(actualJavaVersion, semverVersion) + ? javaPath + : ''; } ); spyTcCacheDir = jest.spyOn(tc, 'cacheDir'); spyTcCacheDir.mockImplementation( - (archivePath: string, toolcacheFolderName: string, version: string, architecture: string) => - path.join(toolcacheFolderName, version, architecture) + ( + archivePath: string, + toolcacheFolderName: string, + version: string, + architecture: string + ) => path.join(toolcacheFolderName, version, architecture) ); spyTcFindAllVersions = jest.spyOn(tc, 'findAllVersions'); @@ -74,7 +83,7 @@ describe('setupJava', () => { spyFsStat = jest.spyOn(fs, 'statSync'); spyFsStat.mockImplementation((file: string) => { - return { isFile: () => file === expectedJdkFile }; + return {isFile: () => file === expectedJdkFile}; }); // Spy on util methods @@ -108,7 +117,9 @@ describe('setupJava', () => { mockJavaBase = new LocalDistribution(inputs, jdkFile); await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); expect(spyGetToolcachePath).toHaveBeenCalled(); - expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved Java ${actualJavaVersion} from tool-cache`); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Resolved Java ${actualJavaVersion} from tool-cache` + ); expect(spyCoreInfo).not.toHaveBeenCalledWith( `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` ); @@ -130,7 +141,9 @@ describe('setupJava', () => { mockJavaBase = new LocalDistribution(inputs, jdkFile); await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); expect(spyGetToolcachePath).toHaveBeenCalled(); - expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved Java ${actualJavaVersion} from tool-cache`); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Resolved Java ${actualJavaVersion} from tool-cache` + ); expect(spyCoreInfo).not.toHaveBeenCalledWith( `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` ); @@ -155,7 +168,9 @@ describe('setupJava', () => { expect(spyCoreInfo).not.toHaveBeenCalledWith( `Resolved Java ${actualJavaVersion} from tool-cache` ); - expect(spyCoreInfo).toHaveBeenCalledWith(`Extracting Java from '${jdkFile}'`); + expect(spyCoreInfo).toHaveBeenCalledWith( + `Extracting Java from '${jdkFile}'` + ); expect(spyCoreInfo).toHaveBeenCalledWith( `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` ); @@ -171,19 +186,29 @@ describe('setupJava', () => { const jdkFile = 'not_existing_one'; const expected = { javaVersion: '11.0.289', - javaPath: path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture) + javaPath: path.join( + 'Java_jdkfile_jdk', + inputs.version, + inputs.architecture + ) }; mockJavaBase = new LocalDistribution(inputs, jdkFile); - expected.javaPath = path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture); - await expect(mockJavaBase.setupJava()).rejects.toThrowError( + expected.javaPath = path.join( + 'Java_jdkfile_jdk', + inputs.version, + inputs.architecture + ); + await expect(mockJavaBase.setupJava()).rejects.toThrow( "JDK file was not found in path 'not_existing_one'" ); expect(spyTcFindAllVersions).toHaveBeenCalled(); expect(spyCoreInfo).not.toHaveBeenCalledWith( `Resolved Java ${actualJavaVersion} from tool-cache` ); - expect(spyCoreInfo).not.toHaveBeenCalledWith(`Extracting Java from '${jdkFile}'`); + expect(spyCoreInfo).not.toHaveBeenCalledWith( + `Extracting Java from '${jdkFile}'` + ); expect(spyCoreInfo).toHaveBeenCalledWith( `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` ); @@ -262,26 +287,46 @@ describe('setupJava', () => { it.each([ [ - { version: '8.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '8.0.289', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, 'otherJdkFile' ], [ - { version: '11.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11.0.289', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, 'otherJdkFile' ], [ - { version: '12.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '12.0.289', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, 'otherJdkFile' ], [ - { version: '11.1.11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11.1.11', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, 'not_existing_one' ] ])( `Throw an error if jdkfile has wrong path, inputs %s, jdkfile %s, real name ${expectedJdkFile}`, async (inputs, jdkFile) => { mockJavaBase = new LocalDistribution(inputs, jdkFile); - await expect(mockJavaBase.setupJava()).rejects.toThrowError( + await expect(mockJavaBase.setupJava()).rejects.toThrow( /JDK file was not found in path */ ); expect(spyTcFindAllVersions).toHaveBeenCalled(); @@ -289,18 +334,41 @@ describe('setupJava', () => { ); it.each([ - [{ version: '8.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, ''], [ - { version: '7.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '8.0.289', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, + '' + ], + [ + { + version: '7.0.289', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, undefined ], [ - { version: '11.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '11.0.289', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, undefined ] - ])('Throw an error if jdkfile is not specified, inputs %s', async (inputs, jdkFile) => { - mockJavaBase = new LocalDistribution(inputs, jdkFile); - await expect(mockJavaBase.setupJava()).rejects.toThrowError("'jdkFile' is not specified"); - expect(spyTcFindAllVersions).toHaveBeenCalled(); - }); + ])( + 'Throw an error if jdkfile is not specified, inputs %s', + async (inputs, jdkFile) => { + mockJavaBase = new LocalDistribution(inputs, jdkFile); + await expect(mockJavaBase.setupJava()).rejects.toThrow( + "'jdkFile' is not specified" + ); + expect(spyTcFindAllVersions).toHaveBeenCalled(); + } + ); }); diff --git a/__tests__/distributors/microsoft-installer.test.ts b/__tests__/distributors/microsoft-installer.test.ts index e35d8c8c..15af5784 100644 --- a/__tests__/distributors/microsoft-installer.test.ts +++ b/__tests__/distributors/microsoft-installer.test.ts @@ -1,4 +1,4 @@ -import { MicrosoftDistributions } from '../../src/distributions/microsoft/installer'; +import {MicrosoftDistributions} from '../../src/distributions/microsoft/installer'; import os from 'os'; import data from '../../src/distributions/microsoft/microsoft-openjdk-versions.json'; import * as httpm from '@actions/http-client'; @@ -73,7 +73,9 @@ describe('findPackageForDownload', () => { archive = 'tar.gz'; break; } - const url = expectedUrl.replace('{{OS_TYPE}}', os).replace('{{ARCHIVE_TYPE}}', archive); + const url = expectedUrl + .replace('{{OS_TYPE}}', os) + .replace('{{ARCHIVE_TYPE}}', archive); expect(result.url).toBe(url); }); diff --git a/__tests__/distributors/oracle-installer.test.ts b/__tests__/distributors/oracle-installer.test.ts new file mode 100644 index 00000000..904552ff --- /dev/null +++ b/__tests__/distributors/oracle-installer.test.ts @@ -0,0 +1,99 @@ +import {OracleDistribution} from '../../src/distributions/oracle/installer'; +import os from 'os'; +import * as core from '@actions/core'; +import {getDownloadArchiveExtension} from '../../src/util'; + +describe('findPackageForDownload', () => { + let distribution: OracleDistribution; + let spyDebug: jest.SpyInstance; + + beforeEach(() => { + distribution = new OracleDistribution({ + version: '', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + + spyDebug = jest.spyOn(core, 'debug'); + spyDebug.mockImplementation(() => {}); + }); + + it.each([ + [ + '19', + '19', + 'https://download.oracle.com/java/19/latest/jdk-19_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ], + [ + '19.0.1', + '19.0.1', + 'https://download.oracle.com/java/19/archive/jdk-19.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ], + [ + '18.0.2.1', + '18.0.2.1', + 'https://download.oracle.com/java/18/archive/jdk-18.0.2.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ], + [ + '17', + '17', + 'https://download.oracle.com/java/17/latest/jdk-17_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ], + [ + '17.0.1', + '17.0.1', + 'https://download.oracle.com/java/17/archive/jdk-17.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' + ] + ])('version is %s -> %s', async (input, expectedVersion, expectedUrl) => { + const result = await distribution['findPackageForDownload'](input); + expect(result.version).toBe(expectedVersion); + const osType = distribution.getPlatform(); + const archiveType = getDownloadArchiveExtension(); + const url = expectedUrl + .replace('{{OS_TYPE}}', osType) + .replace('{{ARCHIVE_TYPE}}', archiveType); + expect(result.url).toBe(url); + }); + + it.each([ + ['amd64', 'x64'], + ['arm64', 'aarch64'] + ])( + 'defaults to os.arch(): %s mapped to distro arch: %s', + async (osArch: string, distroArch: string) => { + jest.spyOn(os, 'arch').mockReturnValue(osArch); + jest.spyOn(os, 'platform').mockReturnValue('linux'); + + const version = '17'; + const distro = new OracleDistribution({ + version, + architecture: '', // to get default value + packageType: 'jdk', + checkLatest: false + }); + + const osType = distribution.getPlatform(); + if (osType === 'windows' && distroArch == 'aarch64') { + return; // skip, aarch64 is not available for Windows + } + const archiveType = getDownloadArchiveExtension(); + const result = await distro['findPackageForDownload'](version); + const expectedUrl = `https://download.oracle.com/java/17/latest/jdk-17_${osType}-${distroArch}_bin.${archiveType}`; + + expect(result.url).toBe(expectedUrl); + } + ); + + it('should throw an error', async () => { + await expect(distribution['findPackageForDownload']('8')).rejects.toThrow( + /Oracle JDK is only supported for JDK 17 and later/ + ); + await expect(distribution['findPackageForDownload']('11')).rejects.toThrow( + /Oracle JDK is only supported for JDK 17 and later/ + ); + await expect(distribution['findPackageForDownload']('18')).rejects.toThrow( + /Could not find Oracle JDK for SemVer */ + ); + }); +}); diff --git a/__tests__/distributors/semeru-installer.test.ts b/__tests__/distributors/semeru-installer.test.ts new file mode 100644 index 00000000..97f25cc8 --- /dev/null +++ b/__tests__/distributors/semeru-installer.test.ts @@ -0,0 +1,287 @@ +import {HttpClient} from '@actions/http-client'; + +import {JavaInstallerOptions} from '../../src/distributions/base-models'; +import {SemeruDistribution} from '../../src/distributions/semeru/installer'; + +import manifestData from '../data/semeru.json'; + +describe('getAvailableVersions', () => { + let spyHttpClient: jest.SpyInstance; + + beforeEach(() => { + spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson'); + spyHttpClient.mockReturnValue({ + statusCode: 200, + headers: {}, + result: [] + }); + }); + + afterEach(() => { + jest.resetAllMocks(); + jest.clearAllMocks(); + jest.restoreAllMocks(); + }); + + it.each([ + [ + { + version: '16', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, + 'os=mac&architecture=x64&image_type=jdk&release_type=ga&jvm_impl=openj9&page_size=20&page=0' + ], + [ + { + version: '16', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, + 'os=mac&architecture=x86&image_type=jdk&release_type=ga&jvm_impl=openj9&page_size=20&page=0' + ], + [ + { + version: '16', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + }, + 'os=mac&architecture=x64&image_type=jre&release_type=ga&jvm_impl=openj9&page_size=20&page=0' + ], + [ + { + version: '16', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, + 'os=mac&architecture=x64&image_type=jdk&release_type=ga&jvm_impl=openj9&page_size=20&page=0' + ] + ])( + 'build correct url for %s', + async (installerOptions: JavaInstallerOptions, expectedParameters) => { + const distribution = new SemeruDistribution(installerOptions); + const baseUrl = + 'https://api.adoptopenjdk.net/v3/assets/version/%5B1.0,100.0%5D'; + const expectedUrl = `${baseUrl}?project=jdk&vendor=ibm&heap_size=normal&sort_method=DEFAULT&sort_order=DESC&${expectedParameters}`; + distribution['getPlatformOption'] = () => 'mac'; + + await distribution['getAvailableVersions'](); + + expect(spyHttpClient.mock.calls).toHaveLength(1); + expect(spyHttpClient.mock.calls[0][0]).toBe(expectedUrl); + } + ); + + it('load available versions', async () => { + spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson'); + spyHttpClient + .mockReturnValueOnce({ + statusCode: 200, + headers: {}, + result: manifestData as any + }) + .mockReturnValueOnce({ + statusCode: 200, + headers: {}, + result: manifestData as any + }) + .mockReturnValueOnce({ + statusCode: 200, + headers: {}, + result: [] + }); + + const distribution = new SemeruDistribution({ + version: '8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + const availableVersions = await distribution['getAvailableVersions'](); + expect(availableVersions).not.toBeNull(); + expect(availableVersions.length).toBe(manifestData.length * 2); + }); + + it.each([ + ['jdk', 'Java_IBM_Semeru_jdk'], + ['jre', 'Java_IBM_Semeru_jre'] + ])('find right toolchain folder', (packageType: string, expected: string) => { + const distribution = new SemeruDistribution({ + version: '8', + architecture: 'x64', + packageType: packageType, + checkLatest: false + }); + + // @ts-ignore - because it is protected + expect(distribution.toolcacheFolderName).toBe(expected); + }); +}); + +describe('findPackageForDownload', () => { + it.each([ + ['8', '8.0.322+6'], + ['16', '16.0.2+7'], + ['16.0', '16.0.2+7'], + ['16.0.2', '16.0.2+7'], + ['8.x', '8.0.322+6'], + ['x', '17.0.2+8'] + ])('version is resolved correctly %s -> %s', async (input, expected) => { + const distribution = new SemeruDistribution({ + version: '8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => manifestData as any; + const resolvedVersion = await distribution['findPackageForDownload'](input); + expect(resolvedVersion.version).toBe(expected); + }); + + it('version is found but binaries list is empty', async () => { + const distribution = new SemeruDistribution({ + version: '9.0.8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => manifestData as any; + await expect( + distribution['findPackageForDownload']('9.0.8') + ).rejects.toThrow(/Could not find satisfied version for SemVer */); + }); + + it('version is not found', async () => { + const distribution = new SemeruDistribution({ + version: '7.x', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => manifestData as any; + await expect(distribution['findPackageForDownload']('7.x')).rejects.toThrow( + /Could not find satisfied version for SemVer */ + ); + }); + + it('version list is empty', async () => { + const distribution = new SemeruDistribution({ + version: '8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => []; + await expect(distribution['findPackageForDownload']('8')).rejects.toThrow( + /Could not find satisfied version for SemVer */ + ); + }); + + it.each(['x64', 'x86', 'ppc64le', 'ppc64', 's390x', 'aarch64'])( + 'correct Semeru `%s` architecture resolves', + async (arch: string) => { + const distribution = new SemeruDistribution({ + version: '8', + architecture: arch, + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => manifestData as any; + const resolvedVersion = await distribution['findPackageForDownload']('8'); + expect(resolvedVersion.version).not.toBeNull(); + } + ); + + it.each(['zos', 'z/OS', 'z/os', 'test0987654321=', '++=++', 'myArch'])( + 'incorrect Semeru `%s` architecture throws', + async (arch: string) => { + const distribution = new SemeruDistribution({ + version: '8', + architecture: arch, + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => []; + await expect(distribution['findPackageForDownload']('8')).rejects.toThrow( + `Unsupported architecture for IBM Semeru: ${arch}, the following are supported: x64, x86, ppc64le, ppc64, s390x, aarch64` + ); + } + ); + + it.each(['9-ea', '17-ea', '8-ea', '4-ea'])( + 'early access version are illegal for Semeru (%s)', + async (version: string) => { + const distribution = new SemeruDistribution({ + version: version, + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => manifestData as any; + await expect( + distribution['findPackageForDownload'](version) + ).rejects.toThrow( + 'IBM Semeru does not provide builds for early access versions' + ); + } + ); + + it.each([ + 'jdk+fx', + 'jre+fx', + 'test', + 'test2', + 'jdk-fx', + 'javafx', + 'jdk-javafx', + 'ibm', + ' ' + ])( + 'rejects incorrect `%s` Semeru package type', + async (packageType: string) => { + const distribution = new SemeruDistribution({ + version: '8', + architecture: 'x64', + packageType: packageType, + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => manifestData as any; + await expect(distribution['findPackageForDownload']('8')).rejects.toThrow( + 'IBM Semeru only provide `jdk` and `jre` package types' + ); + } + ); + + it.each(['jdk', 'jre'])( + 'accepts correct `%s` Semeru package type', + async (packageType: string) => { + const distribution = new SemeruDistribution({ + version: '8', + architecture: 'x64', + packageType: packageType, + checkLatest: false + }); + distribution['getAvailableVersions'] = async () => manifestData as any; + const resolvedVersion = await distribution['findPackageForDownload']('8'); + await expect(resolvedVersion.version).toMatch(/8[0-9.]+/); + } + ); + + it('fails when long release name is used', async () => { + expect( + () => + new SemeruDistribution({ + version: 'jdk-16.0.2+7_openj9-0.27.1', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }) + ).toThrow( + "The string 'jdk-16.0.2+7_openj9-0.27.1' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information" + ); + }); +}); diff --git a/__tests__/distributors/temurin-installer.test.ts b/__tests__/distributors/temurin-installer.test.ts index 554668ba..b8c9e7fd 100644 --- a/__tests__/distributors/temurin-installer.test.ts +++ b/__tests__/distributors/temurin-installer.test.ts @@ -1,12 +1,12 @@ -import { HttpClient } from '@actions/http-client'; +import {HttpClient} from '@actions/http-client'; import os from 'os'; import { TemurinDistribution, TemurinImplementation } from '../../src/distributions/temurin/installer'; -import { JavaInstallerOptions } from '../../src/distributions/base-models'; +import {JavaInstallerOptions} from '../../src/distributions/base-models'; -let manifestData = require('../data/temurin.json') as []; +import manifestData from '../data/temurin.json'; describe('getAvailableVersions', () => { let spyHttpClient: jest.SpyInstance; @@ -28,22 +28,42 @@ describe('getAvailableVersions', () => { it.each([ [ - { version: '16', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '16', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, TemurinImplementation.Hotspot, 'os=mac&architecture=x64&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' ], [ - { version: '16', architecture: 'x86', packageType: 'jdk', checkLatest: false }, + { + version: '16', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, TemurinImplementation.Hotspot, 'os=mac&architecture=x86&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' ], [ - { version: '16', architecture: 'x64', packageType: 'jre', checkLatest: false }, + { + version: '16', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + }, TemurinImplementation.Hotspot, 'os=mac&architecture=x64&image_type=jre&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' ], [ - { version: '16-ea', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '16-ea', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, TemurinImplementation.Hotspot, 'os=mac&architecture=x64&image_type=jdk&release_type=ea&jvm_impl=hotspot&page_size=20&page=0' ] @@ -55,7 +75,8 @@ describe('getAvailableVersions', () => { expectedParameters ) => { const distribution = new TemurinDistribution(installerOptions, impl); - const baseUrl = 'https://api.adoptium.net/v3/assets/version/%5B1.0,100.0%5D'; + const baseUrl = + 'https://api.adoptium.net/v3/assets/version/%5B1.0,100.0%5D'; const expectedUrl = `${baseUrl}?project=jdk&vendor=adoptium&heap_size=normal&sort_method=DEFAULT&sort_order=DESC&${expectedParameters}`; distribution['getPlatformOption'] = () => 'mac'; @@ -72,12 +93,12 @@ describe('getAvailableVersions', () => { .mockReturnValueOnce({ statusCode: 200, headers: {}, - result: manifestData + result: manifestData as any }) .mockReturnValueOnce({ statusCode: 200, headers: {}, - result: manifestData + result: manifestData as any }) .mockReturnValueOnce({ statusCode: 200, @@ -86,7 +107,12 @@ describe('getAvailableVersions', () => { }); const distribution = new TemurinDistribution( - { version: '8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, TemurinImplementation.Hotspot ); const availableVersions = await distribution['getAvailableVersions'](); @@ -101,7 +127,12 @@ describe('getAvailableVersions', () => { 'find right toolchain folder', (impl: TemurinImplementation, packageType: string, expected: string) => { const distribution = new TemurinDistribution( - { version: '8', architecture: 'x64', packageType: packageType, checkLatest: false }, + { + version: '8', + architecture: 'x64', + packageType: packageType, + checkLatest: false + }, impl ); @@ -127,8 +158,12 @@ describe('getAvailableVersions', () => { const expectedParameters = `os=mac&architecture=${distroArch}&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0`; - const distribution = new TemurinDistribution(installerOptions, TemurinImplementation.Hotspot); - const baseUrl = 'https://api.adoptium.net/v3/assets/version/%5B1.0,100.0%5D'; + const distribution = new TemurinDistribution( + installerOptions, + TemurinImplementation.Hotspot + ); + const baseUrl = + 'https://api.adoptium.net/v3/assets/version/%5B1.0,100.0%5D'; const expectedUrl = `${baseUrl}?project=jdk&vendor=adoptium&heap_size=normal&sort_method=DEFAULT&sort_order=DESC&${expectedParameters}`; distribution['getPlatformOption'] = () => 'mac'; @@ -150,43 +185,63 @@ describe('findPackageForDownload', () => { ['x', '16.0.2+7'] ])('version is resolved correctly %s -> %s', async (input, expected) => { const distribution = new TemurinDistribution( - { version: '8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, TemurinImplementation.Hotspot ); - distribution['getAvailableVersions'] = async () => manifestData; + distribution['getAvailableVersions'] = async () => manifestData as any; const resolvedVersion = await distribution['findPackageForDownload'](input); expect(resolvedVersion.version).toBe(expected); }); it('version is found but binaries list is empty', async () => { const distribution = new TemurinDistribution( - { version: '9.0.8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '9.0.8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, TemurinImplementation.Hotspot ); - distribution['getAvailableVersions'] = async () => manifestData; - await expect(distribution['findPackageForDownload']('9.0.8')).rejects.toThrowError( - /Could not find satisfied version for SemVer */ - ); + distribution['getAvailableVersions'] = async () => manifestData as any; + await expect( + distribution['findPackageForDownload']('9.0.8') + ).rejects.toThrow(/Could not find satisfied version for SemVer */); }); it('version is not found', async () => { const distribution = new TemurinDistribution( - { version: '7.x', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '7.x', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, TemurinImplementation.Hotspot ); - distribution['getAvailableVersions'] = async () => manifestData; - await expect(distribution['findPackageForDownload']('7.x')).rejects.toThrowError( + distribution['getAvailableVersions'] = async () => manifestData as any; + await expect(distribution['findPackageForDownload']('7.x')).rejects.toThrow( /Could not find satisfied version for SemVer */ ); }); it('version list is empty', async () => { const distribution = new TemurinDistribution( - { version: '8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, TemurinImplementation.Hotspot ); distribution['getAvailableVersions'] = async () => []; - await expect(distribution['findPackageForDownload']('8')).rejects.toThrowError( + await expect(distribution['findPackageForDownload']('8')).rejects.toThrow( /Could not find satisfied version for SemVer */ ); }); diff --git a/__tests__/distributors/zulu-installer.test.ts b/__tests__/distributors/zulu-installer.test.ts index 4a43c789..701be2e1 100644 --- a/__tests__/distributors/zulu-installer.test.ts +++ b/__tests__/distributors/zulu-installer.test.ts @@ -1,11 +1,11 @@ -import { HttpClient } from '@actions/http-client'; +import {HttpClient} from '@actions/http-client'; import * as semver from 'semver'; -import { ZuluDistribution } from '../../src/distributions/zulu/installer'; -import { IZuluVersions } from '../../src/distributions/zulu/models'; +import {ZuluDistribution} from '../../src/distributions/zulu/installer'; +import {IZuluVersions} from '../../src/distributions/zulu/models'; import * as utils from '../../src/util'; import os from 'os'; -const manifestData = require('../data/zulu-releases-default.json') as []; +import manifestData from '../data/zulu-releases-default.json'; describe('getAvailableVersions', () => { let spyHttpClient: jest.SpyInstance; @@ -19,7 +19,10 @@ describe('getAvailableVersions', () => { result: manifestData as IZuluVersions[] }); - spyUtilGetDownloadArchiveExtension = jest.spyOn(utils, 'getDownloadArchiveExtension'); + spyUtilGetDownloadArchiveExtension = jest.spyOn( + utils, + 'getDownloadArchiveExtension' + ); spyUtilGetDownloadArchiveExtension.mockReturnValue('tar.gz'); }); @@ -31,35 +34,75 @@ describe('getAvailableVersions', () => { it.each([ [ - { version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, '?os=macos&ext=tar.gz&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=32&release_status=ga' ], [ - { version: '11-ea', architecture: 'x86', packageType: 'jdk', checkLatest: false }, + { + version: '11-ea', + architecture: 'x86', + packageType: 'jdk', + checkLatest: false + }, '?os=macos&ext=tar.gz&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=32&release_status=ea' ], [ - { version: '8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, + { + version: '8', + architecture: 'x64', + packageType: 'jdk', + checkLatest: false + }, '?os=macos&ext=tar.gz&bundle_type=jdk&javafx=false&arch=x86&hw_bitness=64&release_status=ga' ], [ - { version: '8', architecture: 'x64', packageType: 'jre', checkLatest: false }, + { + version: '8', + architecture: 'x64', + packageType: 'jre', + checkLatest: false + }, '?os=macos&ext=tar.gz&bundle_type=jre&javafx=false&arch=x86&hw_bitness=64&release_status=ga' ], [ - { version: '8', architecture: 'x64', packageType: 'jdk+fx', checkLatest: false }, + { + version: '8', + architecture: 'x64', + packageType: 'jdk+fx', + checkLatest: false + }, '?os=macos&ext=tar.gz&bundle_type=jdk&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx' ], [ - { version: '8', architecture: 'x64', packageType: 'jre+fx', checkLatest: false }, + { + version: '8', + architecture: 'x64', + packageType: 'jre+fx', + checkLatest: false + }, '?os=macos&ext=tar.gz&bundle_type=jre&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx' ], [ - { version: '11', architecture: 'arm64', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'arm64', + packageType: 'jdk', + checkLatest: false + }, '?os=macos&ext=tar.gz&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=64&release_status=ga' ], [ - { version: '11', architecture: 'arm', packageType: 'jdk', checkLatest: false }, + { + version: '11', + architecture: 'arm', + packageType: 'jdk', + checkLatest: false + }, '?os=macos&ext=tar.gz&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=&release_status=ga' ] ])('build correct url for %s -> %s', async (input, parsedUrl) => { @@ -78,8 +121,8 @@ describe('getAvailableVersions', () => { arch: string; }; it.each([ - ['amd64', { bitness: '64', arch: 'x86' }], - ['arm64', { bitness: '64', arch: 'arm' }] + ['amd64', {bitness: '64', arch: 'x86'}], + ['arm64', {bitness: '64', arch: 'arm'}] ])( 'defaults to os.arch(): %s mapped to distro arch: %s', async (osArch: string, distroArch: DistroArch) => { @@ -115,10 +158,10 @@ describe('getAvailableVersions', () => { describe('getArchitectureOptions', () => { it.each([ - [{ architecture: 'x64' }, { arch: 'x86', hw_bitness: '64', abi: '' }], - [{ architecture: 'x86' }, { arch: 'x86', hw_bitness: '32', abi: '' }], - [{ architecture: 'x32' }, { arch: 'x32', hw_bitness: '', abi: '' }], - [{ architecture: 'arm' }, { arch: 'arm', hw_bitness: '', abi: '' }] + [{architecture: 'x64'}, {arch: 'x86', hw_bitness: '64', abi: ''}], + [{architecture: 'x86'}, {arch: 'x86', hw_bitness: '32', abi: ''}], + [{architecture: 'x32'}, {arch: 'x32', hw_bitness: '', abi: ''}], + [{architecture: 'arm'}, {arch: 'arm', hw_bitness: '', abi: ''}] ])('%s -> %s', (input, expected) => { const distribution = new ZuluDistribution({ version: '11', @@ -151,7 +194,9 @@ describe('findPackageForDownload', () => { checkLatest: false }); distribution['getAvailableVersions'] = async () => manifestData; - const result = await distribution['findPackageForDownload'](distribution['version']); + const result = await distribution['findPackageForDownload']( + distribution['version'] + ); expect(result.version).toBe(expected); }); @@ -179,7 +224,7 @@ describe('findPackageForDownload', () => { distribution['getAvailableVersions'] = async () => manifestData; await expect( distribution['findPackageForDownload'](distribution['version']) - ).rejects.toThrowError(/Could not find satisfied version for semver */); + ).rejects.toThrow(/Could not find satisfied version for semver */); }); }); diff --git a/__tests__/gpg.test.ts b/__tests__/gpg.test.ts index 5288f9ee..1c981b3f 100644 --- a/__tests__/gpg.test.ts +++ b/__tests__/gpg.test.ts @@ -1,6 +1,7 @@ -import path = require('path'); -import io = require('@actions/io'); -import exec = require('@actions/exec'); +import * as path from 'path'; +import * as io from '@actions/io'; +import * as exec from '@actions/exec'; +import * as gpg from '../src/gpg'; jest.mock('@actions/exec', () => { return { @@ -11,8 +12,6 @@ jest.mock('@actions/exec', () => { const tempDir = path.join(__dirname, 'runner', 'temp'); process.env['RUNNER_TEMP'] = tempDir; -import gpg = require('../src/gpg'); - describe('gpg tests', () => { beforeEach(async () => { await io.mkdirP(tempDir); @@ -33,7 +32,11 @@ describe('gpg tests', () => { expect(keyId).toBeNull(); - expect(exec.exec).toHaveBeenCalledWith('gpg', expect.anything(), expect.anything()); + expect(exec.exec).toHaveBeenCalledWith( + 'gpg', + expect.anything(), + expect.anything() + ); }); }); @@ -42,7 +45,11 @@ describe('gpg tests', () => { const keyId = 'asdfhjkl'; await gpg.deleteKey(keyId); - expect(exec.exec).toHaveBeenCalledWith('gpg', expect.anything(), expect.anything()); + expect(exec.exec).toHaveBeenCalledWith( + 'gpg', + expect.anything(), + expect.anything() + ); }); }); }); diff --git a/__tests__/toolchains.test.ts b/__tests__/toolchains.test.ts index ff6fdab0..a3feb205 100644 --- a/__tests__/toolchains.test.ts +++ b/__tests__/toolchains.test.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import * as core from '@actions/core'; import * as io from '@actions/io'; import * as toolchains from '../src/toolchains'; -import { M2_DIR, MVN_TOOLCHAINS_FILE } from '../src/constants'; +import {M2_DIR, MVN_TOOLCHAINS_FILE} from '../src/constants'; const m2Dir = path.join(__dirname, M2_DIR); const toolchainsFile = path.join(m2Dir, MVN_TOOLCHAINS_FILE); @@ -168,7 +168,7 @@ describe('toolchains tests', () => { `; - fs.mkdirSync(m2Dir, { recursive: true }); + fs.mkdirSync(m2Dir, {recursive: true}); fs.writeFileSync(toolchainsFile, originalFile); expect(fs.existsSync(m2Dir)).toBe(true); expect(fs.existsSync(toolchainsFile)).toBe(true); @@ -223,7 +223,7 @@ describe('toolchains tests', () => { `; - fs.mkdirSync(m2Dir, { recursive: true }); + fs.mkdirSync(m2Dir, {recursive: true}); fs.writeFileSync(toolchainsFile, originalFile); expect(fs.existsSync(m2Dir)).toBe(true); expect(fs.existsSync(toolchainsFile)).toBe(true); @@ -279,14 +279,26 @@ describe('toolchains tests', () => { const version = '17'; const distributionName = 'temurin'; const id = 'temurin_17'; - const jdkHome = '/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.1-12/x64'; + const jdkHome = + '/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.1-12/x64'; - await toolchains.configureToolchains(version, distributionName, jdkHome, undefined); + await toolchains.configureToolchains( + version, + distributionName, + jdkHome, + undefined + ); expect(fs.existsSync(m2Dir)).toBe(true); expect(fs.existsSync(toolchainsFile)).toBe(true); expect(fs.readFileSync(toolchainsFile, 'utf-8')).toEqual( - toolchains.generateToolchainDefinition('', version, distributionName, id, jdkHome) + toolchains.generateToolchainDefinition( + '', + version, + distributionName, + id, + jdkHome + ) ); }, 100000); }); diff --git a/__tests__/util.test.ts b/__tests__/util.test.ts index 9815c950..51de35af 100644 --- a/__tests__/util.test.ts +++ b/__tests__/util.test.ts @@ -1,6 +1,6 @@ import * as cache from '@actions/cache'; import * as core from '@actions/core'; -import { isVersionSatisfies, isCacheFeatureAvailable } from '../src/util'; +import {isVersionSatisfies, isCacheFeatureAvailable} from '../src/util'; jest.mock('@actions/cache'); jest.mock('@actions/core'); @@ -20,23 +20,25 @@ describe('isVersionSatisfies', () => { ['2.5.1+3', '2.5.1+2', false], ['15.0.0+14', '15.0.0+14.1.202003190635', false], ['15.0.0+14.1.202003190635', '15.0.0+14.1.202003190635', true] - ])('%s, %s -> %s', (inputRange: string, inputVersion: string, expected: boolean) => { - const actual = isVersionSatisfies(inputRange, inputVersion); - expect(actual).toBe(expected); - }); + ])( + '%s, %s -> %s', + (inputRange: string, inputVersion: string, expected: boolean) => { + const actual = isVersionSatisfies(inputRange, inputVersion); + expect(actual).toBe(expected); + } + ); }); describe('isCacheFeatureAvailable', () => { it('isCacheFeatureAvailable disabled on GHES', () => { jest.spyOn(cache, 'isFeatureAvailable').mockImplementation(() => false); + const infoMock = jest.spyOn(core, 'warning'); + const message = + 'Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.'; try { process.env['GITHUB_SERVER_URL'] = 'http://example.com'; - isCacheFeatureAvailable(); - } catch (error) { - expect(error).toHaveProperty( - 'message', - 'Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.' - ); + expect(isCacheFeatureAvailable()).toBeFalsy(); + expect(infoMock).toHaveBeenCalledWith(message); } finally { delete process.env['GITHUB_SERVER_URL']; } @@ -45,7 +47,8 @@ describe('isCacheFeatureAvailable', () => { it('isCacheFeatureAvailable disabled on dotcom', () => { jest.spyOn(cache, 'isFeatureAvailable').mockImplementation(() => false); const infoMock = jest.spyOn(core, 'warning'); - const message = 'The runner was not able to contact the cache service. Caching will be skipped'; + const message = + 'The runner was not able to contact the cache service. Caching will be skipped'; try { process.env['GITHUB_SERVER_URL'] = 'http://github.com'; expect(isCacheFeatureAvailable()).toBe(false); diff --git a/__tests__/verify-java.sh b/__tests__/verify-java.sh index 1bad5d35..069d9008 100755 --- a/__tests__/verify-java.sh +++ b/__tests__/verify-java.sh @@ -24,7 +24,7 @@ fi ACTUAL_JAVA_VERSION="$(java -version 2>&1)" echo "Found java version: $ACTUAL_JAVA_VERSION" -GREP_RESULT=$(echo $ACTUAL_JAVA_VERSION | grep "^openjdk version \"$EXPECTED_JAVA_VERSION") +GREP_RESULT=$(echo $ACTUAL_JAVA_VERSION | grep -E "^(openjdk|java) version \"$EXPECTED_JAVA_VERSION") if [ -z "$GREP_RESULT" ]; then echo "::error::Unexpected version" echo "Expected version: $EXPECTED_JAVA_VERSION" diff --git a/action.yml b/action.yml index 3ace2c66..2c0f7aba 100644 --- a/action.yml +++ b/action.yml @@ -5,7 +5,8 @@ author: 'GitHub' inputs: java-version: description: 'The Java version to set up. Takes a whole or semver Java version. See examples of supported syntax in README file' - required: true + java-version-file: + description: 'The path to the `.java-version` file. See examples of supported syntax in README file' distribution: description: 'Java distribution. See the list of supported distributions in README file' required: true @@ -59,8 +60,8 @@ inputs: description: 'Workaround to pass job status to post job step. This variable is not intended for manual setting' default: ${{ job.status }} token: - description: Used to pull java versions from setup-java. Since there is a default value, token is typically not supplied by the user. - default: ${{ github.token }} + description: The token used to authenticate when fetching version manifests hosted on github.com, such as for the Microsoft Build of OpenJDK. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting. + default: ${{ github.server_url == 'https://github.com' && github.token || '' }} mvn-toolchain-id: description: 'Name of Maven Toolchain ID if the default name of "${distribution}_${java-version}" is not wanted. See examples of supported syntax in Advanced Usage file' required: false diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 82e68651..4481094c 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -12763,312 +12763,312 @@ exports.AbortSignal = AbortSignal; /***/ 9268: /***/ ((module) => { -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __createBinding; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); /***/ }), @@ -21547,312 +21547,312 @@ module.exports = '4.0.0' /***/ 2107: /***/ ((module) => { -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __createBinding; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); /***/ }), @@ -23347,312 +23347,312 @@ exports.getPagedAsyncIterator = getPagedAsyncIterator; /***/ 6429: /***/ ((module) => { -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __createBinding; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); /***/ }), @@ -48891,312 +48891,312 @@ exports.newPipeline = newPipeline; /***/ 679: /***/ ((module) => { -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __createBinding; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); /***/ }), @@ -53331,10 +53331,10 @@ function populateMaps (extensions, types) { module.exports = minimatch minimatch.Minimatch = Minimatch -var path = { sep: '/' } -try { - path = __nccwpck_require__(1017) -} catch (er) {} +var path = (function () { try { return __nccwpck_require__(1017) } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = __nccwpck_require__(3717) @@ -53386,43 +53386,64 @@ function filter (pattern, options) { } function ext (a, b) { - a = a || {} b = b || {} var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) Object.keys(a).forEach(function (k) { t[k] = a[k] }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) return t } minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } var orig = minimatch var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) + return orig(p, pattern, ext(def, options)) } m.Minimatch = function Minimatch (pattern, options) { return new orig.Minimatch(pattern, ext(def, options)) } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } return m } Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch return minimatch.defaults(def).Minimatch } function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} @@ -53431,9 +53452,6 @@ function minimatch (p, pattern, options) { return false } - // "" only matches "" - if (pattern.trim() === '') return p === '' - return new Minimatch(pattern, options).match(p) } @@ -53442,15 +53460,14 @@ function Minimatch (pattern, options) { return new Minimatch(pattern, options) } - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} + pattern = pattern.trim() // windows support: need to use /, not \ - if (path.sep !== '/') { + if (!options.allowWindowsEscape && path.sep !== '/') { pattern = pattern.split(path.sep).join('/') } @@ -53461,6 +53478,7 @@ function Minimatch (pattern, options) { this.negate = false this.comment = false this.empty = false + this.partial = !!options.partial // make the set of regexps etc. this.make() @@ -53470,9 +53488,6 @@ Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { - // don't do it more than once. - if (this._made) return - var pattern = this.pattern var options = this.options @@ -53492,7 +53507,7 @@ function make () { // step 2: expand braces var set = this.globSet = this.braceExpand() - if (options.debug) this.debug = console.error + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } this.debug(this.pattern, set) @@ -53572,12 +53587,11 @@ function braceExpand (pattern, options) { pattern = typeof pattern === 'undefined' ? this.pattern : pattern - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } + assertValidPattern(pattern) - if (options.nobrace || - !pattern.match(/\{.*\}/)) { + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { // shortcut. no need to expand. return [pattern] } @@ -53585,6 +53599,17 @@ function braceExpand (pattern, options) { return expand(pattern) } +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full @@ -53599,14 +53624,17 @@ function braceExpand (pattern, options) { Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } + assertValidPattern(pattern) var options = this.options // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } if (pattern === '') return '' var re = '' @@ -53662,10 +53690,12 @@ function parse (pattern, isSub) { } switch (c) { - case '/': + /* istanbul ignore next */ + case '/': { // completely not allowed, even escaped. // Should already be path-split by now. return false + } case '\\': clearStateChar() @@ -53784,25 +53814,23 @@ function parse (pattern, isSub) { // handle the case where we left a class open. // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue } // finish up the class. @@ -53886,9 +53914,7 @@ function parse (pattern, isSub) { // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true + case '[': case '.': case '(': addPatternStart = true } // Hack to work around lack of negative lookbehind in JS @@ -53950,7 +53976,7 @@ function parse (pattern, isSub) { var flags = options.nocase ? 'i' : '' try { var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { + } catch (er) /* istanbul ignore next - should be impossible */ { // If it was an invalid regular expression, then it can't match // anything. This trick looks for a character after the end of // the string, which is of course impossible, except in multi-line @@ -54008,7 +54034,7 @@ function makeRe () { try { this.regexp = new RegExp(re, flags) - } catch (ex) { + } catch (ex) /* istanbul ignore next - should be impossible */ { this.regexp = false } return this.regexp @@ -54026,8 +54052,8 @@ minimatch.match = function (list, pattern, options) { return list } -Minimatch.prototype.match = match -function match (f, partial) { +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. @@ -54109,6 +54135,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // should be impossible. // some invalid regexp stuff in the set. + /* istanbul ignore if */ if (p === false) return false if (p === GLOBSTAR) { @@ -54182,6 +54209,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then + /* istanbul ignore if */ if (partial) { // ran out of file this.debug('\n>>> no match, partial?', file, fr, pattern, pr) @@ -54195,11 +54223,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // patterns with magic have been turned into regexps. var hit if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } + hit = f === p this.debug('string match', p, f, hit) } else { hit = f.match(p) @@ -54230,16 +54254,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // this is ok if we're doing the match as part of // a glob fs traversal. return partial - } else if (pi === pl) { + } else /* istanbul ignore else */ if (pi === pl) { // ran out of pattern, still have file left. // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd + return (fi === fl - 1) && (file[fi] === '') } // should be unreachable. + /* istanbul ignore next */ throw new Error('wtf?') } @@ -56793,1303 +56817,1303 @@ exports.parseURL = __nccwpck_require__(33).parseURL; /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -const punycode = __nccwpck_require__(5477); -const tr46 = __nccwpck_require__(2299); - -const specialSchemes = { - ftp: 21, - file: null, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443 -}; - -const failure = Symbol("failure"); - -function countSymbols(str) { - return punycode.ucs2.decode(str).length; -} - -function at(input, idx) { - const c = input[idx]; - return isNaN(c) ? undefined : String.fromCodePoint(c); -} - -function isASCIIDigit(c) { - return c >= 0x30 && c <= 0x39; -} - -function isASCIIAlpha(c) { - return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); -} - -function isASCIIAlphanumeric(c) { - return isASCIIAlpha(c) || isASCIIDigit(c); -} - -function isASCIIHex(c) { - return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); -} - -function isSingleDot(buffer) { - return buffer === "." || buffer.toLowerCase() === "%2e"; -} - -function isDoubleDot(buffer) { - buffer = buffer.toLowerCase(); - return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; -} - -function isWindowsDriveLetterCodePoints(cp1, cp2) { - return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); -} - -function isWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); -} - -function isNormalizedWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; -} - -function containsForbiddenHostCodePoint(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; -} - -function containsForbiddenHostCodePointExcludingPercent(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; -} - -function isSpecialScheme(scheme) { - return specialSchemes[scheme] !== undefined; -} - -function isSpecial(url) { - return isSpecialScheme(url.scheme); -} - -function defaultPort(scheme) { - return specialSchemes[scheme]; -} - -function percentEncode(c) { - let hex = c.toString(16).toUpperCase(); - if (hex.length === 1) { - hex = "0" + hex; - } - - return "%" + hex; -} - -function utf8PercentEncode(c) { - const buf = new Buffer(c); - - let str = ""; - - for (let i = 0; i < buf.length; ++i) { - str += percentEncode(buf[i]); - } - - return str; -} - -function utf8PercentDecode(str) { - const input = new Buffer(str); - const output = []; - for (let i = 0; i < input.length; ++i) { - if (input[i] !== 37) { - output.push(input[i]); - } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { - output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); - i += 2; - } else { - output.push(input[i]); - } - } - return new Buffer(output).toString(); -} - -function isC0ControlPercentEncode(c) { - return c <= 0x1F || c > 0x7E; -} - -const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); -function isPathPercentEncode(c) { - return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); -} - -const extraUserinfoPercentEncodeSet = - new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); -function isUserinfoPercentEncode(c) { - return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); -} - -function percentEncodeChar(c, encodeSetPredicate) { - const cStr = String.fromCodePoint(c); - - if (encodeSetPredicate(c)) { - return utf8PercentEncode(cStr); - } - - return cStr; -} - -function parseIPv4Number(input) { - let R = 10; - - if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { - input = input.substring(2); - R = 16; - } else if (input.length >= 2 && input.charAt(0) === "0") { - input = input.substring(1); - R = 8; - } - - if (input === "") { - return 0; - } - - const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); - if (regex.test(input)) { - return failure; - } - - return parseInt(input, R); -} - -function parseIPv4(input) { - const parts = input.split("."); - if (parts[parts.length - 1] === "") { - if (parts.length > 1) { - parts.pop(); - } - } - - if (parts.length > 4) { - return input; - } - - const numbers = []; - for (const part of parts) { - if (part === "") { - return input; - } - const n = parseIPv4Number(part); - if (n === failure) { - return input; - } - - numbers.push(n); - } - - for (let i = 0; i < numbers.length - 1; ++i) { - if (numbers[i] > 255) { - return failure; - } - } - if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { - return failure; - } - - let ipv4 = numbers.pop(); - let counter = 0; - - for (const n of numbers) { - ipv4 += n * Math.pow(256, 3 - counter); - ++counter; - } - - return ipv4; -} - -function serializeIPv4(address) { - let output = ""; - let n = address; - - for (let i = 1; i <= 4; ++i) { - output = String(n % 256) + output; - if (i !== 4) { - output = "." + output; - } - n = Math.floor(n / 256); - } - - return output; -} - -function parseIPv6(input) { - const address = [0, 0, 0, 0, 0, 0, 0, 0]; - let pieceIndex = 0; - let compress = null; - let pointer = 0; - - input = punycode.ucs2.decode(input); - - if (input[pointer] === 58) { - if (input[pointer + 1] !== 58) { - return failure; - } - - pointer += 2; - ++pieceIndex; - compress = pieceIndex; - } - - while (pointer < input.length) { - if (pieceIndex === 8) { - return failure; - } - - if (input[pointer] === 58) { - if (compress !== null) { - return failure; - } - ++pointer; - ++pieceIndex; - compress = pieceIndex; - continue; - } - - let value = 0; - let length = 0; - - while (length < 4 && isASCIIHex(input[pointer])) { - value = value * 0x10 + parseInt(at(input, pointer), 16); - ++pointer; - ++length; - } - - if (input[pointer] === 46) { - if (length === 0) { - return failure; - } - - pointer -= length; - - if (pieceIndex > 6) { - return failure; - } - - let numbersSeen = 0; - - while (input[pointer] !== undefined) { - let ipv4Piece = null; - - if (numbersSeen > 0) { - if (input[pointer] === 46 && numbersSeen < 4) { - ++pointer; - } else { - return failure; - } - } - - if (!isASCIIDigit(input[pointer])) { - return failure; - } - - while (isASCIIDigit(input[pointer])) { - const number = parseInt(at(input, pointer)); - if (ipv4Piece === null) { - ipv4Piece = number; - } else if (ipv4Piece === 0) { - return failure; - } else { - ipv4Piece = ipv4Piece * 10 + number; - } - if (ipv4Piece > 255) { - return failure; - } - ++pointer; - } - - address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; - - ++numbersSeen; - - if (numbersSeen === 2 || numbersSeen === 4) { - ++pieceIndex; - } - } - - if (numbersSeen !== 4) { - return failure; - } - - break; - } else if (input[pointer] === 58) { - ++pointer; - if (input[pointer] === undefined) { - return failure; - } - } else if (input[pointer] !== undefined) { - return failure; - } - - address[pieceIndex] = value; - ++pieceIndex; - } - - if (compress !== null) { - let swaps = pieceIndex - compress; - pieceIndex = 7; - while (pieceIndex !== 0 && swaps > 0) { - const temp = address[compress + swaps - 1]; - address[compress + swaps - 1] = address[pieceIndex]; - address[pieceIndex] = temp; - --pieceIndex; - --swaps; - } - } else if (compress === null && pieceIndex !== 8) { - return failure; - } - - return address; -} - -function serializeIPv6(address) { - let output = ""; - const seqResult = findLongestZeroSequence(address); - const compress = seqResult.idx; - let ignore0 = false; - - for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { - if (ignore0 && address[pieceIndex] === 0) { - continue; - } else if (ignore0) { - ignore0 = false; - } - - if (compress === pieceIndex) { - const separator = pieceIndex === 0 ? "::" : ":"; - output += separator; - ignore0 = true; - continue; - } - - output += address[pieceIndex].toString(16); - - if (pieceIndex !== 7) { - output += ":"; - } - } - - return output; -} - -function parseHost(input, isSpecialArg) { - if (input[0] === "[") { - if (input[input.length - 1] !== "]") { - return failure; - } - - return parseIPv6(input.substring(1, input.length - 1)); - } - - if (!isSpecialArg) { - return parseOpaqueHost(input); - } - - const domain = utf8PercentDecode(input); - const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); - if (asciiDomain === null) { - return failure; - } - - if (containsForbiddenHostCodePoint(asciiDomain)) { - return failure; - } - - const ipv4Host = parseIPv4(asciiDomain); - if (typeof ipv4Host === "number" || ipv4Host === failure) { - return ipv4Host; - } - - return asciiDomain; -} - -function parseOpaqueHost(input) { - if (containsForbiddenHostCodePointExcludingPercent(input)) { - return failure; - } - - let output = ""; - const decoded = punycode.ucs2.decode(input); - for (let i = 0; i < decoded.length; ++i) { - output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); - } - return output; -} - -function findLongestZeroSequence(arr) { - let maxIdx = null; - let maxLen = 1; // only find elements > 1 - let currStart = null; - let currLen = 0; - - for (let i = 0; i < arr.length; ++i) { - if (arr[i] !== 0) { - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } - - currStart = null; - currLen = 0; - } else { - if (currStart === null) { - currStart = i; - } - ++currLen; - } - } - - // if trailing zeros - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } - - return { - idx: maxIdx, - len: maxLen - }; -} - -function serializeHost(host) { - if (typeof host === "number") { - return serializeIPv4(host); - } - - // IPv6 serializer - if (host instanceof Array) { - return "[" + serializeIPv6(host) + "]"; - } - - return host; -} - -function trimControlChars(url) { - return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); -} - -function trimTabAndNewline(url) { - return url.replace(/\u0009|\u000A|\u000D/g, ""); -} - -function shortenPath(url) { - const path = url.path; - if (path.length === 0) { - return; - } - if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { - return; - } - - path.pop(); -} - -function includesCredentials(url) { - return url.username !== "" || url.password !== ""; -} - -function cannotHaveAUsernamePasswordPort(url) { - return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; -} - -function isNormalizedWindowsDriveLetter(string) { - return /^[A-Za-z]:$/.test(string); -} - -function URLStateMachine(input, base, encodingOverride, url, stateOverride) { - this.pointer = 0; - this.input = input; - this.base = base || null; - this.encodingOverride = encodingOverride || "utf-8"; - this.stateOverride = stateOverride; - this.url = url; - this.failure = false; - this.parseError = false; - - if (!this.url) { - this.url = { - scheme: "", - username: "", - password: "", - host: null, - port: null, - path: [], - query: null, - fragment: null, - - cannotBeABaseURL: false - }; - - const res = trimControlChars(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - } - - const res = trimTabAndNewline(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - - this.state = stateOverride || "scheme start"; - - this.buffer = ""; - this.atFlag = false; - this.arrFlag = false; - this.passwordTokenSeenFlag = false; - - this.input = punycode.ucs2.decode(this.input); - - for (; this.pointer <= this.input.length; ++this.pointer) { - const c = this.input[this.pointer]; - const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); - - // exec state machine - const ret = this["parse " + this.state](c, cStr); - if (!ret) { - break; // terminate algorithm - } else if (ret === failure) { - this.failure = true; - break; - } - } -} - -URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { - if (isASCIIAlpha(c)) { - this.buffer += cStr.toLowerCase(); - this.state = "scheme"; - } else if (!this.stateOverride) { - this.state = "no scheme"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { - if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { - this.buffer += cStr.toLowerCase(); - } else if (c === 58) { - if (this.stateOverride) { - if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { - return false; - } - - if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { - return false; - } - - if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { - return false; - } - - if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { - return false; - } - } - this.url.scheme = this.buffer; - this.buffer = ""; - if (this.stateOverride) { - return false; - } - if (this.url.scheme === "file") { - if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { - this.parseError = true; - } - this.state = "file"; - } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { - this.state = "special relative or authority"; - } else if (isSpecial(this.url)) { - this.state = "special authority slashes"; - } else if (this.input[this.pointer + 1] === 47) { - this.state = "path or authority"; - ++this.pointer; - } else { - this.url.cannotBeABaseURL = true; - this.url.path.push(""); - this.state = "cannot-be-a-base-URL path"; - } - } else if (!this.stateOverride) { - this.buffer = ""; - this.state = "no scheme"; - this.pointer = -1; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { - if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { - return failure; - } else if (this.base.cannotBeABaseURL && c === 35) { - this.url.scheme = this.base.scheme; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.url.cannotBeABaseURL = true; - this.state = "fragment"; - } else if (this.base.scheme === "file") { - this.state = "file"; - --this.pointer; - } else { - this.state = "relative"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "relative"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { - if (c === 47) { - this.state = "authority"; - } else { - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse relative"] = function parseRelative(c) { - this.url.scheme = this.base.scheme; - if (isNaN(c)) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 47) { - this.state = "relative slash"; - } else if (c === 63) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else if (isSpecial(this.url) && c === 92) { - this.parseError = true; - this.state = "relative slash"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(0, this.base.path.length - 1); - - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { - if (isSpecial(this.url) && (c === 47 || c === 92)) { - if (c === 92) { - this.parseError = true; - } - this.state = "special authority ignore slashes"; - } else if (c === 47) { - this.state = "authority"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "special authority ignore slashes"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { - if (c !== 47 && c !== 92) { - this.state = "authority"; - --this.pointer; - } else { - this.parseError = true; - } - - return true; -}; - -URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { - if (c === 64) { - this.parseError = true; - if (this.atFlag) { - this.buffer = "%40" + this.buffer; - } - this.atFlag = true; - - // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars - const len = countSymbols(this.buffer); - for (let pointer = 0; pointer < len; ++pointer) { - const codePoint = this.buffer.codePointAt(pointer); - - if (codePoint === 58 && !this.passwordTokenSeenFlag) { - this.passwordTokenSeenFlag = true; - continue; - } - const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); - if (this.passwordTokenSeenFlag) { - this.url.password += encodedCodePoints; - } else { - this.url.username += encodedCodePoints; - } - } - this.buffer = ""; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - if (this.atFlag && this.buffer === "") { - this.parseError = true; - return failure; - } - this.pointer -= countSymbols(this.buffer) + 1; - this.buffer = ""; - this.state = "host"; - } else { - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse hostname"] = -URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { - if (this.stateOverride && this.url.scheme === "file") { - --this.pointer; - this.state = "file host"; - } else if (c === 58 && !this.arrFlag) { - if (this.buffer === "") { - this.parseError = true; - return failure; - } - - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - - this.url.host = host; - this.buffer = ""; - this.state = "port"; - if (this.stateOverride === "hostname") { - return false; - } - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - --this.pointer; - if (isSpecial(this.url) && this.buffer === "") { - this.parseError = true; - return failure; - } else if (this.stateOverride && this.buffer === "" && - (includesCredentials(this.url) || this.url.port !== null)) { - this.parseError = true; - return false; - } - - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - - this.url.host = host; - this.buffer = ""; - this.state = "path start"; - if (this.stateOverride) { - return false; - } - } else { - if (c === 91) { - this.arrFlag = true; - } else if (c === 93) { - this.arrFlag = false; - } - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { - if (isASCIIDigit(c)) { - this.buffer += cStr; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92) || - this.stateOverride) { - if (this.buffer !== "") { - const port = parseInt(this.buffer); - if (port > Math.pow(2, 16) - 1) { - this.parseError = true; - return failure; - } - this.url.port = port === defaultPort(this.url.scheme) ? null : port; - this.buffer = ""; - } - if (this.stateOverride) { - return false; - } - this.state = "path start"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); - -URLStateMachine.prototype["parse file"] = function parseFile(c) { - this.url.scheme = "file"; - - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file slash"; - } else if (this.base !== null && this.base.scheme === "file") { - if (isNaN(c)) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 63) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else { - if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points - !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || - (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points - !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - shortenPath(this.url); - } else { - this.parseError = true; - } - - this.state = "path"; - --this.pointer; - } - } else { - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file host"; - } else { - if (this.base !== null && this.base.scheme === "file") { - if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { - this.url.path.push(this.base.path[0]); - } else { - this.url.host = this.base.host; - } - } - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { - if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { - --this.pointer; - if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { - this.parseError = true; - this.state = "path"; - } else if (this.buffer === "") { - this.url.host = ""; - if (this.stateOverride) { - return false; - } - this.state = "path start"; - } else { - let host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - if (host === "localhost") { - host = ""; - } - this.url.host = host; - - if (this.stateOverride) { - return false; - } - - this.buffer = ""; - this.state = "path start"; - } - } else { - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { - if (isSpecial(this.url)) { - if (c === 92) { - this.parseError = true; - } - this.state = "path"; - - if (c !== 47 && c !== 92) { - --this.pointer; - } - } else if (!this.stateOverride && c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (!this.stateOverride && c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else if (c !== undefined) { - this.state = "path"; - if (c !== 47) { - --this.pointer; - } - } - - return true; -}; - -URLStateMachine.prototype["parse path"] = function parsePath(c) { - if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || - (!this.stateOverride && (c === 63 || c === 35))) { - if (isSpecial(this.url) && c === 92) { - this.parseError = true; - } - - if (isDoubleDot(this.buffer)) { - shortenPath(this.url); - if (c !== 47 && !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } - } else if (isSingleDot(this.buffer) && c !== 47 && - !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } else if (!isSingleDot(this.buffer)) { - if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { - if (this.url.host !== "" && this.url.host !== null) { - this.parseError = true; - this.url.host = ""; - } - this.buffer = this.buffer[0] + ":"; - } - this.url.path.push(this.buffer); - } - this.buffer = ""; - if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { - while (this.url.path.length > 1 && this.url.path[0] === "") { - this.parseError = true; - this.url.path.shift(); - } - } - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.buffer += percentEncodeChar(c, isPathPercentEncode); - } - - return true; -}; - -URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else { - // TODO: Add: not a URL code point - if (!isNaN(c) && c !== 37) { - this.parseError = true; - } - - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - if (!isNaN(c)) { - this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); - } - } - - return true; -}; - -URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { - if (isNaN(c) || (!this.stateOverride && c === 35)) { - if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { - this.encodingOverride = "utf-8"; - } - - const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead - for (let i = 0; i < buffer.length; ++i) { - if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || - buffer[i] === 0x3C || buffer[i] === 0x3E) { - this.url.query += percentEncode(buffer[i]); - } else { - this.url.query += String.fromCodePoint(buffer[i]); - } - } - - this.buffer = ""; - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { - if (isNaN(c)) { // do nothing - } else if (c === 0x0) { - this.parseError = true; - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); - } - - return true; -}; - -function serializeURL(url, excludeFragment) { - let output = url.scheme + ":"; - if (url.host !== null) { - output += "//"; - - if (url.username !== "" || url.password !== "") { - output += url.username; - if (url.password !== "") { - output += ":" + url.password; - } - output += "@"; - } - - output += serializeHost(url.host); - - if (url.port !== null) { - output += ":" + url.port; - } - } else if (url.host === null && url.scheme === "file") { - output += "//"; - } - - if (url.cannotBeABaseURL) { - output += url.path[0]; - } else { - for (const string of url.path) { - output += "/" + string; - } - } - - if (url.query !== null) { - output += "?" + url.query; - } - - if (!excludeFragment && url.fragment !== null) { - output += "#" + url.fragment; - } - - return output; -} - -function serializeOrigin(tuple) { - let result = tuple.scheme + "://"; - result += serializeHost(tuple.host); - - if (tuple.port !== null) { - result += ":" + tuple.port; - } - - return result; -} - -module.exports.serializeURL = serializeURL; - -module.exports.serializeURLOrigin = function (url) { - // https://url.spec.whatwg.org/#concept-url-origin - switch (url.scheme) { - case "blob": - try { - return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); - } catch (e) { - // serializing an opaque origin returns "null" - return "null"; - } - case "ftp": - case "gopher": - case "http": - case "https": - case "ws": - case "wss": - return serializeOrigin({ - scheme: url.scheme, - host: url.host, - port: url.port - }); - case "file": - // spec says "exercise to the reader", chrome says "file://" - return "file://"; - default: - // serializing an opaque origin returns "null" - return "null"; - } -}; - -module.exports.basicURLParse = function (input, options) { - if (options === undefined) { - options = {}; - } - - const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); - if (usm.failure) { - return "failure"; - } - - return usm.url; -}; - -module.exports.setTheUsername = function (url, username) { - url.username = ""; - const decoded = punycode.ucs2.decode(username); - for (let i = 0; i < decoded.length; ++i) { - url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; - -module.exports.setThePassword = function (url, password) { - url.password = ""; - const decoded = punycode.ucs2.decode(password); - for (let i = 0; i < decoded.length; ++i) { - url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; - -module.exports.serializeHost = serializeHost; - -module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; - -module.exports.serializeInteger = function (integer) { - return String(integer); -}; - -module.exports.parseURL = function (input, options) { - if (options === undefined) { - options = {}; - } - - // We don't handle blobs, so this just delegates: - return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); -}; + +const punycode = __nccwpck_require__(5477); +const tr46 = __nccwpck_require__(2299); + +const specialSchemes = { + ftp: 21, + file: null, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443 +}; + +const failure = Symbol("failure"); + +function countSymbols(str) { + return punycode.ucs2.decode(str).length; +} + +function at(input, idx) { + const c = input[idx]; + return isNaN(c) ? undefined : String.fromCodePoint(c); +} + +function isASCIIDigit(c) { + return c >= 0x30 && c <= 0x39; +} + +function isASCIIAlpha(c) { + return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); +} + +function isASCIIAlphanumeric(c) { + return isASCIIAlpha(c) || isASCIIDigit(c); +} + +function isASCIIHex(c) { + return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); +} + +function isSingleDot(buffer) { + return buffer === "." || buffer.toLowerCase() === "%2e"; +} + +function isDoubleDot(buffer) { + buffer = buffer.toLowerCase(); + return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; +} + +function isWindowsDriveLetterCodePoints(cp1, cp2) { + return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); +} + +function isWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); +} + +function isNormalizedWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; +} + +function containsForbiddenHostCodePoint(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; +} + +function containsForbiddenHostCodePointExcludingPercent(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; +} + +function isSpecialScheme(scheme) { + return specialSchemes[scheme] !== undefined; +} + +function isSpecial(url) { + return isSpecialScheme(url.scheme); +} + +function defaultPort(scheme) { + return specialSchemes[scheme]; +} + +function percentEncode(c) { + let hex = c.toString(16).toUpperCase(); + if (hex.length === 1) { + hex = "0" + hex; + } + + return "%" + hex; +} + +function utf8PercentEncode(c) { + const buf = new Buffer(c); + + let str = ""; + + for (let i = 0; i < buf.length; ++i) { + str += percentEncode(buf[i]); + } + + return str; +} + +function utf8PercentDecode(str) { + const input = new Buffer(str); + const output = []; + for (let i = 0; i < input.length; ++i) { + if (input[i] !== 37) { + output.push(input[i]); + } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { + output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); + i += 2; + } else { + output.push(input[i]); + } + } + return new Buffer(output).toString(); +} + +function isC0ControlPercentEncode(c) { + return c <= 0x1F || c > 0x7E; +} + +const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); +function isPathPercentEncode(c) { + return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); +} + +const extraUserinfoPercentEncodeSet = + new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); +function isUserinfoPercentEncode(c) { + return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); +} + +function percentEncodeChar(c, encodeSetPredicate) { + const cStr = String.fromCodePoint(c); + + if (encodeSetPredicate(c)) { + return utf8PercentEncode(cStr); + } + + return cStr; +} + +function parseIPv4Number(input) { + let R = 10; + + if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { + input = input.substring(2); + R = 16; + } else if (input.length >= 2 && input.charAt(0) === "0") { + input = input.substring(1); + R = 8; + } + + if (input === "") { + return 0; + } + + const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); + if (regex.test(input)) { + return failure; + } + + return parseInt(input, R); +} + +function parseIPv4(input) { + const parts = input.split("."); + if (parts[parts.length - 1] === "") { + if (parts.length > 1) { + parts.pop(); + } + } + + if (parts.length > 4) { + return input; + } + + const numbers = []; + for (const part of parts) { + if (part === "") { + return input; + } + const n = parseIPv4Number(part); + if (n === failure) { + return input; + } + + numbers.push(n); + } + + for (let i = 0; i < numbers.length - 1; ++i) { + if (numbers[i] > 255) { + return failure; + } + } + if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { + return failure; + } + + let ipv4 = numbers.pop(); + let counter = 0; + + for (const n of numbers) { + ipv4 += n * Math.pow(256, 3 - counter); + ++counter; + } + + return ipv4; +} + +function serializeIPv4(address) { + let output = ""; + let n = address; + + for (let i = 1; i <= 4; ++i) { + output = String(n % 256) + output; + if (i !== 4) { + output = "." + output; + } + n = Math.floor(n / 256); + } + + return output; +} + +function parseIPv6(input) { + const address = [0, 0, 0, 0, 0, 0, 0, 0]; + let pieceIndex = 0; + let compress = null; + let pointer = 0; + + input = punycode.ucs2.decode(input); + + if (input[pointer] === 58) { + if (input[pointer + 1] !== 58) { + return failure; + } + + pointer += 2; + ++pieceIndex; + compress = pieceIndex; + } + + while (pointer < input.length) { + if (pieceIndex === 8) { + return failure; + } + + if (input[pointer] === 58) { + if (compress !== null) { + return failure; + } + ++pointer; + ++pieceIndex; + compress = pieceIndex; + continue; + } + + let value = 0; + let length = 0; + + while (length < 4 && isASCIIHex(input[pointer])) { + value = value * 0x10 + parseInt(at(input, pointer), 16); + ++pointer; + ++length; + } + + if (input[pointer] === 46) { + if (length === 0) { + return failure; + } + + pointer -= length; + + if (pieceIndex > 6) { + return failure; + } + + let numbersSeen = 0; + + while (input[pointer] !== undefined) { + let ipv4Piece = null; + + if (numbersSeen > 0) { + if (input[pointer] === 46 && numbersSeen < 4) { + ++pointer; + } else { + return failure; + } + } + + if (!isASCIIDigit(input[pointer])) { + return failure; + } + + while (isASCIIDigit(input[pointer])) { + const number = parseInt(at(input, pointer)); + if (ipv4Piece === null) { + ipv4Piece = number; + } else if (ipv4Piece === 0) { + return failure; + } else { + ipv4Piece = ipv4Piece * 10 + number; + } + if (ipv4Piece > 255) { + return failure; + } + ++pointer; + } + + address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; + + ++numbersSeen; + + if (numbersSeen === 2 || numbersSeen === 4) { + ++pieceIndex; + } + } + + if (numbersSeen !== 4) { + return failure; + } + + break; + } else if (input[pointer] === 58) { + ++pointer; + if (input[pointer] === undefined) { + return failure; + } + } else if (input[pointer] !== undefined) { + return failure; + } + + address[pieceIndex] = value; + ++pieceIndex; + } + + if (compress !== null) { + let swaps = pieceIndex - compress; + pieceIndex = 7; + while (pieceIndex !== 0 && swaps > 0) { + const temp = address[compress + swaps - 1]; + address[compress + swaps - 1] = address[pieceIndex]; + address[pieceIndex] = temp; + --pieceIndex; + --swaps; + } + } else if (compress === null && pieceIndex !== 8) { + return failure; + } + + return address; +} + +function serializeIPv6(address) { + let output = ""; + const seqResult = findLongestZeroSequence(address); + const compress = seqResult.idx; + let ignore0 = false; + + for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { + if (ignore0 && address[pieceIndex] === 0) { + continue; + } else if (ignore0) { + ignore0 = false; + } + + if (compress === pieceIndex) { + const separator = pieceIndex === 0 ? "::" : ":"; + output += separator; + ignore0 = true; + continue; + } + + output += address[pieceIndex].toString(16); + + if (pieceIndex !== 7) { + output += ":"; + } + } + + return output; +} + +function parseHost(input, isSpecialArg) { + if (input[0] === "[") { + if (input[input.length - 1] !== "]") { + return failure; + } + + return parseIPv6(input.substring(1, input.length - 1)); + } + + if (!isSpecialArg) { + return parseOpaqueHost(input); + } + + const domain = utf8PercentDecode(input); + const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); + if (asciiDomain === null) { + return failure; + } + + if (containsForbiddenHostCodePoint(asciiDomain)) { + return failure; + } + + const ipv4Host = parseIPv4(asciiDomain); + if (typeof ipv4Host === "number" || ipv4Host === failure) { + return ipv4Host; + } + + return asciiDomain; +} + +function parseOpaqueHost(input) { + if (containsForbiddenHostCodePointExcludingPercent(input)) { + return failure; + } + + let output = ""; + const decoded = punycode.ucs2.decode(input); + for (let i = 0; i < decoded.length; ++i) { + output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); + } + return output; +} + +function findLongestZeroSequence(arr) { + let maxIdx = null; + let maxLen = 1; // only find elements > 1 + let currStart = null; + let currLen = 0; + + for (let i = 0; i < arr.length; ++i) { + if (arr[i] !== 0) { + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } + + currStart = null; + currLen = 0; + } else { + if (currStart === null) { + currStart = i; + } + ++currLen; + } + } + + // if trailing zeros + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } + + return { + idx: maxIdx, + len: maxLen + }; +} + +function serializeHost(host) { + if (typeof host === "number") { + return serializeIPv4(host); + } + + // IPv6 serializer + if (host instanceof Array) { + return "[" + serializeIPv6(host) + "]"; + } + + return host; +} + +function trimControlChars(url) { + return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); +} + +function trimTabAndNewline(url) { + return url.replace(/\u0009|\u000A|\u000D/g, ""); +} + +function shortenPath(url) { + const path = url.path; + if (path.length === 0) { + return; + } + if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { + return; + } + + path.pop(); +} + +function includesCredentials(url) { + return url.username !== "" || url.password !== ""; +} + +function cannotHaveAUsernamePasswordPort(url) { + return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; +} + +function isNormalizedWindowsDriveLetter(string) { + return /^[A-Za-z]:$/.test(string); +} + +function URLStateMachine(input, base, encodingOverride, url, stateOverride) { + this.pointer = 0; + this.input = input; + this.base = base || null; + this.encodingOverride = encodingOverride || "utf-8"; + this.stateOverride = stateOverride; + this.url = url; + this.failure = false; + this.parseError = false; + + if (!this.url) { + this.url = { + scheme: "", + username: "", + password: "", + host: null, + port: null, + path: [], + query: null, + fragment: null, + + cannotBeABaseURL: false + }; + + const res = trimControlChars(this.input); + if (res !== this.input) { + this.parseError = true; + } + this.input = res; + } + + const res = trimTabAndNewline(this.input); + if (res !== this.input) { + this.parseError = true; + } + this.input = res; + + this.state = stateOverride || "scheme start"; + + this.buffer = ""; + this.atFlag = false; + this.arrFlag = false; + this.passwordTokenSeenFlag = false; + + this.input = punycode.ucs2.decode(this.input); + + for (; this.pointer <= this.input.length; ++this.pointer) { + const c = this.input[this.pointer]; + const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); + + // exec state machine + const ret = this["parse " + this.state](c, cStr); + if (!ret) { + break; // terminate algorithm + } else if (ret === failure) { + this.failure = true; + break; + } + } +} + +URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { + if (isASCIIAlpha(c)) { + this.buffer += cStr.toLowerCase(); + this.state = "scheme"; + } else if (!this.stateOverride) { + this.state = "no scheme"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { + if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { + this.buffer += cStr.toLowerCase(); + } else if (c === 58) { + if (this.stateOverride) { + if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { + return false; + } + + if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { + return false; + } + + if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { + return false; + } + + if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { + return false; + } + } + this.url.scheme = this.buffer; + this.buffer = ""; + if (this.stateOverride) { + return false; + } + if (this.url.scheme === "file") { + if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { + this.parseError = true; + } + this.state = "file"; + } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { + this.state = "special relative or authority"; + } else if (isSpecial(this.url)) { + this.state = "special authority slashes"; + } else if (this.input[this.pointer + 1] === 47) { + this.state = "path or authority"; + ++this.pointer; + } else { + this.url.cannotBeABaseURL = true; + this.url.path.push(""); + this.state = "cannot-be-a-base-URL path"; + } + } else if (!this.stateOverride) { + this.buffer = ""; + this.state = "no scheme"; + this.pointer = -1; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { + if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { + return failure; + } else if (this.base.cannotBeABaseURL && c === 35) { + this.url.scheme = this.base.scheme; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.url.cannotBeABaseURL = true; + this.state = "fragment"; + } else if (this.base.scheme === "file") { + this.state = "file"; + --this.pointer; + } else { + this.state = "relative"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "relative"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { + if (c === 47) { + this.state = "authority"; + } else { + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse relative"] = function parseRelative(c) { + this.url.scheme = this.base.scheme; + if (isNaN(c)) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 47) { + this.state = "relative slash"; + } else if (c === 63) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else if (isSpecial(this.url) && c === 92) { + this.parseError = true; + this.state = "relative slash"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(0, this.base.path.length - 1); + + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { + if (isSpecial(this.url) && (c === 47 || c === 92)) { + if (c === 92) { + this.parseError = true; + } + this.state = "special authority ignore slashes"; + } else if (c === 47) { + this.state = "authority"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "special authority ignore slashes"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { + if (c !== 47 && c !== 92) { + this.state = "authority"; + --this.pointer; + } else { + this.parseError = true; + } + + return true; +}; + +URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { + if (c === 64) { + this.parseError = true; + if (this.atFlag) { + this.buffer = "%40" + this.buffer; + } + this.atFlag = true; + + // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars + const len = countSymbols(this.buffer); + for (let pointer = 0; pointer < len; ++pointer) { + const codePoint = this.buffer.codePointAt(pointer); + + if (codePoint === 58 && !this.passwordTokenSeenFlag) { + this.passwordTokenSeenFlag = true; + continue; + } + const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); + if (this.passwordTokenSeenFlag) { + this.url.password += encodedCodePoints; + } else { + this.url.username += encodedCodePoints; + } + } + this.buffer = ""; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + if (this.atFlag && this.buffer === "") { + this.parseError = true; + return failure; + } + this.pointer -= countSymbols(this.buffer) + 1; + this.buffer = ""; + this.state = "host"; + } else { + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse hostname"] = +URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { + if (this.stateOverride && this.url.scheme === "file") { + --this.pointer; + this.state = "file host"; + } else if (c === 58 && !this.arrFlag) { + if (this.buffer === "") { + this.parseError = true; + return failure; + } + + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + + this.url.host = host; + this.buffer = ""; + this.state = "port"; + if (this.stateOverride === "hostname") { + return false; + } + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + --this.pointer; + if (isSpecial(this.url) && this.buffer === "") { + this.parseError = true; + return failure; + } else if (this.stateOverride && this.buffer === "" && + (includesCredentials(this.url) || this.url.port !== null)) { + this.parseError = true; + return false; + } + + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + + this.url.host = host; + this.buffer = ""; + this.state = "path start"; + if (this.stateOverride) { + return false; + } + } else { + if (c === 91) { + this.arrFlag = true; + } else if (c === 93) { + this.arrFlag = false; + } + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { + if (isASCIIDigit(c)) { + this.buffer += cStr; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92) || + this.stateOverride) { + if (this.buffer !== "") { + const port = parseInt(this.buffer); + if (port > Math.pow(2, 16) - 1) { + this.parseError = true; + return failure; + } + this.url.port = port === defaultPort(this.url.scheme) ? null : port; + this.buffer = ""; + } + if (this.stateOverride) { + return false; + } + this.state = "path start"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); + +URLStateMachine.prototype["parse file"] = function parseFile(c) { + this.url.scheme = "file"; + + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file slash"; + } else if (this.base !== null && this.base.scheme === "file") { + if (isNaN(c)) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 63) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else { + if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points + !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || + (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points + !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + shortenPath(this.url); + } else { + this.parseError = true; + } + + this.state = "path"; + --this.pointer; + } + } else { + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file host"; + } else { + if (this.base !== null && this.base.scheme === "file") { + if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { + this.url.path.push(this.base.path[0]); + } else { + this.url.host = this.base.host; + } + } + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { + if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { + --this.pointer; + if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { + this.parseError = true; + this.state = "path"; + } else if (this.buffer === "") { + this.url.host = ""; + if (this.stateOverride) { + return false; + } + this.state = "path start"; + } else { + let host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + if (host === "localhost") { + host = ""; + } + this.url.host = host; + + if (this.stateOverride) { + return false; + } + + this.buffer = ""; + this.state = "path start"; + } + } else { + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { + if (isSpecial(this.url)) { + if (c === 92) { + this.parseError = true; + } + this.state = "path"; + + if (c !== 47 && c !== 92) { + --this.pointer; + } + } else if (!this.stateOverride && c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (!this.stateOverride && c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else if (c !== undefined) { + this.state = "path"; + if (c !== 47) { + --this.pointer; + } + } + + return true; +}; + +URLStateMachine.prototype["parse path"] = function parsePath(c) { + if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || + (!this.stateOverride && (c === 63 || c === 35))) { + if (isSpecial(this.url) && c === 92) { + this.parseError = true; + } + + if (isDoubleDot(this.buffer)) { + shortenPath(this.url); + if (c !== 47 && !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } + } else if (isSingleDot(this.buffer) && c !== 47 && + !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } else if (!isSingleDot(this.buffer)) { + if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { + if (this.url.host !== "" && this.url.host !== null) { + this.parseError = true; + this.url.host = ""; + } + this.buffer = this.buffer[0] + ":"; + } + this.url.path.push(this.buffer); + } + this.buffer = ""; + if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { + while (this.url.path.length > 1 && this.url.path[0] === "") { + this.parseError = true; + this.url.path.shift(); + } + } + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. + + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.buffer += percentEncodeChar(c, isPathPercentEncode); + } + + return true; +}; + +URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else { + // TODO: Add: not a URL code point + if (!isNaN(c) && c !== 37) { + this.parseError = true; + } + + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + if (!isNaN(c)) { + this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); + } + } + + return true; +}; + +URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { + if (isNaN(c) || (!this.stateOverride && c === 35)) { + if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { + this.encodingOverride = "utf-8"; + } + + const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead + for (let i = 0; i < buffer.length; ++i) { + if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || + buffer[i] === 0x3C || buffer[i] === 0x3E) { + this.url.query += percentEncode(buffer[i]); + } else { + this.url.query += String.fromCodePoint(buffer[i]); + } + } + + this.buffer = ""; + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { + if (isNaN(c)) { // do nothing + } else if (c === 0x0) { + this.parseError = true; + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); + } + + return true; +}; + +function serializeURL(url, excludeFragment) { + let output = url.scheme + ":"; + if (url.host !== null) { + output += "//"; + + if (url.username !== "" || url.password !== "") { + output += url.username; + if (url.password !== "") { + output += ":" + url.password; + } + output += "@"; + } + + output += serializeHost(url.host); + + if (url.port !== null) { + output += ":" + url.port; + } + } else if (url.host === null && url.scheme === "file") { + output += "//"; + } + + if (url.cannotBeABaseURL) { + output += url.path[0]; + } else { + for (const string of url.path) { + output += "/" + string; + } + } + + if (url.query !== null) { + output += "?" + url.query; + } + + if (!excludeFragment && url.fragment !== null) { + output += "#" + url.fragment; + } + + return output; +} + +function serializeOrigin(tuple) { + let result = tuple.scheme + "://"; + result += serializeHost(tuple.host); + + if (tuple.port !== null) { + result += ":" + tuple.port; + } + + return result; +} + +module.exports.serializeURL = serializeURL; + +module.exports.serializeURLOrigin = function (url) { + // https://url.spec.whatwg.org/#concept-url-origin + switch (url.scheme) { + case "blob": + try { + return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); + } catch (e) { + // serializing an opaque origin returns "null" + return "null"; + } + case "ftp": + case "gopher": + case "http": + case "https": + case "ws": + case "wss": + return serializeOrigin({ + scheme: url.scheme, + host: url.host, + port: url.port + }); + case "file": + // spec says "exercise to the reader", chrome says "file://" + return "file://"; + default: + // serializing an opaque origin returns "null" + return "null"; + } +}; + +module.exports.basicURLParse = function (input, options) { + if (options === undefined) { + options = {}; + } + + const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); + if (usm.failure) { + return "failure"; + } + + return usm.url; +}; + +module.exports.setTheUsername = function (url, username) { + url.username = ""; + const decoded = punycode.ucs2.decode(username); + for (let i = 0; i < decoded.length; ++i) { + url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + } +}; + +module.exports.setThePassword = function (url, password) { + url.password = ""; + const decoded = punycode.ucs2.decode(password); + for (let i = 0; i < decoded.length; ++i) { + url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + } +}; + +module.exports.serializeHost = serializeHost; + +module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; + +module.exports.serializeInteger = function (integer) { + return String(integer); +}; + +module.exports.parseURL = function (input, options) { + if (options === undefined) { + options = {}; + } + + // We don't handle blobs, so this just delegates: + return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); +}; /***/ }), @@ -59980,6 +60004,7 @@ class Comparator { static get ANY () { return ANY } + constructor (comp, options) { options = parseOptions(options) @@ -60056,7 +60081,7 @@ class Comparator { if (!options || typeof options !== 'object') { options = { loose: !!options, - includePrerelease: false + includePrerelease: false, } } @@ -60104,7 +60129,7 @@ class Comparator { module.exports = Comparator const parseOptions = __nccwpck_require__(785) -const {re, t} = __nccwpck_require__(9523) +const { re, t } = __nccwpck_require__(9523) const cmp = __nccwpck_require__(5098) const debug = __nccwpck_require__(106) const SemVer = __nccwpck_require__(8088) @@ -60147,9 +60172,9 @@ class Range { // First, split based on boolean or || this.raw = range this.set = range - .split(/\s*\|\|\s*/) + .split('||') // map the range to a 2d array of comparators - .map(range => this.parseRange(range.trim())) + .map(r => this.parseRange(r.trim())) // throw out any comparator lists that are empty // this generally means that it was not a valid range, which is allowed // in loose mode, but will still throw if the WHOLE range is invalid. @@ -60164,9 +60189,9 @@ class Range { // keep the first one, in case they're all null sets const first = this.set[0] this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) + if (this.set.length === 0) { this.set = [first] - else if (this.set.length > 1) { + } else if (this.set.length > 1) { // if we have any that are *, then the range is just * for (const c of this.set) { if (c.length === 1 && isAny(c[0])) { @@ -60202,8 +60227,9 @@ class Range { const memoOpts = Object.keys(this.options).join(',') const memoKey = `parseRange:${memoOpts}:${range}` const cached = cache.get(memoKey) - if (cached) + if (cached) { return cached + } const loose = this.options.loose // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` @@ -60212,7 +60238,7 @@ class Range { debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[t.COMPARATORTRIM]) + debug('comparator trim', range) // `~ 1.2.3` => `~1.2.3` range = range.replace(re[t.TILDETRIM], tildeTrimReplace) @@ -60226,30 +60252,37 @@ class Range { // At this point, the range is completely trimmed and // ready to be split into comparators. - const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const rangeList = range + let rangeList = range .split(' ') .map(comp => parseComparator(comp, this.options)) .join(' ') .split(/\s+/) // >=0.0.0 is equivalent to * .map(comp => replaceGTE0(comp, this.options)) + + if (loose) { // in loose mode, throw out any that are not valid comparators - .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) - .map(comp => new Comparator(comp, this.options)) + rangeList = rangeList.filter(comp => { + debug('loose invalid filter', comp, this.options) + return !!comp.match(re[t.COMPARATORLOOSE]) + }) + } + debug('range list', rangeList) // if any comparators are the null set, then replace with JUST null set // if more than one comparator, remove any * comparators // also, don't include the same comparator more than once - const l = rangeList.length const rangeMap = new Map() - for (const comp of rangeList) { - if (isNullSet(comp)) + const comparators = rangeList.map(comp => new Comparator(comp, this.options)) + for (const comp of comparators) { + if (isNullSet(comp)) { return [comp] + } rangeMap.set(comp.value, comp) } - if (rangeMap.size > 1 && rangeMap.has('')) + if (rangeMap.size > 1 && rangeMap.has('')) { rangeMap.delete('') + } const result = [...rangeMap.values()] cache.set(memoKey, result) @@ -60314,7 +60347,7 @@ const { t, comparatorTrimReplace, tildeTrimReplace, - caretTrimReplace + caretTrimReplace, } = __nccwpck_require__(9523) const isNullSet = c => c.value === '<0.0.0-0' @@ -60362,9 +60395,10 @@ const isX = id => !id || id.toLowerCase() === 'x' || id === '*' // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +// ~0.0.1 --> >=0.0.1 <0.1.0-0 const replaceTildes = (comp, options) => - comp.trim().split(/\s+/).map((comp) => { - return replaceTilde(comp, options) + comp.trim().split(/\s+/).map((c) => { + return replaceTilde(c, options) }).join(' ') const replaceTilde = (comp, options) => { @@ -60401,9 +60435,11 @@ const replaceTilde = (comp, options) => { // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 // ^1.2.3 --> >=1.2.3 <2.0.0-0 // ^1.2.0 --> >=1.2.0 <2.0.0-0 +// ^0.0.1 --> >=0.0.1 <0.0.2-0 +// ^0.1.0 --> >=0.1.0 <0.2.0-0 const replaceCarets = (comp, options) => - comp.trim().split(/\s+/).map((comp) => { - return replaceCaret(comp, options) + comp.trim().split(/\s+/).map((c) => { + return replaceCaret(c, options) }).join(' ') const replaceCaret = (comp, options) => { @@ -60461,8 +60497,8 @@ const replaceCaret = (comp, options) => { const replaceXRanges = (comp, options) => { debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map((comp) => { - return replaceXRange(comp, options) + return comp.split(/\s+/).map((c) => { + return replaceXRange(c, options) }).join(' ') } @@ -60523,8 +60559,9 @@ const replaceXRange = (comp, options) => { } } - if (gtlt === '<') + if (gtlt === '<') { pr = '-0' + } ret = `${gtlt + M}.${m}.${p}${pr}` } else if (xm) { @@ -60900,7 +60937,7 @@ class SemVer { if (identifier) { // 1.2.0-beta.1 bumps to 1.2.0-beta.2, // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { if (isNaN(this.prerelease[1])) { this.prerelease = [identifier, 0] } @@ -60950,17 +60987,21 @@ const lte = __nccwpck_require__(7520) const cmp = (a, op, b, loose) => { switch (op) { case '===': - if (typeof a === 'object') + if (typeof a === 'object') { a = a.version - if (typeof b === 'object') + } + if (typeof b === 'object') { b = b.version + } return a === b case '!==': - if (typeof a === 'object') + if (typeof a === 'object') { a = a.version - if (typeof b === 'object') + } + if (typeof b === 'object') { b = b.version + } return a !== b case '': @@ -60997,7 +61038,7 @@ module.exports = cmp const SemVer = __nccwpck_require__(8088) const parse = __nccwpck_require__(5925) -const {re, t} = __nccwpck_require__(9523) +const { re, t } = __nccwpck_require__(9523) const coerce = (version, options) => { if (version instanceof SemVer) { @@ -61040,8 +61081,9 @@ const coerce = (version, options) => { re[t.COERCERTL].lastIndex = -1 } - if (match === null) + if (match === null) { return null + } return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) } @@ -61158,7 +61200,10 @@ const inc = (version, release, options, identifier) => { } try { - return new SemVer(version, options).inc(release, identifier).version + return new SemVer( + version instanceof SemVer ? version.version : version, + options + ).inc(release, identifier).version } catch (er) { return null } @@ -61221,7 +61266,7 @@ module.exports = neq /***/ 5925: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const {MAX_LENGTH} = __nccwpck_require__(2293) +const { MAX_LENGTH } = __nccwpck_require__(2293) const { re, t } = __nccwpck_require__(9523) const SemVer = __nccwpck_require__(8088) @@ -61346,51 +61391,91 @@ module.exports = valid // just pre-load all the stuff that index.js lazily exports const internalRe = __nccwpck_require__(9523) +const constants = __nccwpck_require__(2293) +const SemVer = __nccwpck_require__(8088) +const identifiers = __nccwpck_require__(2463) +const parse = __nccwpck_require__(5925) +const valid = __nccwpck_require__(9601) +const clean = __nccwpck_require__(8848) +const inc = __nccwpck_require__(900) +const diff = __nccwpck_require__(4297) +const major = __nccwpck_require__(6688) +const minor = __nccwpck_require__(8447) +const patch = __nccwpck_require__(2866) +const prerelease = __nccwpck_require__(4016) +const compare = __nccwpck_require__(4309) +const rcompare = __nccwpck_require__(6417) +const compareLoose = __nccwpck_require__(2804) +const compareBuild = __nccwpck_require__(2156) +const sort = __nccwpck_require__(1426) +const rsort = __nccwpck_require__(8701) +const gt = __nccwpck_require__(4123) +const lt = __nccwpck_require__(194) +const eq = __nccwpck_require__(1898) +const neq = __nccwpck_require__(6017) +const gte = __nccwpck_require__(5522) +const lte = __nccwpck_require__(7520) +const cmp = __nccwpck_require__(5098) +const coerce = __nccwpck_require__(3466) +const Comparator = __nccwpck_require__(1532) +const Range = __nccwpck_require__(9828) +const satisfies = __nccwpck_require__(6055) +const toComparators = __nccwpck_require__(2706) +const maxSatisfying = __nccwpck_require__(579) +const minSatisfying = __nccwpck_require__(832) +const minVersion = __nccwpck_require__(4179) +const validRange = __nccwpck_require__(2098) +const outside = __nccwpck_require__(420) +const gtr = __nccwpck_require__(9380) +const ltr = __nccwpck_require__(3323) +const intersects = __nccwpck_require__(7008) +const simplifyRange = __nccwpck_require__(5297) +const subset = __nccwpck_require__(7863) module.exports = { + parse, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, re: internalRe.re, src: internalRe.src, tokens: internalRe.t, - SEMVER_SPEC_VERSION: (__nccwpck_require__(2293).SEMVER_SPEC_VERSION), - SemVer: __nccwpck_require__(8088), - compareIdentifiers: (__nccwpck_require__(2463).compareIdentifiers), - rcompareIdentifiers: (__nccwpck_require__(2463).rcompareIdentifiers), - parse: __nccwpck_require__(5925), - valid: __nccwpck_require__(9601), - clean: __nccwpck_require__(8848), - inc: __nccwpck_require__(900), - diff: __nccwpck_require__(4297), - major: __nccwpck_require__(6688), - minor: __nccwpck_require__(8447), - patch: __nccwpck_require__(2866), - prerelease: __nccwpck_require__(4016), - compare: __nccwpck_require__(4309), - rcompare: __nccwpck_require__(6417), - compareLoose: __nccwpck_require__(2804), - compareBuild: __nccwpck_require__(2156), - sort: __nccwpck_require__(1426), - rsort: __nccwpck_require__(8701), - gt: __nccwpck_require__(4123), - lt: __nccwpck_require__(194), - eq: __nccwpck_require__(1898), - neq: __nccwpck_require__(6017), - gte: __nccwpck_require__(5522), - lte: __nccwpck_require__(7520), - cmp: __nccwpck_require__(5098), - coerce: __nccwpck_require__(3466), - Comparator: __nccwpck_require__(1532), - Range: __nccwpck_require__(9828), - satisfies: __nccwpck_require__(6055), - toComparators: __nccwpck_require__(2706), - maxSatisfying: __nccwpck_require__(579), - minSatisfying: __nccwpck_require__(832), - minVersion: __nccwpck_require__(4179), - validRange: __nccwpck_require__(2098), - outside: __nccwpck_require__(420), - gtr: __nccwpck_require__(9380), - ltr: __nccwpck_require__(3323), - intersects: __nccwpck_require__(7008), - simplifyRange: __nccwpck_require__(5297), - subset: __nccwpck_require__(7863), + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers, } @@ -61405,7 +61490,7 @@ const SEMVER_SPEC_VERSION = '2.0.0' const MAX_LENGTH = 256 const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 +/* istanbul ignore next */ 9007199254740991 // Max safe segment length for coercion. const MAX_SAFE_COMPONENT_LENGTH = 16 @@ -61414,7 +61499,7 @@ module.exports = { SEMVER_SPEC_VERSION, MAX_LENGTH, MAX_SAFE_INTEGER, - MAX_SAFE_COMPONENT_LENGTH + MAX_SAFE_COMPONENT_LENGTH, } @@ -61460,7 +61545,7 @@ const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) module.exports = { compareIdentifiers, - rcompareIdentifiers + rcompareIdentifiers, } @@ -61475,9 +61560,9 @@ const opts = ['includePrerelease', 'loose', 'rtl'] const parseOptions = options => !options ? {} : typeof options !== 'object' ? { loose: true } - : opts.filter(k => options[k]).reduce((options, k) => { - options[k] = true - return options + : opts.filter(k => options[k]).reduce((o, k) => { + o[k] = true + return o }, {}) module.exports = parseOptions @@ -61499,7 +61584,7 @@ let R = 0 const createToken = (name, value, isGlobal) => { const index = R++ - debug(index, value) + debug(name, index, value) t[name] = index src[index] = value re[index] = new RegExp(value, isGlobal ? 'g' : undefined) @@ -61667,8 +61752,8 @@ createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + // Star ranges basically just allow anything at all. createToken('STAR', '(<|>)?=?\\s*\\*') // >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') +createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') /***/ }), @@ -61824,8 +61909,9 @@ const minVersion = (range, loose) => { throw new Error(`Unexpected operation: ${comparator.operator}`) } }) - if (setMin && (!minver || gt(minver, setMin))) + if (setMin && (!minver || gt(minver, setMin))) { minver = setMin + } } if (minver && range.test(minver)) { @@ -61844,7 +61930,7 @@ module.exports = minVersion const SemVer = __nccwpck_require__(8088) const Comparator = __nccwpck_require__(1532) -const {ANY} = Comparator +const { ANY } = Comparator const Range = __nccwpck_require__(9828) const satisfies = __nccwpck_require__(6055) const gt = __nccwpck_require__(4123) @@ -61936,38 +62022,41 @@ const satisfies = __nccwpck_require__(6055) const compare = __nccwpck_require__(4309) module.exports = (versions, range, options) => { const set = [] - let min = null + let first = null let prev = null const v = versions.sort((a, b) => compare(a, b, options)) for (const version of v) { const included = satisfies(version, range, options) if (included) { prev = version - if (!min) - min = version + if (!first) { + first = version + } } else { if (prev) { - set.push([min, prev]) + set.push([first, prev]) } prev = null - min = null + first = null } } - if (min) - set.push([min, null]) + if (first) { + set.push([first, null]) + } const ranges = [] for (const [min, max] of set) { - if (min === max) + if (min === max) { ranges.push(min) - else if (!max && min === v[0]) + } else if (!max && min === v[0]) { ranges.push('*') - else if (!max) + } else if (!max) { ranges.push(`>=${min}`) - else if (min === v[0]) + } else if (min === v[0]) { ranges.push(`<=${max}`) - else + } else { ranges.push(`${min} - ${max}`) + } } const simplified = ranges.join(' || ') const original = typeof range.raw === 'string' ? range.raw : String(range) @@ -61981,22 +62070,30 @@ module.exports = (versions, range, options) => { /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { const Range = __nccwpck_require__(9828) -const { ANY } = __nccwpck_require__(1532) +const Comparator = __nccwpck_require__(1532) +const { ANY } = Comparator const satisfies = __nccwpck_require__(6055) const compare = __nccwpck_require__(4309) // Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a subset of some `R1, R2, ...` +// - Every simple range `r1, r2, ...` is a null set, OR +// - Every simple range `r1, r2, ...` which is not a null set is a subset of +// some `R1, R2, ...` // // Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: // - If c is only the ANY comparator // - If C is only the ANY comparator, return true -// - Else return false +// - Else if in prerelease mode, return false +// - else replace c with `[>=0.0.0]` +// - If C is only the ANY comparator +// - if in prerelease mode, return true +// - else replace C with `[>=0.0.0]` // - Let EQ be the set of = comparators in c // - If EQ is more than one, return true (null set) // - Let GT be the highest > or >= comparator in c // - Let LT be the lowest < or <= comparator in c // - If GT and LT, and GT.semver > LT.semver, return true (null set) +// - If any C is a = range, and GT or LT are set, return false // - If EQ // - If GT, and EQ does not satisfy GT, return true (null set) // - If LT, and EQ does not satisfy LT, return true (null set) @@ -62005,15 +62102,19 @@ const compare = __nccwpck_require__(4309) // - If GT // - If GT.semver is lower than any > or >= comp in C, return false // - If GT is >=, and GT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the GT.semver tuple, return false // - If LT // - If LT.semver is greater than any < or <= comp in C, return false // - If LT is <=, and LT.semver does not satisfy every C, return false -// - If any C is a = range, and GT or LT are set, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the LT.semver tuple, return false // - Else return true -const subset = (sub, dom, options) => { - if (sub === dom) +const subset = (sub, dom, options = {}) => { + if (sub === dom) { return true + } sub = new Range(sub, options) dom = new Range(dom, options) @@ -62023,60 +62124,84 @@ const subset = (sub, dom, options) => { for (const simpleDom of dom.set) { const isSub = simpleSubset(simpleSub, simpleDom, options) sawNonNull = sawNonNull || isSub !== null - if (isSub) + if (isSub) { continue OUTER + } } // the null set is a subset of everything, but null simple ranges in // a complex range should be ignored. so if we saw a non-null range, // then we know this isn't a subset, but if EVERY simple range was null, // then it is a subset. - if (sawNonNull) + if (sawNonNull) { return false + } } return true } const simpleSubset = (sub, dom, options) => { - if (sub === dom) + if (sub === dom) { return true + } - if (sub.length === 1 && sub[0].semver === ANY) - return dom.length === 1 && dom[0].semver === ANY + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true + } else if (options.includePrerelease) { + sub = [new Comparator('>=0.0.0-0')] + } else { + sub = [new Comparator('>=0.0.0')] + } + } + + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true + } else { + dom = [new Comparator('>=0.0.0')] + } + } const eqSet = new Set() let gt, lt for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') + if (c.operator === '>' || c.operator === '>=') { gt = higherGT(gt, c, options) - else if (c.operator === '<' || c.operator === '<=') + } else if (c.operator === '<' || c.operator === '<=') { lt = lowerLT(lt, c, options) - else + } else { eqSet.add(c.semver) + } } - if (eqSet.size > 1) + if (eqSet.size > 1) { return null + } let gtltComp if (gt && lt) { gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) + if (gtltComp > 0) { return null - else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) + } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { return null + } } // will iterate one or zero times for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) + if (gt && !satisfies(eq, String(gt), options)) { return null + } - if (lt && !satisfies(eq, String(lt), options)) + if (lt && !satisfies(eq, String(lt), options)) { return null + } for (const c of dom) { - if (!satisfies(eq, String(c), options)) + if (!satisfies(eq, String(c), options)) { return false + } } return true @@ -62084,45 +62209,90 @@ const simpleSubset = (sub, dom, options) => { let higher, lower let hasDomLT, hasDomGT + // if the subset has a prerelease, we need a comparator in the superset + // with the same tuple and a prerelease, or it's not a subset + let needDomLTPre = lt && + !options.includePrerelease && + lt.semver.prerelease.length ? lt.semver : false + let needDomGTPre = gt && + !options.includePrerelease && + gt.semver.prerelease.length ? gt.semver : false + // exception: <1.2.3-0 is the same as <1.2.3 + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && + lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false + } + for (const c of dom) { hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false + } + } if (c.operator === '>' || c.operator === '>=') { higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) + if (higher === c && higher !== gt) { return false - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) + } + } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { return false + } } if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false + } + } if (c.operator === '<' || c.operator === '<=') { lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) + if (lower === c && lower !== lt) { return false - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) + } + } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { return false + } } - if (!c.operator && (lt || gt) && gtltComp !== 0) + if (!c.operator && (lt || gt) && gtltComp !== 0) { return false + } } // if there was a < or >, and nothing in the dom, then must be false // UNLESS it was limited by another range in the other direction. // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) + if (gt && hasDomLT && !lt && gtltComp !== 0) { return false + } - if (lt && hasDomGT && !gt && gtltComp !== 0) + if (lt && hasDomGT && !gt && gtltComp !== 0) { return false + } + + // we needed a prerelease range in a specific tuple, but didn't get one + // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, + // because it includes prereleases in the 1.2.3 tuple + if (needDomGTPre || needDomLTPre) { + return false + } return true } // >=1.2.3 is lower than >1.2.3 const higherGT = (a, b, options) => { - if (!a) + if (!a) { return b + } const comp = compare(a.semver, b.semver, options) return comp > 0 ? a : comp < 0 ? b @@ -62132,8 +62302,9 @@ const higherGT = (a, b, options) => { // <=1.2.3 is higher than <1.2.3 const lowerLT = (a, b, options) => { - if (!a) + if (!a) { return b + } const comp = compare(a.semver, b.semver, options) return comp < 0 ? a : comp > 0 ? b @@ -68218,7 +68389,10 @@ const supportedPackageManager = [ }, { id: 'gradle', - path: [path_1.join(os_1.default.homedir(), '.gradle', 'caches'), path_1.join(os_1.default.homedir(), '.gradle', 'wrapper')], + path: [ + path_1.join(os_1.default.homedir(), '.gradle', 'caches'), + path_1.join(os_1.default.homedir(), '.gradle', 'wrapper') + ], // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---gradle pattern: [ '**/*.gradle*', @@ -68239,7 +68413,11 @@ const supportedPackageManager = [ '!' + path_1.join(os_1.default.homedir(), '.sbt', '*.lock'), '!' + path_1.join(os_1.default.homedir(), '**', 'ivydata-*.properties') ], - pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] + pattern: [ + '**/*.sbt', + '**/project/build.properties', + '**/project/**.{scala,sbt}' + ] } ]; function getCoursierCachePath() { @@ -68339,7 +68517,8 @@ exports.save = save; * @see {@link https://github.com/actions/cache/issues/454#issuecomment-840493935|why --no-daemon is necessary} */ function isProbablyGradleDaemonProblem(packageManager, error) { - if (packageManager.id !== 'gradle' || process.env['RUNNER_OS'] !== 'Windows') { + if (packageManager.id !== 'gradle' || + process.env['RUNNER_OS'] !== 'Windows') { return false; } const message = error.message || ''; @@ -68456,9 +68635,10 @@ else { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0; +exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION_FILE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0; exports.MACOS_JAVA_CONTENT_POSTFIX = 'Contents/Home'; exports.INPUT_JAVA_VERSION = 'java-version'; +exports.INPUT_JAVA_VERSION_FILE = 'java-version-file'; exports.INPUT_ARCHITECTURE = 'architecture'; exports.INPUT_JAVA_PACKAGE = 'java-package'; exports.INPUT_DISTRIBUTION = 'distribution'; @@ -68481,6 +68661,7 @@ exports.MVN_SETTINGS_FILE = 'settings.xml'; exports.MVN_TOOLCHAINS_FILE = 'toolchains.xml'; exports.INPUT_MVN_TOOLCHAIN_ID = 'mvn-toolchain-id'; exports.INPUT_MVN_TOOLCHAIN_VENDOR = 'mvn-toolchain-vendor'; +exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = ['corretto']; /***/ }), @@ -68542,7 +68723,13 @@ function importKey(privateKey) { } } }; - yield exec.exec('gpg', ['--batch', '--import-options', 'import-show', '--import', exports.PRIVATE_KEY_FILE], options); + yield exec.exec('gpg', [ + '--batch', + '--import-options', + 'import-show', + '--import', + exports.PRIVATE_KEY_FILE + ], options); yield io.rmRF(exports.PRIVATE_KEY_FILE); const match = output.match(PRIVATE_KEY_FINGERPRINT_REGEX); return match && match[0]; @@ -68598,7 +68785,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isCacheFeatureAvailable = exports.isGhes = exports.isJobStatusSuccess = exports.getToolcachePath = exports.isVersionSatisfies = exports.getDownloadArchiveExtension = exports.extractJdkFile = exports.getVersionFromToolcachePath = exports.getBooleanInput = exports.getTempDir = void 0; +exports.getVersionFromFileContent = exports.isCacheFeatureAvailable = exports.isGhes = exports.isJobStatusSuccess = exports.getToolcachePath = exports.isVersionSatisfies = exports.getDownloadArchiveExtension = exports.extractJdkFile = exports.getVersionFromToolcachePath = exports.getBooleanInput = exports.getTempDir = void 0; const os_1 = __importDefault(__nccwpck_require__(2037)); const path_1 = __importDefault(__nccwpck_require__(1017)); const fs = __importStar(__nccwpck_require__(7147)); @@ -68608,12 +68795,12 @@ const core = __importStar(__nccwpck_require__(2186)); const tc = __importStar(__nccwpck_require__(7784)); const constants_1 = __nccwpck_require__(9042); function getTempDir() { - let tempDirectory = process.env['RUNNER_TEMP'] || os_1.default.tmpdir(); + const tempDirectory = process.env['RUNNER_TEMP'] || os_1.default.tmpdir(); return tempDirectory; } exports.getTempDir = getTempDir; function getBooleanInput(inputName, defaultValue = false) { - return (core.getInput(inputName) || String(defaultValue)).toUpperCase() === 'TRUE'; + return ((core.getInput(inputName) || String(defaultValue)).toUpperCase() === 'TRUE'); } exports.getBooleanInput = getBooleanInput; function getVersionFromToolcachePath(toolPath) { @@ -68626,7 +68813,9 @@ exports.getVersionFromToolcachePath = getVersionFromToolcachePath; function extractJdkFile(toolPath, extension) { return __awaiter(this, void 0, void 0, function* () { if (!extension) { - extension = toolPath.endsWith('.tar.gz') ? 'tar.gz' : path_1.default.extname(toolPath); + extension = toolPath.endsWith('.tar.gz') + ? 'tar.gz' + : path_1.default.extname(toolPath); if (extension.startsWith('.')) { extension = extension.substring(1); } @@ -68682,18 +68871,47 @@ function isGhes() { } exports.isGhes = isGhes; function isCacheFeatureAvailable() { - if (!cache.isFeatureAvailable()) { - if (isGhes()) { - throw new Error('Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.'); - } - else { - core.warning('The runner was not able to contact the cache service. Caching will be skipped'); - } + if (cache.isFeatureAvailable()) { + return true; + } + if (isGhes()) { + core.warning('Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.'); return false; } - return true; + core.warning('The runner was not able to contact the cache service. Caching will be skipped'); + return false; } exports.isCacheFeatureAvailable = isCacheFeatureAvailable; +function getVersionFromFileContent(content, distributionName) { + var _a, _b, _c, _d, _e; + const javaVersionRegExp = /(?(?<=(^|\s|-))(\d+\S*))(\s|$)/; + const fileContent = ((_b = (_a = content.match(javaVersionRegExp)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.version) + ? (_d = (_c = content.match(javaVersionRegExp)) === null || _c === void 0 ? void 0 : _c.groups) === null || _d === void 0 ? void 0 : _d.version + : ''; + if (!fileContent) { + return null; + } + core.debug(`Version from file '${fileContent}'`); + const tentativeVersion = avoidOldNotation(fileContent); + const rawVersion = tentativeVersion.split('-')[0]; + let version = semver.validRange(rawVersion) + ? tentativeVersion + : semver.coerce(tentativeVersion); + core.debug(`Range version from file is '${version}'`); + if (!version) { + return null; + } + if (constants_1.DISTRIBUTIONS_ONLY_MAJOR_VERSION.includes(distributionName)) { + const coerceVersion = (_e = semver.coerce(version)) !== null && _e !== void 0 ? _e : version; + version = semver.major(coerceVersion).toString(); + } + return version.toString(); +} +exports.getVersionFromFileContent = getVersionFromFileContent; +// By convention, action expects version 8 in the format `8.*` instead of `1.8` +function avoidOldNotation(content) { + return content.startsWith('1.') ? content.substring(2) : content; +} /***/ }), diff --git a/dist/setup/index.js b/dist/setup/index.js index cbbe5142..0680d6a0 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -12763,312 +12763,312 @@ exports.AbortSignal = AbortSignal; /***/ 9268: /***/ ((module) => { -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __createBinding; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); /***/ }), @@ -21547,312 +21547,312 @@ module.exports = '4.0.0' /***/ 2107: /***/ ((module) => { -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __createBinding; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); /***/ }), @@ -23347,312 +23347,312 @@ exports.getPagedAsyncIterator = getPagedAsyncIterator; /***/ 6429: /***/ ((module) => { -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __createBinding; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); /***/ }), @@ -48891,312 +48891,312 @@ exports.newPipeline = newPipeline; /***/ 679: /***/ ((module) => { -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __createBinding; -(function (factory) { - var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; - if (typeof define === "function" && define.amd) { - define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - - __extends = function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - - __rest = function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - }; - - __decorate = function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __awaiter = function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - /** @deprecated */ - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - /** @deprecated */ - __spreadArrays = function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; - }; - - __spreadArray = function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __asyncGenerator = function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - }; - - __asyncDelegator = function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __asyncValues = function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(function (factory) { + var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; + if (typeof define === "function" && define.amd) { + define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + + __extends = function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + + __rest = function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + }; + + __decorate = function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __awaiter = function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + /** @deprecated */ + __spreadArrays = function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; + }; + + __spreadArray = function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __asyncGenerator = function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + }; + + __asyncDelegator = function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __asyncValues = function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); /***/ }), @@ -82352,10 +82352,10 @@ function populateMaps (extensions, types) { module.exports = minimatch minimatch.Minimatch = Minimatch -var path = { sep: '/' } -try { - path = __nccwpck_require__(1017) -} catch (er) {} +var path = (function () { try { return __nccwpck_require__(1017) } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = __nccwpck_require__(9850) @@ -82407,43 +82407,64 @@ function filter (pattern, options) { } function ext (a, b) { - a = a || {} b = b || {} var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) Object.keys(a).forEach(function (k) { t[k] = a[k] }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) return t } minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } var orig = minimatch var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) + return orig(p, pattern, ext(def, options)) } m.Minimatch = function Minimatch (pattern, options) { return new orig.Minimatch(pattern, ext(def, options)) } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } return m } Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch return minimatch.defaults(def).Minimatch } function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} @@ -82452,9 +82473,6 @@ function minimatch (p, pattern, options) { return false } - // "" only matches "" - if (pattern.trim() === '') return p === '' - return new Minimatch(pattern, options).match(p) } @@ -82463,15 +82481,14 @@ function Minimatch (pattern, options) { return new Minimatch(pattern, options) } - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} + pattern = pattern.trim() // windows support: need to use /, not \ - if (path.sep !== '/') { + if (!options.allowWindowsEscape && path.sep !== '/') { pattern = pattern.split(path.sep).join('/') } @@ -82482,6 +82499,7 @@ function Minimatch (pattern, options) { this.negate = false this.comment = false this.empty = false + this.partial = !!options.partial // make the set of regexps etc. this.make() @@ -82491,9 +82509,6 @@ Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { - // don't do it more than once. - if (this._made) return - var pattern = this.pattern var options = this.options @@ -82513,7 +82528,7 @@ function make () { // step 2: expand braces var set = this.globSet = this.braceExpand() - if (options.debug) this.debug = console.error + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } this.debug(this.pattern, set) @@ -82593,12 +82608,11 @@ function braceExpand (pattern, options) { pattern = typeof pattern === 'undefined' ? this.pattern : pattern - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } + assertValidPattern(pattern) - if (options.nobrace || - !pattern.match(/\{.*\}/)) { + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { // shortcut. no need to expand. return [pattern] } @@ -82606,6 +82620,17 @@ function braceExpand (pattern, options) { return expand(pattern) } +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full @@ -82620,14 +82645,17 @@ function braceExpand (pattern, options) { Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } + assertValidPattern(pattern) var options = this.options // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } if (pattern === '') return '' var re = '' @@ -82683,10 +82711,12 @@ function parse (pattern, isSub) { } switch (c) { - case '/': + /* istanbul ignore next */ + case '/': { // completely not allowed, even escaped. // Should already be path-split by now. return false + } case '\\': clearStateChar() @@ -82805,25 +82835,23 @@ function parse (pattern, isSub) { // handle the case where we left a class open. // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue } // finish up the class. @@ -82907,9 +82935,7 @@ function parse (pattern, isSub) { // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true + case '[': case '.': case '(': addPatternStart = true } // Hack to work around lack of negative lookbehind in JS @@ -82971,7 +82997,7 @@ function parse (pattern, isSub) { var flags = options.nocase ? 'i' : '' try { var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { + } catch (er) /* istanbul ignore next - should be impossible */ { // If it was an invalid regular expression, then it can't match // anything. This trick looks for a character after the end of // the string, which is of course impossible, except in multi-line @@ -83029,7 +83055,7 @@ function makeRe () { try { this.regexp = new RegExp(re, flags) - } catch (ex) { + } catch (ex) /* istanbul ignore next - should be impossible */ { this.regexp = false } return this.regexp @@ -83047,8 +83073,8 @@ minimatch.match = function (list, pattern, options) { return list } -Minimatch.prototype.match = match -function match (f, partial) { +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. @@ -83130,6 +83156,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // should be impossible. // some invalid regexp stuff in the set. + /* istanbul ignore if */ if (p === false) return false if (p === GLOBSTAR) { @@ -83203,6 +83230,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then + /* istanbul ignore if */ if (partial) { // ran out of file this.debug('\n>>> no match, partial?', file, fr, pattern, pr) @@ -83216,11 +83244,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // patterns with magic have been turned into regexps. var hit if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } + hit = f === p this.debug('string match', p, f, hit) } else { hit = f.match(p) @@ -83251,16 +83275,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // this is ok if we're doing the match as part of // a glob fs traversal. return partial - } else if (pi === pl) { + } else /* istanbul ignore else */ if (pi === pl) { // ran out of pattern, still have file left. // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd + return (fi === fl - 1) && (file[fi] === '') } // should be unreachable. + /* istanbul ignore next */ throw new Error('wtf?') } @@ -85814,1303 +85838,1303 @@ exports.parseURL = __nccwpck_require__(33).parseURL; /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -const punycode = __nccwpck_require__(5477); -const tr46 = __nccwpck_require__(2299); - -const specialSchemes = { - ftp: 21, - file: null, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443 -}; - -const failure = Symbol("failure"); - -function countSymbols(str) { - return punycode.ucs2.decode(str).length; -} - -function at(input, idx) { - const c = input[idx]; - return isNaN(c) ? undefined : String.fromCodePoint(c); -} - -function isASCIIDigit(c) { - return c >= 0x30 && c <= 0x39; -} - -function isASCIIAlpha(c) { - return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); -} - -function isASCIIAlphanumeric(c) { - return isASCIIAlpha(c) || isASCIIDigit(c); -} - -function isASCIIHex(c) { - return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); -} - -function isSingleDot(buffer) { - return buffer === "." || buffer.toLowerCase() === "%2e"; -} - -function isDoubleDot(buffer) { - buffer = buffer.toLowerCase(); - return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; -} - -function isWindowsDriveLetterCodePoints(cp1, cp2) { - return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); -} - -function isWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); -} - -function isNormalizedWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; -} - -function containsForbiddenHostCodePoint(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; -} - -function containsForbiddenHostCodePointExcludingPercent(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; -} - -function isSpecialScheme(scheme) { - return specialSchemes[scheme] !== undefined; -} - -function isSpecial(url) { - return isSpecialScheme(url.scheme); -} - -function defaultPort(scheme) { - return specialSchemes[scheme]; -} - -function percentEncode(c) { - let hex = c.toString(16).toUpperCase(); - if (hex.length === 1) { - hex = "0" + hex; - } - - return "%" + hex; -} - -function utf8PercentEncode(c) { - const buf = new Buffer(c); - - let str = ""; - - for (let i = 0; i < buf.length; ++i) { - str += percentEncode(buf[i]); - } - - return str; -} - -function utf8PercentDecode(str) { - const input = new Buffer(str); - const output = []; - for (let i = 0; i < input.length; ++i) { - if (input[i] !== 37) { - output.push(input[i]); - } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { - output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); - i += 2; - } else { - output.push(input[i]); - } - } - return new Buffer(output).toString(); -} - -function isC0ControlPercentEncode(c) { - return c <= 0x1F || c > 0x7E; -} - -const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); -function isPathPercentEncode(c) { - return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); -} - -const extraUserinfoPercentEncodeSet = - new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); -function isUserinfoPercentEncode(c) { - return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); -} - -function percentEncodeChar(c, encodeSetPredicate) { - const cStr = String.fromCodePoint(c); - - if (encodeSetPredicate(c)) { - return utf8PercentEncode(cStr); - } - - return cStr; -} - -function parseIPv4Number(input) { - let R = 10; - - if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { - input = input.substring(2); - R = 16; - } else if (input.length >= 2 && input.charAt(0) === "0") { - input = input.substring(1); - R = 8; - } - - if (input === "") { - return 0; - } - - const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); - if (regex.test(input)) { - return failure; - } - - return parseInt(input, R); -} - -function parseIPv4(input) { - const parts = input.split("."); - if (parts[parts.length - 1] === "") { - if (parts.length > 1) { - parts.pop(); - } - } - - if (parts.length > 4) { - return input; - } - - const numbers = []; - for (const part of parts) { - if (part === "") { - return input; - } - const n = parseIPv4Number(part); - if (n === failure) { - return input; - } - - numbers.push(n); - } - - for (let i = 0; i < numbers.length - 1; ++i) { - if (numbers[i] > 255) { - return failure; - } - } - if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { - return failure; - } - - let ipv4 = numbers.pop(); - let counter = 0; - - for (const n of numbers) { - ipv4 += n * Math.pow(256, 3 - counter); - ++counter; - } - - return ipv4; -} - -function serializeIPv4(address) { - let output = ""; - let n = address; - - for (let i = 1; i <= 4; ++i) { - output = String(n % 256) + output; - if (i !== 4) { - output = "." + output; - } - n = Math.floor(n / 256); - } - - return output; -} - -function parseIPv6(input) { - const address = [0, 0, 0, 0, 0, 0, 0, 0]; - let pieceIndex = 0; - let compress = null; - let pointer = 0; - - input = punycode.ucs2.decode(input); - - if (input[pointer] === 58) { - if (input[pointer + 1] !== 58) { - return failure; - } - - pointer += 2; - ++pieceIndex; - compress = pieceIndex; - } - - while (pointer < input.length) { - if (pieceIndex === 8) { - return failure; - } - - if (input[pointer] === 58) { - if (compress !== null) { - return failure; - } - ++pointer; - ++pieceIndex; - compress = pieceIndex; - continue; - } - - let value = 0; - let length = 0; - - while (length < 4 && isASCIIHex(input[pointer])) { - value = value * 0x10 + parseInt(at(input, pointer), 16); - ++pointer; - ++length; - } - - if (input[pointer] === 46) { - if (length === 0) { - return failure; - } - - pointer -= length; - - if (pieceIndex > 6) { - return failure; - } - - let numbersSeen = 0; - - while (input[pointer] !== undefined) { - let ipv4Piece = null; - - if (numbersSeen > 0) { - if (input[pointer] === 46 && numbersSeen < 4) { - ++pointer; - } else { - return failure; - } - } - - if (!isASCIIDigit(input[pointer])) { - return failure; - } - - while (isASCIIDigit(input[pointer])) { - const number = parseInt(at(input, pointer)); - if (ipv4Piece === null) { - ipv4Piece = number; - } else if (ipv4Piece === 0) { - return failure; - } else { - ipv4Piece = ipv4Piece * 10 + number; - } - if (ipv4Piece > 255) { - return failure; - } - ++pointer; - } - - address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; - - ++numbersSeen; - - if (numbersSeen === 2 || numbersSeen === 4) { - ++pieceIndex; - } - } - - if (numbersSeen !== 4) { - return failure; - } - - break; - } else if (input[pointer] === 58) { - ++pointer; - if (input[pointer] === undefined) { - return failure; - } - } else if (input[pointer] !== undefined) { - return failure; - } - - address[pieceIndex] = value; - ++pieceIndex; - } - - if (compress !== null) { - let swaps = pieceIndex - compress; - pieceIndex = 7; - while (pieceIndex !== 0 && swaps > 0) { - const temp = address[compress + swaps - 1]; - address[compress + swaps - 1] = address[pieceIndex]; - address[pieceIndex] = temp; - --pieceIndex; - --swaps; - } - } else if (compress === null && pieceIndex !== 8) { - return failure; - } - - return address; -} - -function serializeIPv6(address) { - let output = ""; - const seqResult = findLongestZeroSequence(address); - const compress = seqResult.idx; - let ignore0 = false; - - for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { - if (ignore0 && address[pieceIndex] === 0) { - continue; - } else if (ignore0) { - ignore0 = false; - } - - if (compress === pieceIndex) { - const separator = pieceIndex === 0 ? "::" : ":"; - output += separator; - ignore0 = true; - continue; - } - - output += address[pieceIndex].toString(16); - - if (pieceIndex !== 7) { - output += ":"; - } - } - - return output; -} - -function parseHost(input, isSpecialArg) { - if (input[0] === "[") { - if (input[input.length - 1] !== "]") { - return failure; - } - - return parseIPv6(input.substring(1, input.length - 1)); - } - - if (!isSpecialArg) { - return parseOpaqueHost(input); - } - - const domain = utf8PercentDecode(input); - const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); - if (asciiDomain === null) { - return failure; - } - - if (containsForbiddenHostCodePoint(asciiDomain)) { - return failure; - } - - const ipv4Host = parseIPv4(asciiDomain); - if (typeof ipv4Host === "number" || ipv4Host === failure) { - return ipv4Host; - } - - return asciiDomain; -} - -function parseOpaqueHost(input) { - if (containsForbiddenHostCodePointExcludingPercent(input)) { - return failure; - } - - let output = ""; - const decoded = punycode.ucs2.decode(input); - for (let i = 0; i < decoded.length; ++i) { - output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); - } - return output; -} - -function findLongestZeroSequence(arr) { - let maxIdx = null; - let maxLen = 1; // only find elements > 1 - let currStart = null; - let currLen = 0; - - for (let i = 0; i < arr.length; ++i) { - if (arr[i] !== 0) { - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } - - currStart = null; - currLen = 0; - } else { - if (currStart === null) { - currStart = i; - } - ++currLen; - } - } - - // if trailing zeros - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } - - return { - idx: maxIdx, - len: maxLen - }; -} - -function serializeHost(host) { - if (typeof host === "number") { - return serializeIPv4(host); - } - - // IPv6 serializer - if (host instanceof Array) { - return "[" + serializeIPv6(host) + "]"; - } - - return host; -} - -function trimControlChars(url) { - return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); -} - -function trimTabAndNewline(url) { - return url.replace(/\u0009|\u000A|\u000D/g, ""); -} - -function shortenPath(url) { - const path = url.path; - if (path.length === 0) { - return; - } - if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { - return; - } - - path.pop(); -} - -function includesCredentials(url) { - return url.username !== "" || url.password !== ""; -} - -function cannotHaveAUsernamePasswordPort(url) { - return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; -} - -function isNormalizedWindowsDriveLetter(string) { - return /^[A-Za-z]:$/.test(string); -} - -function URLStateMachine(input, base, encodingOverride, url, stateOverride) { - this.pointer = 0; - this.input = input; - this.base = base || null; - this.encodingOverride = encodingOverride || "utf-8"; - this.stateOverride = stateOverride; - this.url = url; - this.failure = false; - this.parseError = false; - - if (!this.url) { - this.url = { - scheme: "", - username: "", - password: "", - host: null, - port: null, - path: [], - query: null, - fragment: null, - - cannotBeABaseURL: false - }; - - const res = trimControlChars(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - } - - const res = trimTabAndNewline(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - - this.state = stateOverride || "scheme start"; - - this.buffer = ""; - this.atFlag = false; - this.arrFlag = false; - this.passwordTokenSeenFlag = false; - - this.input = punycode.ucs2.decode(this.input); - - for (; this.pointer <= this.input.length; ++this.pointer) { - const c = this.input[this.pointer]; - const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); - - // exec state machine - const ret = this["parse " + this.state](c, cStr); - if (!ret) { - break; // terminate algorithm - } else if (ret === failure) { - this.failure = true; - break; - } - } -} - -URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { - if (isASCIIAlpha(c)) { - this.buffer += cStr.toLowerCase(); - this.state = "scheme"; - } else if (!this.stateOverride) { - this.state = "no scheme"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { - if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { - this.buffer += cStr.toLowerCase(); - } else if (c === 58) { - if (this.stateOverride) { - if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { - return false; - } - - if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { - return false; - } - - if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { - return false; - } - - if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { - return false; - } - } - this.url.scheme = this.buffer; - this.buffer = ""; - if (this.stateOverride) { - return false; - } - if (this.url.scheme === "file") { - if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { - this.parseError = true; - } - this.state = "file"; - } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { - this.state = "special relative or authority"; - } else if (isSpecial(this.url)) { - this.state = "special authority slashes"; - } else if (this.input[this.pointer + 1] === 47) { - this.state = "path or authority"; - ++this.pointer; - } else { - this.url.cannotBeABaseURL = true; - this.url.path.push(""); - this.state = "cannot-be-a-base-URL path"; - } - } else if (!this.stateOverride) { - this.buffer = ""; - this.state = "no scheme"; - this.pointer = -1; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { - if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { - return failure; - } else if (this.base.cannotBeABaseURL && c === 35) { - this.url.scheme = this.base.scheme; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.url.cannotBeABaseURL = true; - this.state = "fragment"; - } else if (this.base.scheme === "file") { - this.state = "file"; - --this.pointer; - } else { - this.state = "relative"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "relative"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { - if (c === 47) { - this.state = "authority"; - } else { - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse relative"] = function parseRelative(c) { - this.url.scheme = this.base.scheme; - if (isNaN(c)) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 47) { - this.state = "relative slash"; - } else if (c === 63) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else if (isSpecial(this.url) && c === 92) { - this.parseError = true; - this.state = "relative slash"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(0, this.base.path.length - 1); - - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { - if (isSpecial(this.url) && (c === 47 || c === 92)) { - if (c === 92) { - this.parseError = true; - } - this.state = "special authority ignore slashes"; - } else if (c === 47) { - this.state = "authority"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "special authority ignore slashes"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { - if (c !== 47 && c !== 92) { - this.state = "authority"; - --this.pointer; - } else { - this.parseError = true; - } - - return true; -}; - -URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { - if (c === 64) { - this.parseError = true; - if (this.atFlag) { - this.buffer = "%40" + this.buffer; - } - this.atFlag = true; - - // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars - const len = countSymbols(this.buffer); - for (let pointer = 0; pointer < len; ++pointer) { - const codePoint = this.buffer.codePointAt(pointer); - - if (codePoint === 58 && !this.passwordTokenSeenFlag) { - this.passwordTokenSeenFlag = true; - continue; - } - const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); - if (this.passwordTokenSeenFlag) { - this.url.password += encodedCodePoints; - } else { - this.url.username += encodedCodePoints; - } - } - this.buffer = ""; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - if (this.atFlag && this.buffer === "") { - this.parseError = true; - return failure; - } - this.pointer -= countSymbols(this.buffer) + 1; - this.buffer = ""; - this.state = "host"; - } else { - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse hostname"] = -URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { - if (this.stateOverride && this.url.scheme === "file") { - --this.pointer; - this.state = "file host"; - } else if (c === 58 && !this.arrFlag) { - if (this.buffer === "") { - this.parseError = true; - return failure; - } - - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - - this.url.host = host; - this.buffer = ""; - this.state = "port"; - if (this.stateOverride === "hostname") { - return false; - } - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - --this.pointer; - if (isSpecial(this.url) && this.buffer === "") { - this.parseError = true; - return failure; - } else if (this.stateOverride && this.buffer === "" && - (includesCredentials(this.url) || this.url.port !== null)) { - this.parseError = true; - return false; - } - - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - - this.url.host = host; - this.buffer = ""; - this.state = "path start"; - if (this.stateOverride) { - return false; - } - } else { - if (c === 91) { - this.arrFlag = true; - } else if (c === 93) { - this.arrFlag = false; - } - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { - if (isASCIIDigit(c)) { - this.buffer += cStr; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92) || - this.stateOverride) { - if (this.buffer !== "") { - const port = parseInt(this.buffer); - if (port > Math.pow(2, 16) - 1) { - this.parseError = true; - return failure; - } - this.url.port = port === defaultPort(this.url.scheme) ? null : port; - this.buffer = ""; - } - if (this.stateOverride) { - return false; - } - this.state = "path start"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); - -URLStateMachine.prototype["parse file"] = function parseFile(c) { - this.url.scheme = "file"; - - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file slash"; - } else if (this.base !== null && this.base.scheme === "file") { - if (isNaN(c)) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 63) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else { - if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points - !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || - (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points - !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - shortenPath(this.url); - } else { - this.parseError = true; - } - - this.state = "path"; - --this.pointer; - } - } else { - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file host"; - } else { - if (this.base !== null && this.base.scheme === "file") { - if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { - this.url.path.push(this.base.path[0]); - } else { - this.url.host = this.base.host; - } - } - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { - if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { - --this.pointer; - if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { - this.parseError = true; - this.state = "path"; - } else if (this.buffer === "") { - this.url.host = ""; - if (this.stateOverride) { - return false; - } - this.state = "path start"; - } else { - let host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - if (host === "localhost") { - host = ""; - } - this.url.host = host; - - if (this.stateOverride) { - return false; - } - - this.buffer = ""; - this.state = "path start"; - } - } else { - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { - if (isSpecial(this.url)) { - if (c === 92) { - this.parseError = true; - } - this.state = "path"; - - if (c !== 47 && c !== 92) { - --this.pointer; - } - } else if (!this.stateOverride && c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (!this.stateOverride && c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else if (c !== undefined) { - this.state = "path"; - if (c !== 47) { - --this.pointer; - } - } - - return true; -}; - -URLStateMachine.prototype["parse path"] = function parsePath(c) { - if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || - (!this.stateOverride && (c === 63 || c === 35))) { - if (isSpecial(this.url) && c === 92) { - this.parseError = true; - } - - if (isDoubleDot(this.buffer)) { - shortenPath(this.url); - if (c !== 47 && !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } - } else if (isSingleDot(this.buffer) && c !== 47 && - !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } else if (!isSingleDot(this.buffer)) { - if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { - if (this.url.host !== "" && this.url.host !== null) { - this.parseError = true; - this.url.host = ""; - } - this.buffer = this.buffer[0] + ":"; - } - this.url.path.push(this.buffer); - } - this.buffer = ""; - if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { - while (this.url.path.length > 1 && this.url.path[0] === "") { - this.parseError = true; - this.url.path.shift(); - } - } - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.buffer += percentEncodeChar(c, isPathPercentEncode); - } - - return true; -}; - -URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else { - // TODO: Add: not a URL code point - if (!isNaN(c) && c !== 37) { - this.parseError = true; - } - - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - if (!isNaN(c)) { - this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); - } - } - - return true; -}; - -URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { - if (isNaN(c) || (!this.stateOverride && c === 35)) { - if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { - this.encodingOverride = "utf-8"; - } - - const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead - for (let i = 0; i < buffer.length; ++i) { - if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || - buffer[i] === 0x3C || buffer[i] === 0x3E) { - this.url.query += percentEncode(buffer[i]); - } else { - this.url.query += String.fromCodePoint(buffer[i]); - } - } - - this.buffer = ""; - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { - if (isNaN(c)) { // do nothing - } else if (c === 0x0) { - this.parseError = true; - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); - } - - return true; -}; - -function serializeURL(url, excludeFragment) { - let output = url.scheme + ":"; - if (url.host !== null) { - output += "//"; - - if (url.username !== "" || url.password !== "") { - output += url.username; - if (url.password !== "") { - output += ":" + url.password; - } - output += "@"; - } - - output += serializeHost(url.host); - - if (url.port !== null) { - output += ":" + url.port; - } - } else if (url.host === null && url.scheme === "file") { - output += "//"; - } - - if (url.cannotBeABaseURL) { - output += url.path[0]; - } else { - for (const string of url.path) { - output += "/" + string; - } - } - - if (url.query !== null) { - output += "?" + url.query; - } - - if (!excludeFragment && url.fragment !== null) { - output += "#" + url.fragment; - } - - return output; -} - -function serializeOrigin(tuple) { - let result = tuple.scheme + "://"; - result += serializeHost(tuple.host); - - if (tuple.port !== null) { - result += ":" + tuple.port; - } - - return result; -} - -module.exports.serializeURL = serializeURL; - -module.exports.serializeURLOrigin = function (url) { - // https://url.spec.whatwg.org/#concept-url-origin - switch (url.scheme) { - case "blob": - try { - return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); - } catch (e) { - // serializing an opaque origin returns "null" - return "null"; - } - case "ftp": - case "gopher": - case "http": - case "https": - case "ws": - case "wss": - return serializeOrigin({ - scheme: url.scheme, - host: url.host, - port: url.port - }); - case "file": - // spec says "exercise to the reader", chrome says "file://" - return "file://"; - default: - // serializing an opaque origin returns "null" - return "null"; - } -}; - -module.exports.basicURLParse = function (input, options) { - if (options === undefined) { - options = {}; - } - - const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); - if (usm.failure) { - return "failure"; - } - - return usm.url; -}; - -module.exports.setTheUsername = function (url, username) { - url.username = ""; - const decoded = punycode.ucs2.decode(username); - for (let i = 0; i < decoded.length; ++i) { - url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; - -module.exports.setThePassword = function (url, password) { - url.password = ""; - const decoded = punycode.ucs2.decode(password); - for (let i = 0; i < decoded.length; ++i) { - url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; - -module.exports.serializeHost = serializeHost; - -module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; - -module.exports.serializeInteger = function (integer) { - return String(integer); -}; - -module.exports.parseURL = function (input, options) { - if (options === undefined) { - options = {}; - } - - // We don't handle blobs, so this just delegates: - return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); -}; + +const punycode = __nccwpck_require__(5477); +const tr46 = __nccwpck_require__(2299); + +const specialSchemes = { + ftp: 21, + file: null, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443 +}; + +const failure = Symbol("failure"); + +function countSymbols(str) { + return punycode.ucs2.decode(str).length; +} + +function at(input, idx) { + const c = input[idx]; + return isNaN(c) ? undefined : String.fromCodePoint(c); +} + +function isASCIIDigit(c) { + return c >= 0x30 && c <= 0x39; +} + +function isASCIIAlpha(c) { + return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); +} + +function isASCIIAlphanumeric(c) { + return isASCIIAlpha(c) || isASCIIDigit(c); +} + +function isASCIIHex(c) { + return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); +} + +function isSingleDot(buffer) { + return buffer === "." || buffer.toLowerCase() === "%2e"; +} + +function isDoubleDot(buffer) { + buffer = buffer.toLowerCase(); + return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; +} + +function isWindowsDriveLetterCodePoints(cp1, cp2) { + return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); +} + +function isWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); +} + +function isNormalizedWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; +} + +function containsForbiddenHostCodePoint(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; +} + +function containsForbiddenHostCodePointExcludingPercent(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; +} + +function isSpecialScheme(scheme) { + return specialSchemes[scheme] !== undefined; +} + +function isSpecial(url) { + return isSpecialScheme(url.scheme); +} + +function defaultPort(scheme) { + return specialSchemes[scheme]; +} + +function percentEncode(c) { + let hex = c.toString(16).toUpperCase(); + if (hex.length === 1) { + hex = "0" + hex; + } + + return "%" + hex; +} + +function utf8PercentEncode(c) { + const buf = new Buffer(c); + + let str = ""; + + for (let i = 0; i < buf.length; ++i) { + str += percentEncode(buf[i]); + } + + return str; +} + +function utf8PercentDecode(str) { + const input = new Buffer(str); + const output = []; + for (let i = 0; i < input.length; ++i) { + if (input[i] !== 37) { + output.push(input[i]); + } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { + output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); + i += 2; + } else { + output.push(input[i]); + } + } + return new Buffer(output).toString(); +} + +function isC0ControlPercentEncode(c) { + return c <= 0x1F || c > 0x7E; +} + +const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); +function isPathPercentEncode(c) { + return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); +} + +const extraUserinfoPercentEncodeSet = + new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); +function isUserinfoPercentEncode(c) { + return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); +} + +function percentEncodeChar(c, encodeSetPredicate) { + const cStr = String.fromCodePoint(c); + + if (encodeSetPredicate(c)) { + return utf8PercentEncode(cStr); + } + + return cStr; +} + +function parseIPv4Number(input) { + let R = 10; + + if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { + input = input.substring(2); + R = 16; + } else if (input.length >= 2 && input.charAt(0) === "0") { + input = input.substring(1); + R = 8; + } + + if (input === "") { + return 0; + } + + const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); + if (regex.test(input)) { + return failure; + } + + return parseInt(input, R); +} + +function parseIPv4(input) { + const parts = input.split("."); + if (parts[parts.length - 1] === "") { + if (parts.length > 1) { + parts.pop(); + } + } + + if (parts.length > 4) { + return input; + } + + const numbers = []; + for (const part of parts) { + if (part === "") { + return input; + } + const n = parseIPv4Number(part); + if (n === failure) { + return input; + } + + numbers.push(n); + } + + for (let i = 0; i < numbers.length - 1; ++i) { + if (numbers[i] > 255) { + return failure; + } + } + if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { + return failure; + } + + let ipv4 = numbers.pop(); + let counter = 0; + + for (const n of numbers) { + ipv4 += n * Math.pow(256, 3 - counter); + ++counter; + } + + return ipv4; +} + +function serializeIPv4(address) { + let output = ""; + let n = address; + + for (let i = 1; i <= 4; ++i) { + output = String(n % 256) + output; + if (i !== 4) { + output = "." + output; + } + n = Math.floor(n / 256); + } + + return output; +} + +function parseIPv6(input) { + const address = [0, 0, 0, 0, 0, 0, 0, 0]; + let pieceIndex = 0; + let compress = null; + let pointer = 0; + + input = punycode.ucs2.decode(input); + + if (input[pointer] === 58) { + if (input[pointer + 1] !== 58) { + return failure; + } + + pointer += 2; + ++pieceIndex; + compress = pieceIndex; + } + + while (pointer < input.length) { + if (pieceIndex === 8) { + return failure; + } + + if (input[pointer] === 58) { + if (compress !== null) { + return failure; + } + ++pointer; + ++pieceIndex; + compress = pieceIndex; + continue; + } + + let value = 0; + let length = 0; + + while (length < 4 && isASCIIHex(input[pointer])) { + value = value * 0x10 + parseInt(at(input, pointer), 16); + ++pointer; + ++length; + } + + if (input[pointer] === 46) { + if (length === 0) { + return failure; + } + + pointer -= length; + + if (pieceIndex > 6) { + return failure; + } + + let numbersSeen = 0; + + while (input[pointer] !== undefined) { + let ipv4Piece = null; + + if (numbersSeen > 0) { + if (input[pointer] === 46 && numbersSeen < 4) { + ++pointer; + } else { + return failure; + } + } + + if (!isASCIIDigit(input[pointer])) { + return failure; + } + + while (isASCIIDigit(input[pointer])) { + const number = parseInt(at(input, pointer)); + if (ipv4Piece === null) { + ipv4Piece = number; + } else if (ipv4Piece === 0) { + return failure; + } else { + ipv4Piece = ipv4Piece * 10 + number; + } + if (ipv4Piece > 255) { + return failure; + } + ++pointer; + } + + address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; + + ++numbersSeen; + + if (numbersSeen === 2 || numbersSeen === 4) { + ++pieceIndex; + } + } + + if (numbersSeen !== 4) { + return failure; + } + + break; + } else if (input[pointer] === 58) { + ++pointer; + if (input[pointer] === undefined) { + return failure; + } + } else if (input[pointer] !== undefined) { + return failure; + } + + address[pieceIndex] = value; + ++pieceIndex; + } + + if (compress !== null) { + let swaps = pieceIndex - compress; + pieceIndex = 7; + while (pieceIndex !== 0 && swaps > 0) { + const temp = address[compress + swaps - 1]; + address[compress + swaps - 1] = address[pieceIndex]; + address[pieceIndex] = temp; + --pieceIndex; + --swaps; + } + } else if (compress === null && pieceIndex !== 8) { + return failure; + } + + return address; +} + +function serializeIPv6(address) { + let output = ""; + const seqResult = findLongestZeroSequence(address); + const compress = seqResult.idx; + let ignore0 = false; + + for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { + if (ignore0 && address[pieceIndex] === 0) { + continue; + } else if (ignore0) { + ignore0 = false; + } + + if (compress === pieceIndex) { + const separator = pieceIndex === 0 ? "::" : ":"; + output += separator; + ignore0 = true; + continue; + } + + output += address[pieceIndex].toString(16); + + if (pieceIndex !== 7) { + output += ":"; + } + } + + return output; +} + +function parseHost(input, isSpecialArg) { + if (input[0] === "[") { + if (input[input.length - 1] !== "]") { + return failure; + } + + return parseIPv6(input.substring(1, input.length - 1)); + } + + if (!isSpecialArg) { + return parseOpaqueHost(input); + } + + const domain = utf8PercentDecode(input); + const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); + if (asciiDomain === null) { + return failure; + } + + if (containsForbiddenHostCodePoint(asciiDomain)) { + return failure; + } + + const ipv4Host = parseIPv4(asciiDomain); + if (typeof ipv4Host === "number" || ipv4Host === failure) { + return ipv4Host; + } + + return asciiDomain; +} + +function parseOpaqueHost(input) { + if (containsForbiddenHostCodePointExcludingPercent(input)) { + return failure; + } + + let output = ""; + const decoded = punycode.ucs2.decode(input); + for (let i = 0; i < decoded.length; ++i) { + output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); + } + return output; +} + +function findLongestZeroSequence(arr) { + let maxIdx = null; + let maxLen = 1; // only find elements > 1 + let currStart = null; + let currLen = 0; + + for (let i = 0; i < arr.length; ++i) { + if (arr[i] !== 0) { + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } + + currStart = null; + currLen = 0; + } else { + if (currStart === null) { + currStart = i; + } + ++currLen; + } + } + + // if trailing zeros + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } + + return { + idx: maxIdx, + len: maxLen + }; +} + +function serializeHost(host) { + if (typeof host === "number") { + return serializeIPv4(host); + } + + // IPv6 serializer + if (host instanceof Array) { + return "[" + serializeIPv6(host) + "]"; + } + + return host; +} + +function trimControlChars(url) { + return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); +} + +function trimTabAndNewline(url) { + return url.replace(/\u0009|\u000A|\u000D/g, ""); +} + +function shortenPath(url) { + const path = url.path; + if (path.length === 0) { + return; + } + if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { + return; + } + + path.pop(); +} + +function includesCredentials(url) { + return url.username !== "" || url.password !== ""; +} + +function cannotHaveAUsernamePasswordPort(url) { + return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; +} + +function isNormalizedWindowsDriveLetter(string) { + return /^[A-Za-z]:$/.test(string); +} + +function URLStateMachine(input, base, encodingOverride, url, stateOverride) { + this.pointer = 0; + this.input = input; + this.base = base || null; + this.encodingOverride = encodingOverride || "utf-8"; + this.stateOverride = stateOverride; + this.url = url; + this.failure = false; + this.parseError = false; + + if (!this.url) { + this.url = { + scheme: "", + username: "", + password: "", + host: null, + port: null, + path: [], + query: null, + fragment: null, + + cannotBeABaseURL: false + }; + + const res = trimControlChars(this.input); + if (res !== this.input) { + this.parseError = true; + } + this.input = res; + } + + const res = trimTabAndNewline(this.input); + if (res !== this.input) { + this.parseError = true; + } + this.input = res; + + this.state = stateOverride || "scheme start"; + + this.buffer = ""; + this.atFlag = false; + this.arrFlag = false; + this.passwordTokenSeenFlag = false; + + this.input = punycode.ucs2.decode(this.input); + + for (; this.pointer <= this.input.length; ++this.pointer) { + const c = this.input[this.pointer]; + const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); + + // exec state machine + const ret = this["parse " + this.state](c, cStr); + if (!ret) { + break; // terminate algorithm + } else if (ret === failure) { + this.failure = true; + break; + } + } +} + +URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { + if (isASCIIAlpha(c)) { + this.buffer += cStr.toLowerCase(); + this.state = "scheme"; + } else if (!this.stateOverride) { + this.state = "no scheme"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { + if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { + this.buffer += cStr.toLowerCase(); + } else if (c === 58) { + if (this.stateOverride) { + if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { + return false; + } + + if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { + return false; + } + + if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { + return false; + } + + if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { + return false; + } + } + this.url.scheme = this.buffer; + this.buffer = ""; + if (this.stateOverride) { + return false; + } + if (this.url.scheme === "file") { + if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { + this.parseError = true; + } + this.state = "file"; + } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { + this.state = "special relative or authority"; + } else if (isSpecial(this.url)) { + this.state = "special authority slashes"; + } else if (this.input[this.pointer + 1] === 47) { + this.state = "path or authority"; + ++this.pointer; + } else { + this.url.cannotBeABaseURL = true; + this.url.path.push(""); + this.state = "cannot-be-a-base-URL path"; + } + } else if (!this.stateOverride) { + this.buffer = ""; + this.state = "no scheme"; + this.pointer = -1; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { + if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { + return failure; + } else if (this.base.cannotBeABaseURL && c === 35) { + this.url.scheme = this.base.scheme; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.url.cannotBeABaseURL = true; + this.state = "fragment"; + } else if (this.base.scheme === "file") { + this.state = "file"; + --this.pointer; + } else { + this.state = "relative"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "relative"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { + if (c === 47) { + this.state = "authority"; + } else { + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse relative"] = function parseRelative(c) { + this.url.scheme = this.base.scheme; + if (isNaN(c)) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 47) { + this.state = "relative slash"; + } else if (c === 63) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else if (isSpecial(this.url) && c === 92) { + this.parseError = true; + this.state = "relative slash"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(0, this.base.path.length - 1); + + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { + if (isSpecial(this.url) && (c === 47 || c === 92)) { + if (c === 92) { + this.parseError = true; + } + this.state = "special authority ignore slashes"; + } else if (c === 47) { + this.state = "authority"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "special authority ignore slashes"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { + if (c !== 47 && c !== 92) { + this.state = "authority"; + --this.pointer; + } else { + this.parseError = true; + } + + return true; +}; + +URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { + if (c === 64) { + this.parseError = true; + if (this.atFlag) { + this.buffer = "%40" + this.buffer; + } + this.atFlag = true; + + // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars + const len = countSymbols(this.buffer); + for (let pointer = 0; pointer < len; ++pointer) { + const codePoint = this.buffer.codePointAt(pointer); + + if (codePoint === 58 && !this.passwordTokenSeenFlag) { + this.passwordTokenSeenFlag = true; + continue; + } + const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); + if (this.passwordTokenSeenFlag) { + this.url.password += encodedCodePoints; + } else { + this.url.username += encodedCodePoints; + } + } + this.buffer = ""; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + if (this.atFlag && this.buffer === "") { + this.parseError = true; + return failure; + } + this.pointer -= countSymbols(this.buffer) + 1; + this.buffer = ""; + this.state = "host"; + } else { + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse hostname"] = +URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { + if (this.stateOverride && this.url.scheme === "file") { + --this.pointer; + this.state = "file host"; + } else if (c === 58 && !this.arrFlag) { + if (this.buffer === "") { + this.parseError = true; + return failure; + } + + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + + this.url.host = host; + this.buffer = ""; + this.state = "port"; + if (this.stateOverride === "hostname") { + return false; + } + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + --this.pointer; + if (isSpecial(this.url) && this.buffer === "") { + this.parseError = true; + return failure; + } else if (this.stateOverride && this.buffer === "" && + (includesCredentials(this.url) || this.url.port !== null)) { + this.parseError = true; + return false; + } + + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + + this.url.host = host; + this.buffer = ""; + this.state = "path start"; + if (this.stateOverride) { + return false; + } + } else { + if (c === 91) { + this.arrFlag = true; + } else if (c === 93) { + this.arrFlag = false; + } + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { + if (isASCIIDigit(c)) { + this.buffer += cStr; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92) || + this.stateOverride) { + if (this.buffer !== "") { + const port = parseInt(this.buffer); + if (port > Math.pow(2, 16) - 1) { + this.parseError = true; + return failure; + } + this.url.port = port === defaultPort(this.url.scheme) ? null : port; + this.buffer = ""; + } + if (this.stateOverride) { + return false; + } + this.state = "path start"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); + +URLStateMachine.prototype["parse file"] = function parseFile(c) { + this.url.scheme = "file"; + + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file slash"; + } else if (this.base !== null && this.base.scheme === "file") { + if (isNaN(c)) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 63) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else { + if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points + !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || + (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points + !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + shortenPath(this.url); + } else { + this.parseError = true; + } + + this.state = "path"; + --this.pointer; + } + } else { + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file host"; + } else { + if (this.base !== null && this.base.scheme === "file") { + if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { + this.url.path.push(this.base.path[0]); + } else { + this.url.host = this.base.host; + } + } + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { + if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { + --this.pointer; + if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { + this.parseError = true; + this.state = "path"; + } else if (this.buffer === "") { + this.url.host = ""; + if (this.stateOverride) { + return false; + } + this.state = "path start"; + } else { + let host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + if (host === "localhost") { + host = ""; + } + this.url.host = host; + + if (this.stateOverride) { + return false; + } + + this.buffer = ""; + this.state = "path start"; + } + } else { + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { + if (isSpecial(this.url)) { + if (c === 92) { + this.parseError = true; + } + this.state = "path"; + + if (c !== 47 && c !== 92) { + --this.pointer; + } + } else if (!this.stateOverride && c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (!this.stateOverride && c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else if (c !== undefined) { + this.state = "path"; + if (c !== 47) { + --this.pointer; + } + } + + return true; +}; + +URLStateMachine.prototype["parse path"] = function parsePath(c) { + if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || + (!this.stateOverride && (c === 63 || c === 35))) { + if (isSpecial(this.url) && c === 92) { + this.parseError = true; + } + + if (isDoubleDot(this.buffer)) { + shortenPath(this.url); + if (c !== 47 && !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } + } else if (isSingleDot(this.buffer) && c !== 47 && + !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } else if (!isSingleDot(this.buffer)) { + if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { + if (this.url.host !== "" && this.url.host !== null) { + this.parseError = true; + this.url.host = ""; + } + this.buffer = this.buffer[0] + ":"; + } + this.url.path.push(this.buffer); + } + this.buffer = ""; + if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { + while (this.url.path.length > 1 && this.url.path[0] === "") { + this.parseError = true; + this.url.path.shift(); + } + } + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. + + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.buffer += percentEncodeChar(c, isPathPercentEncode); + } + + return true; +}; + +URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else { + // TODO: Add: not a URL code point + if (!isNaN(c) && c !== 37) { + this.parseError = true; + } + + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + if (!isNaN(c)) { + this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); + } + } + + return true; +}; + +URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { + if (isNaN(c) || (!this.stateOverride && c === 35)) { + if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { + this.encodingOverride = "utf-8"; + } + + const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead + for (let i = 0; i < buffer.length; ++i) { + if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || + buffer[i] === 0x3C || buffer[i] === 0x3E) { + this.url.query += percentEncode(buffer[i]); + } else { + this.url.query += String.fromCodePoint(buffer[i]); + } + } + + this.buffer = ""; + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { + if (isNaN(c)) { // do nothing + } else if (c === 0x0) { + this.parseError = true; + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); + } + + return true; +}; + +function serializeURL(url, excludeFragment) { + let output = url.scheme + ":"; + if (url.host !== null) { + output += "//"; + + if (url.username !== "" || url.password !== "") { + output += url.username; + if (url.password !== "") { + output += ":" + url.password; + } + output += "@"; + } + + output += serializeHost(url.host); + + if (url.port !== null) { + output += ":" + url.port; + } + } else if (url.host === null && url.scheme === "file") { + output += "//"; + } + + if (url.cannotBeABaseURL) { + output += url.path[0]; + } else { + for (const string of url.path) { + output += "/" + string; + } + } + + if (url.query !== null) { + output += "?" + url.query; + } + + if (!excludeFragment && url.fragment !== null) { + output += "#" + url.fragment; + } + + return output; +} + +function serializeOrigin(tuple) { + let result = tuple.scheme + "://"; + result += serializeHost(tuple.host); + + if (tuple.port !== null) { + result += ":" + tuple.port; + } + + return result; +} + +module.exports.serializeURL = serializeURL; + +module.exports.serializeURLOrigin = function (url) { + // https://url.spec.whatwg.org/#concept-url-origin + switch (url.scheme) { + case "blob": + try { + return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); + } catch (e) { + // serializing an opaque origin returns "null" + return "null"; + } + case "ftp": + case "gopher": + case "http": + case "https": + case "ws": + case "wss": + return serializeOrigin({ + scheme: url.scheme, + host: url.host, + port: url.port + }); + case "file": + // spec says "exercise to the reader", chrome says "file://" + return "file://"; + default: + // serializing an opaque origin returns "null" + return "null"; + } +}; + +module.exports.basicURLParse = function (input, options) { + if (options === undefined) { + options = {}; + } + + const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); + if (usm.failure) { + return "failure"; + } + + return usm.url; +}; + +module.exports.setTheUsername = function (url, username) { + url.username = ""; + const decoded = punycode.ucs2.decode(username); + for (let i = 0; i < decoded.length; ++i) { + url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + } +}; + +module.exports.setThePassword = function (url, password) { + url.password = ""; + const decoded = punycode.ucs2.decode(password); + for (let i = 0; i < decoded.length; ++i) { + url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + } +}; + +module.exports.serializeHost = serializeHost; + +module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; + +module.exports.serializeInteger = function (integer) { + return String(integer); +}; + +module.exports.parseURL = function (input, options) { + if (options === undefined) { + options = {}; + } + + // We don't handle blobs, so this just delegates: + return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); +}; /***/ }), @@ -89001,6 +89025,7 @@ class Comparator { static get ANY () { return ANY } + constructor (comp, options) { options = parseOptions(options) @@ -89077,7 +89102,7 @@ class Comparator { if (!options || typeof options !== 'object') { options = { loose: !!options, - includePrerelease: false + includePrerelease: false, } } @@ -89125,7 +89150,7 @@ class Comparator { module.exports = Comparator const parseOptions = __nccwpck_require__(785) -const {re, t} = __nccwpck_require__(9523) +const { re, t } = __nccwpck_require__(9523) const cmp = __nccwpck_require__(5098) const debug = __nccwpck_require__(106) const SemVer = __nccwpck_require__(8088) @@ -89168,9 +89193,9 @@ class Range { // First, split based on boolean or || this.raw = range this.set = range - .split(/\s*\|\|\s*/) + .split('||') // map the range to a 2d array of comparators - .map(range => this.parseRange(range.trim())) + .map(r => this.parseRange(r.trim())) // throw out any comparator lists that are empty // this generally means that it was not a valid range, which is allowed // in loose mode, but will still throw if the WHOLE range is invalid. @@ -89185,9 +89210,9 @@ class Range { // keep the first one, in case they're all null sets const first = this.set[0] this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) + if (this.set.length === 0) { this.set = [first] - else if (this.set.length > 1) { + } else if (this.set.length > 1) { // if we have any that are *, then the range is just * for (const c of this.set) { if (c.length === 1 && isAny(c[0])) { @@ -89223,8 +89248,9 @@ class Range { const memoOpts = Object.keys(this.options).join(',') const memoKey = `parseRange:${memoOpts}:${range}` const cached = cache.get(memoKey) - if (cached) + if (cached) { return cached + } const loose = this.options.loose // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` @@ -89233,7 +89259,7 @@ class Range { debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[t.COMPARATORTRIM]) + debug('comparator trim', range) // `~ 1.2.3` => `~1.2.3` range = range.replace(re[t.TILDETRIM], tildeTrimReplace) @@ -89247,30 +89273,37 @@ class Range { // At this point, the range is completely trimmed and // ready to be split into comparators. - const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const rangeList = range + let rangeList = range .split(' ') .map(comp => parseComparator(comp, this.options)) .join(' ') .split(/\s+/) // >=0.0.0 is equivalent to * .map(comp => replaceGTE0(comp, this.options)) + + if (loose) { // in loose mode, throw out any that are not valid comparators - .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) - .map(comp => new Comparator(comp, this.options)) + rangeList = rangeList.filter(comp => { + debug('loose invalid filter', comp, this.options) + return !!comp.match(re[t.COMPARATORLOOSE]) + }) + } + debug('range list', rangeList) // if any comparators are the null set, then replace with JUST null set // if more than one comparator, remove any * comparators // also, don't include the same comparator more than once - const l = rangeList.length const rangeMap = new Map() - for (const comp of rangeList) { - if (isNullSet(comp)) + const comparators = rangeList.map(comp => new Comparator(comp, this.options)) + for (const comp of comparators) { + if (isNullSet(comp)) { return [comp] + } rangeMap.set(comp.value, comp) } - if (rangeMap.size > 1 && rangeMap.has('')) + if (rangeMap.size > 1 && rangeMap.has('')) { rangeMap.delete('') + } const result = [...rangeMap.values()] cache.set(memoKey, result) @@ -89335,7 +89368,7 @@ const { t, comparatorTrimReplace, tildeTrimReplace, - caretTrimReplace + caretTrimReplace, } = __nccwpck_require__(9523) const isNullSet = c => c.value === '<0.0.0-0' @@ -89383,9 +89416,10 @@ const isX = id => !id || id.toLowerCase() === 'x' || id === '*' // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +// ~0.0.1 --> >=0.0.1 <0.1.0-0 const replaceTildes = (comp, options) => - comp.trim().split(/\s+/).map((comp) => { - return replaceTilde(comp, options) + comp.trim().split(/\s+/).map((c) => { + return replaceTilde(c, options) }).join(' ') const replaceTilde = (comp, options) => { @@ -89422,9 +89456,11 @@ const replaceTilde = (comp, options) => { // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 // ^1.2.3 --> >=1.2.3 <2.0.0-0 // ^1.2.0 --> >=1.2.0 <2.0.0-0 +// ^0.0.1 --> >=0.0.1 <0.0.2-0 +// ^0.1.0 --> >=0.1.0 <0.2.0-0 const replaceCarets = (comp, options) => - comp.trim().split(/\s+/).map((comp) => { - return replaceCaret(comp, options) + comp.trim().split(/\s+/).map((c) => { + return replaceCaret(c, options) }).join(' ') const replaceCaret = (comp, options) => { @@ -89482,8 +89518,8 @@ const replaceCaret = (comp, options) => { const replaceXRanges = (comp, options) => { debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map((comp) => { - return replaceXRange(comp, options) + return comp.split(/\s+/).map((c) => { + return replaceXRange(c, options) }).join(' ') } @@ -89544,8 +89580,9 @@ const replaceXRange = (comp, options) => { } } - if (gtlt === '<') + if (gtlt === '<') { pr = '-0' + } ret = `${gtlt + M}.${m}.${p}${pr}` } else if (xm) { @@ -89921,7 +89958,7 @@ class SemVer { if (identifier) { // 1.2.0-beta.1 bumps to 1.2.0-beta.2, // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { if (isNaN(this.prerelease[1])) { this.prerelease = [identifier, 0] } @@ -89971,17 +90008,21 @@ const lte = __nccwpck_require__(7520) const cmp = (a, op, b, loose) => { switch (op) { case '===': - if (typeof a === 'object') + if (typeof a === 'object') { a = a.version - if (typeof b === 'object') + } + if (typeof b === 'object') { b = b.version + } return a === b case '!==': - if (typeof a === 'object') + if (typeof a === 'object') { a = a.version - if (typeof b === 'object') + } + if (typeof b === 'object') { b = b.version + } return a !== b case '': @@ -90018,7 +90059,7 @@ module.exports = cmp const SemVer = __nccwpck_require__(8088) const parse = __nccwpck_require__(5925) -const {re, t} = __nccwpck_require__(9523) +const { re, t } = __nccwpck_require__(9523) const coerce = (version, options) => { if (version instanceof SemVer) { @@ -90061,8 +90102,9 @@ const coerce = (version, options) => { re[t.COERCERTL].lastIndex = -1 } - if (match === null) + if (match === null) { return null + } return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) } @@ -90179,7 +90221,10 @@ const inc = (version, release, options, identifier) => { } try { - return new SemVer(version, options).inc(release, identifier).version + return new SemVer( + version instanceof SemVer ? version.version : version, + options + ).inc(release, identifier).version } catch (er) { return null } @@ -90242,7 +90287,7 @@ module.exports = neq /***/ 5925: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const {MAX_LENGTH} = __nccwpck_require__(2293) +const { MAX_LENGTH } = __nccwpck_require__(2293) const { re, t } = __nccwpck_require__(9523) const SemVer = __nccwpck_require__(8088) @@ -90367,51 +90412,91 @@ module.exports = valid // just pre-load all the stuff that index.js lazily exports const internalRe = __nccwpck_require__(9523) +const constants = __nccwpck_require__(2293) +const SemVer = __nccwpck_require__(8088) +const identifiers = __nccwpck_require__(2463) +const parse = __nccwpck_require__(5925) +const valid = __nccwpck_require__(9601) +const clean = __nccwpck_require__(8848) +const inc = __nccwpck_require__(900) +const diff = __nccwpck_require__(4297) +const major = __nccwpck_require__(6688) +const minor = __nccwpck_require__(8447) +const patch = __nccwpck_require__(2866) +const prerelease = __nccwpck_require__(4016) +const compare = __nccwpck_require__(9834) +const rcompare = __nccwpck_require__(7499) +const compareLoose = __nccwpck_require__(2804) +const compareBuild = __nccwpck_require__(2156) +const sort = __nccwpck_require__(1426) +const rsort = __nccwpck_require__(8701) +const gt = __nccwpck_require__(4123) +const lt = __nccwpck_require__(194) +const eq = __nccwpck_require__(1898) +const neq = __nccwpck_require__(6017) +const gte = __nccwpck_require__(5522) +const lte = __nccwpck_require__(7520) +const cmp = __nccwpck_require__(5098) +const coerce = __nccwpck_require__(3466) +const Comparator = __nccwpck_require__(1532) +const Range = __nccwpck_require__(9828) +const satisfies = __nccwpck_require__(6055) +const toComparators = __nccwpck_require__(2706) +const maxSatisfying = __nccwpck_require__(579) +const minSatisfying = __nccwpck_require__(832) +const minVersion = __nccwpck_require__(4179) +const validRange = __nccwpck_require__(2098) +const outside = __nccwpck_require__(420) +const gtr = __nccwpck_require__(9380) +const ltr = __nccwpck_require__(3323) +const intersects = __nccwpck_require__(7008) +const simplifyRange = __nccwpck_require__(5297) +const subset = __nccwpck_require__(7863) module.exports = { + parse, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, re: internalRe.re, src: internalRe.src, tokens: internalRe.t, - SEMVER_SPEC_VERSION: (__nccwpck_require__(2293).SEMVER_SPEC_VERSION), - SemVer: __nccwpck_require__(8088), - compareIdentifiers: (__nccwpck_require__(2463).compareIdentifiers), - rcompareIdentifiers: (__nccwpck_require__(2463).rcompareIdentifiers), - parse: __nccwpck_require__(5925), - valid: __nccwpck_require__(9601), - clean: __nccwpck_require__(8848), - inc: __nccwpck_require__(900), - diff: __nccwpck_require__(4297), - major: __nccwpck_require__(6688), - minor: __nccwpck_require__(8447), - patch: __nccwpck_require__(2866), - prerelease: __nccwpck_require__(4016), - compare: __nccwpck_require__(9834), - rcompare: __nccwpck_require__(7499), - compareLoose: __nccwpck_require__(2804), - compareBuild: __nccwpck_require__(2156), - sort: __nccwpck_require__(1426), - rsort: __nccwpck_require__(8701), - gt: __nccwpck_require__(4123), - lt: __nccwpck_require__(194), - eq: __nccwpck_require__(1898), - neq: __nccwpck_require__(6017), - gte: __nccwpck_require__(5522), - lte: __nccwpck_require__(7520), - cmp: __nccwpck_require__(5098), - coerce: __nccwpck_require__(3466), - Comparator: __nccwpck_require__(1532), - Range: __nccwpck_require__(9828), - satisfies: __nccwpck_require__(6055), - toComparators: __nccwpck_require__(2706), - maxSatisfying: __nccwpck_require__(579), - minSatisfying: __nccwpck_require__(832), - minVersion: __nccwpck_require__(4179), - validRange: __nccwpck_require__(2098), - outside: __nccwpck_require__(420), - gtr: __nccwpck_require__(9380), - ltr: __nccwpck_require__(3323), - intersects: __nccwpck_require__(7008), - simplifyRange: __nccwpck_require__(5297), - subset: __nccwpck_require__(7863), + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers, } @@ -90426,7 +90511,7 @@ const SEMVER_SPEC_VERSION = '2.0.0' const MAX_LENGTH = 256 const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 +/* istanbul ignore next */ 9007199254740991 // Max safe segment length for coercion. const MAX_SAFE_COMPONENT_LENGTH = 16 @@ -90435,7 +90520,7 @@ module.exports = { SEMVER_SPEC_VERSION, MAX_LENGTH, MAX_SAFE_INTEGER, - MAX_SAFE_COMPONENT_LENGTH + MAX_SAFE_COMPONENT_LENGTH, } @@ -90481,7 +90566,7 @@ const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) module.exports = { compareIdentifiers, - rcompareIdentifiers + rcompareIdentifiers, } @@ -90496,9 +90581,9 @@ const opts = ['includePrerelease', 'loose', 'rtl'] const parseOptions = options => !options ? {} : typeof options !== 'object' ? { loose: true } - : opts.filter(k => options[k]).reduce((options, k) => { - options[k] = true - return options + : opts.filter(k => options[k]).reduce((o, k) => { + o[k] = true + return o }, {}) module.exports = parseOptions @@ -90520,7 +90605,7 @@ let R = 0 const createToken = (name, value, isGlobal) => { const index = R++ - debug(index, value) + debug(name, index, value) t[name] = index src[index] = value re[index] = new RegExp(value, isGlobal ? 'g' : undefined) @@ -90688,8 +90773,8 @@ createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + // Star ranges basically just allow anything at all. createToken('STAR', '(<|>)?=?\\s*\\*') // >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') +createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') /***/ }), @@ -90845,8 +90930,9 @@ const minVersion = (range, loose) => { throw new Error(`Unexpected operation: ${comparator.operator}`) } }) - if (setMin && (!minver || gt(minver, setMin))) + if (setMin && (!minver || gt(minver, setMin))) { minver = setMin + } } if (minver && range.test(minver)) { @@ -90865,7 +90951,7 @@ module.exports = minVersion const SemVer = __nccwpck_require__(8088) const Comparator = __nccwpck_require__(1532) -const {ANY} = Comparator +const { ANY } = Comparator const Range = __nccwpck_require__(9828) const satisfies = __nccwpck_require__(6055) const gt = __nccwpck_require__(4123) @@ -90957,38 +91043,41 @@ const satisfies = __nccwpck_require__(6055) const compare = __nccwpck_require__(9834) module.exports = (versions, range, options) => { const set = [] - let min = null + let first = null let prev = null const v = versions.sort((a, b) => compare(a, b, options)) for (const version of v) { const included = satisfies(version, range, options) if (included) { prev = version - if (!min) - min = version + if (!first) { + first = version + } } else { if (prev) { - set.push([min, prev]) + set.push([first, prev]) } prev = null - min = null + first = null } } - if (min) - set.push([min, null]) + if (first) { + set.push([first, null]) + } const ranges = [] for (const [min, max] of set) { - if (min === max) + if (min === max) { ranges.push(min) - else if (!max && min === v[0]) + } else if (!max && min === v[0]) { ranges.push('*') - else if (!max) + } else if (!max) { ranges.push(`>=${min}`) - else if (min === v[0]) + } else if (min === v[0]) { ranges.push(`<=${max}`) - else + } else { ranges.push(`${min} - ${max}`) + } } const simplified = ranges.join(' || ') const original = typeof range.raw === 'string' ? range.raw : String(range) @@ -91002,22 +91091,30 @@ module.exports = (versions, range, options) => { /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { const Range = __nccwpck_require__(9828) -const { ANY } = __nccwpck_require__(1532) +const Comparator = __nccwpck_require__(1532) +const { ANY } = Comparator const satisfies = __nccwpck_require__(6055) const compare = __nccwpck_require__(9834) // Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a subset of some `R1, R2, ...` +// - Every simple range `r1, r2, ...` is a null set, OR +// - Every simple range `r1, r2, ...` which is not a null set is a subset of +// some `R1, R2, ...` // // Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: // - If c is only the ANY comparator // - If C is only the ANY comparator, return true -// - Else return false +// - Else if in prerelease mode, return false +// - else replace c with `[>=0.0.0]` +// - If C is only the ANY comparator +// - if in prerelease mode, return true +// - else replace C with `[>=0.0.0]` // - Let EQ be the set of = comparators in c // - If EQ is more than one, return true (null set) // - Let GT be the highest > or >= comparator in c // - Let LT be the lowest < or <= comparator in c // - If GT and LT, and GT.semver > LT.semver, return true (null set) +// - If any C is a = range, and GT or LT are set, return false // - If EQ // - If GT, and EQ does not satisfy GT, return true (null set) // - If LT, and EQ does not satisfy LT, return true (null set) @@ -91026,15 +91123,19 @@ const compare = __nccwpck_require__(9834) // - If GT // - If GT.semver is lower than any > or >= comp in C, return false // - If GT is >=, and GT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the GT.semver tuple, return false // - If LT // - If LT.semver is greater than any < or <= comp in C, return false // - If LT is <=, and LT.semver does not satisfy every C, return false -// - If any C is a = range, and GT or LT are set, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the LT.semver tuple, return false // - Else return true -const subset = (sub, dom, options) => { - if (sub === dom) +const subset = (sub, dom, options = {}) => { + if (sub === dom) { return true + } sub = new Range(sub, options) dom = new Range(dom, options) @@ -91044,60 +91145,84 @@ const subset = (sub, dom, options) => { for (const simpleDom of dom.set) { const isSub = simpleSubset(simpleSub, simpleDom, options) sawNonNull = sawNonNull || isSub !== null - if (isSub) + if (isSub) { continue OUTER + } } // the null set is a subset of everything, but null simple ranges in // a complex range should be ignored. so if we saw a non-null range, // then we know this isn't a subset, but if EVERY simple range was null, // then it is a subset. - if (sawNonNull) + if (sawNonNull) { return false + } } return true } const simpleSubset = (sub, dom, options) => { - if (sub === dom) + if (sub === dom) { return true + } - if (sub.length === 1 && sub[0].semver === ANY) - return dom.length === 1 && dom[0].semver === ANY + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true + } else if (options.includePrerelease) { + sub = [new Comparator('>=0.0.0-0')] + } else { + sub = [new Comparator('>=0.0.0')] + } + } + + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true + } else { + dom = [new Comparator('>=0.0.0')] + } + } const eqSet = new Set() let gt, lt for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') + if (c.operator === '>' || c.operator === '>=') { gt = higherGT(gt, c, options) - else if (c.operator === '<' || c.operator === '<=') + } else if (c.operator === '<' || c.operator === '<=') { lt = lowerLT(lt, c, options) - else + } else { eqSet.add(c.semver) + } } - if (eqSet.size > 1) + if (eqSet.size > 1) { return null + } let gtltComp if (gt && lt) { gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) + if (gtltComp > 0) { return null - else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) + } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { return null + } } // will iterate one or zero times for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) + if (gt && !satisfies(eq, String(gt), options)) { return null + } - if (lt && !satisfies(eq, String(lt), options)) + if (lt && !satisfies(eq, String(lt), options)) { return null + } for (const c of dom) { - if (!satisfies(eq, String(c), options)) + if (!satisfies(eq, String(c), options)) { return false + } } return true @@ -91105,45 +91230,90 @@ const simpleSubset = (sub, dom, options) => { let higher, lower let hasDomLT, hasDomGT + // if the subset has a prerelease, we need a comparator in the superset + // with the same tuple and a prerelease, or it's not a subset + let needDomLTPre = lt && + !options.includePrerelease && + lt.semver.prerelease.length ? lt.semver : false + let needDomGTPre = gt && + !options.includePrerelease && + gt.semver.prerelease.length ? gt.semver : false + // exception: <1.2.3-0 is the same as <1.2.3 + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && + lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false + } + for (const c of dom) { hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false + } + } if (c.operator === '>' || c.operator === '>=') { higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) + if (higher === c && higher !== gt) { return false - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) + } + } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { return false + } } if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false + } + } if (c.operator === '<' || c.operator === '<=') { lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) + if (lower === c && lower !== lt) { return false - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) + } + } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { return false + } } - if (!c.operator && (lt || gt) && gtltComp !== 0) + if (!c.operator && (lt || gt) && gtltComp !== 0) { return false + } } // if there was a < or >, and nothing in the dom, then must be false // UNLESS it was limited by another range in the other direction. // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) + if (gt && hasDomLT && !lt && gtltComp !== 0) { return false + } - if (lt && hasDomGT && !gt && gtltComp !== 0) + if (lt && hasDomGT && !gt && gtltComp !== 0) { return false + } + + // we needed a prerelease range in a specific tuple, but didn't get one + // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, + // because it includes prereleases in the 1.2.3 tuple + if (needDomGTPre || needDomLTPre) { + return false + } return true } // >=1.2.3 is lower than >1.2.3 const higherGT = (a, b, options) => { - if (!a) + if (!a) { return b + } const comp = compare(a.semver, b.semver, options) return comp > 0 ? a : comp < 0 ? b @@ -91153,8 +91323,9 @@ const higherGT = (a, b, options) => { // <=1.2.3 is higher than <1.2.3 const lowerLT = (a, b, options) => { - if (!a) + if (!a) { return b + } const comp = compare(a.semver, b.semver, options) return comp < 0 ? a : comp > 0 ? b @@ -103280,9 +103451,11 @@ function configureAuthentication() { const id = core.getInput(constants.INPUT_SERVER_ID); const username = core.getInput(constants.INPUT_SERVER_USERNAME); const password = core.getInput(constants.INPUT_SERVER_PASSWORD); - const settingsDirectory = core.getInput(constants.INPUT_SETTINGS_PATH) || path.join(os.homedir(), constants.M2_DIR); + const settingsDirectory = core.getInput(constants.INPUT_SETTINGS_PATH) || + path.join(os.homedir(), constants.M2_DIR); const overwriteSettings = util_1.getBooleanInput(constants.INPUT_OVERWRITE_SETTINGS, true); - const gpgPrivateKey = core.getInput(constants.INPUT_GPG_PRIVATE_KEY) || constants.INPUT_DEFAULT_GPG_PRIVATE_KEY; + const gpgPrivateKey = core.getInput(constants.INPUT_GPG_PRIVATE_KEY) || + constants.INPUT_DEFAULT_GPG_PRIVATE_KEY; const gpgPassphrase = core.getInput(constants.INPUT_GPG_PASSPHRASE) || (gpgPrivateKey ? constants.INPUT_DEFAULT_GPG_PASSPHRASE : undefined); if (gpgPrivateKey) { @@ -103421,7 +103594,10 @@ const supportedPackageManager = [ }, { id: 'gradle', - path: [path_1.join(os_1.default.homedir(), '.gradle', 'caches'), path_1.join(os_1.default.homedir(), '.gradle', 'wrapper')], + path: [ + path_1.join(os_1.default.homedir(), '.gradle', 'caches'), + path_1.join(os_1.default.homedir(), '.gradle', 'wrapper') + ], // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---gradle pattern: [ '**/*.gradle*', @@ -103442,7 +103618,11 @@ const supportedPackageManager = [ '!' + path_1.join(os_1.default.homedir(), '.sbt', '*.lock'), '!' + path_1.join(os_1.default.homedir(), '**', 'ivydata-*.properties') ], - pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] + pattern: [ + '**/*.sbt', + '**/project/build.properties', + '**/project/**.{scala,sbt}' + ] } ]; function getCoursierCachePath() { @@ -103542,7 +103722,8 @@ exports.save = save; * @see {@link https://github.com/actions/cache/issues/454#issuecomment-840493935|why --no-daemon is necessary} */ function isProbablyGradleDaemonProblem(packageManager, error) { - if (packageManager.id !== 'gradle' || process.env['RUNNER_OS'] !== 'Windows') { + if (packageManager.id !== 'gradle' || + process.env['RUNNER_OS'] !== 'Windows') { return false; } const message = error.message || ''; @@ -103558,9 +103739,10 @@ function isProbablyGradleDaemonProblem(packageManager, error) { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0; +exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = exports.INPUT_MVN_TOOLCHAIN_VENDOR = exports.INPUT_MVN_TOOLCHAIN_ID = exports.MVN_TOOLCHAINS_FILE = exports.MVN_SETTINGS_FILE = exports.M2_DIR = exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = exports.INPUT_JOB_STATUS = exports.INPUT_CACHE = exports.INPUT_DEFAULT_GPG_PASSPHRASE = exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = exports.INPUT_GPG_PASSPHRASE = exports.INPUT_GPG_PRIVATE_KEY = exports.INPUT_OVERWRITE_SETTINGS = exports.INPUT_SETTINGS_PATH = exports.INPUT_SERVER_PASSWORD = exports.INPUT_SERVER_USERNAME = exports.INPUT_SERVER_ID = exports.INPUT_CHECK_LATEST = exports.INPUT_JDK_FILE = exports.INPUT_DISTRIBUTION = exports.INPUT_JAVA_PACKAGE = exports.INPUT_ARCHITECTURE = exports.INPUT_JAVA_VERSION_FILE = exports.INPUT_JAVA_VERSION = exports.MACOS_JAVA_CONTENT_POSTFIX = void 0; exports.MACOS_JAVA_CONTENT_POSTFIX = 'Contents/Home'; exports.INPUT_JAVA_VERSION = 'java-version'; +exports.INPUT_JAVA_VERSION_FILE = 'java-version-file'; exports.INPUT_ARCHITECTURE = 'architecture'; exports.INPUT_JAVA_PACKAGE = 'java-package'; exports.INPUT_DISTRIBUTION = 'distribution'; @@ -103583,6 +103765,7 @@ exports.MVN_SETTINGS_FILE = 'settings.xml'; exports.MVN_TOOLCHAINS_FILE = 'toolchains.xml'; exports.INPUT_MVN_TOOLCHAIN_ID = 'mvn-toolchain-id'; exports.INPUT_MVN_TOOLCHAIN_VENDOR = 'mvn-toolchain-vendor'; +exports.DISTRIBUTIONS_ONLY_MAJOR_VERSION = ['corretto']; /***/ }), @@ -103660,7 +103843,9 @@ class AdoptDistribution extends base_installer_1.JavaBase { }); const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; if (!resolvedFullVersion) { - const availableOptions = availableVersionsWithBinaries.map(item => item.version).join(', '); + const availableOptions = availableVersionsWithBinaries + .map(item => item.version) + .join(', '); const availableOptionsMessage = availableOptions ? `\nAvailable versions: ${availableOptions}` : ''; @@ -103671,17 +103856,15 @@ class AdoptDistribution extends base_installer_1.JavaBase { } downloadTool(javaRelease) { return __awaiter(this, void 0, void 0, function* () { - let javaPath; - let extractedJavaPath; core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); const javaArchivePath = yield tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); - let extension = util_1.getDownloadArchiveExtension(); - extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath, extension); + const extension = util_1.getDownloadArchiveExtension(); + const extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath, extension); const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; const archivePath = path_1.default.join(extractedJavaPath, archiveName); const version = this.getToolcacheVersionName(javaRelease.version); - javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); return { version: javaRelease.version, path: javaPath }; }); } @@ -103701,7 +103884,7 @@ class AdoptDistribution extends base_installer_1.JavaBase { const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions const releaseType = this.stable ? 'ga' : 'ea'; if (core.isDebug()) { - console.time('adopt-retrieve-available-versions'); + console.time('Retrieving available versions for Adopt took'); // eslint-disable-line no-console } const baseRequestArguments = [ `project=jdk`, @@ -103736,9 +103919,9 @@ class AdoptDistribution extends base_installer_1.JavaBase { } if (core.isDebug()) { core.startGroup('Print information about available versions'); - console.timeEnd('adopt-retrieve-available-versions'); - console.log(`Available versions: [${availableVersions.length}]`); - console.log(availableVersions.map(item => item.version_data.semver).join(', ')); + console.timeEnd('Retrieving available versions for Adopt took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.version_data.semver).join(', ')); core.endGroup(); } return availableVersions; @@ -104031,7 +104214,9 @@ class CorrettoDistribution extends base_installer_1.JavaBase { }); const resolvedVersion = matchingVersions.length > 0 ? matchingVersions[0] : null; if (!resolvedVersion) { - const availableOptions = availableVersions.map(item => item.version).join(', '); + const availableOptions = availableVersions + .map(item => item.version) + .join(', '); const availableOptionsMessage = availableOptions ? `\nAvailable versions: ${availableOptions}` : ''; @@ -104047,7 +104232,7 @@ class CorrettoDistribution extends base_installer_1.JavaBase { const arch = this.distributionArchitecture(); const imageType = this.packageType; if (core.isDebug()) { - console.time('corretto-retrieve-available-versions'); + console.time('Retrieving available versions for Coretto took'); // eslint-disable-line no-console } const availableVersionsUrl = 'https://corretto.github.io/corretto-downloads/latest_links/indexmap_with_checksum.json'; const fetchCurrentVersions = yield this.http.getJson(availableVersionsUrl); @@ -104058,7 +104243,13 @@ class CorrettoDistribution extends base_installer_1.JavaBase { const eligibleVersions = (_b = (_a = fetchedCurrentVersions === null || fetchedCurrentVersions === void 0 ? void 0 : fetchedCurrentVersions[platform]) === null || _a === void 0 ? void 0 : _a[arch]) === null || _b === void 0 ? void 0 : _b[imageType]; const availableVersions = this.getAvailableVersionsForPlatform(eligibleVersions); if (core.isDebug()) { - this.printAvailableVersions(availableVersions); + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Coretto took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions + .map(item => `${item.version}: ${item.correttoVersion}`) + .join(', ')); + core.endGroup(); } return availableVersions; }); @@ -104087,13 +104278,6 @@ class CorrettoDistribution extends base_installer_1.JavaBase { } return availableVersions; } - printAvailableVersions(availableVersions) { - core.startGroup('Print information about available versions'); - console.timeEnd('corretto-retrieve-available-versions'); - console.log(`Available versions: [${availableVersions.length}]`); - console.log(availableVersions.map(item => `${item.version}: ${item.correttoVersion}`).join(', ')); - core.endGroup(); - } getPlatformOption() { // Corretto has its own platform names so we need to map them switch (process.platform) { @@ -104132,7 +104316,9 @@ const installer_3 = __nccwpck_require__(8766); const installer_4 = __nccwpck_require__(8579); const installer_5 = __nccwpck_require__(883); const installer_6 = __nccwpck_require__(3613); -const installer_7 = __nccwpck_require__(4750); +const installer_7 = __nccwpck_require__(1121); +const installer_8 = __nccwpck_require__(4750); +const installer_9 = __nccwpck_require__(4298); var JavaDistribution; (function (JavaDistribution) { JavaDistribution["Adopt"] = "adopt"; @@ -104143,7 +104329,9 @@ var JavaDistribution; JavaDistribution["Liberica"] = "liberica"; JavaDistribution["JdkFile"] = "jdkfile"; JavaDistribution["Microsoft"] = "microsoft"; + JavaDistribution["Semeru"] = "semeru"; JavaDistribution["Corretto"] = "corretto"; + JavaDistribution["Oracle"] = "oracle"; })(JavaDistribution || (JavaDistribution = {})); function getJavaDistribution(distributionName, installerOptions, jdkFile) { switch (distributionName) { @@ -104162,8 +104350,12 @@ function getJavaDistribution(distributionName, installerOptions, jdkFile) { return new installer_5.LibericaDistributions(installerOptions); case JavaDistribution.Microsoft: return new installer_6.MicrosoftDistributions(installerOptions); + case JavaDistribution.Semeru: + return new installer_7.SemeruDistribution(installerOptions); case JavaDistribution.Corretto: - return new installer_7.CorrettoDistribution(installerOptions); + return new installer_8.CorrettoDistribution(installerOptions); + case JavaDistribution.Oracle: + return new installer_9.OracleDistribution(installerOptions); default: return null; } @@ -104248,7 +104440,9 @@ class LibericaDistributions extends base_installer_1.JavaBase { .filter(item => util_1.isVersionSatisfies(range, item.version)) .sort((a, b) => -semver_1.default.compareBuild(a.version, b.version))[0]; if (!satisfiedVersion) { - const availableOptions = availableVersions.map(item => item.version).join(', '); + const availableOptions = availableVersions + .map(item => item.version) + .join(', '); const availableOptionsMessage = availableOptions ? `\nAvailable versions: ${availableOptions}` : ''; @@ -104261,18 +104455,16 @@ class LibericaDistributions extends base_installer_1.JavaBase { var _a; return __awaiter(this, void 0, void 0, function* () { if (core.isDebug()) { - console.time('liberica-retrieve-available-versions'); + console.time('Retrieving available versions for Liberica took'); // eslint-disable-line no-console } const url = this.prepareAvailableVersionsUrl(); - if (core.isDebug()) { - core.debug(`Gathering available versions from '${url}'`); - } + core.debug(`Gathering available versions from '${url}'`); const availableVersions = (_a = (yield this.http.getJson(url)).result) !== null && _a !== void 0 ? _a : []; if (core.isDebug()) { core.startGroup('Print information about available versions'); - console.timeEnd('liberica-retrieve-available-versions'); - console.log(`Available versions: [${availableVersions.length}]`); - console.log(availableVersions.map(item => item.version)); + console.timeEnd('Retrieving available versions for Liberica took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.version).join(', ')); core.endGroup(); } return availableVersions; @@ -104323,7 +104515,7 @@ class LibericaDistributions extends base_installer_1.JavaBase { } } convertVersionToSemver(version) { - let { buildVersion, featureVersion, interimVersion, updateVersion } = version; + const { buildVersion, featureVersion, interimVersion, updateVersion } = version; const mainVersion = [featureVersion, interimVersion, updateVersion].join('.'); if (buildVersion != 0) { return `${mainVersion}+${buildVersion}`; @@ -104331,7 +104523,7 @@ class LibericaDistributions extends base_installer_1.JavaBase { return mainVersion; } distributionArchitecture() { - let arch = super.distributionArchitecture(); + const arch = super.distributionArchitecture(); switch (arch) { case 'arm': return 'armv7'; @@ -104432,12 +104624,14 @@ class LocalDistribution extends base_installer_1.JavaBase { return foundJava; }); } - findPackageForDownload(version) { + findPackageForDownload(version // eslint-disable-line @typescript-eslint/no-unused-vars + ) { return __awaiter(this, void 0, void 0, function* () { throw new Error('This method should not be implemented in local file provider'); }); } - downloadTool(javaRelease) { + downloadTool(javaRelease // eslint-disable-line @typescript-eslint/no-unused-vars + ) { return __awaiter(this, void 0, void 0, function* () { throw new Error('This method should not be implemented in local file provider'); }); @@ -104527,11 +104721,14 @@ class MicrosoftDistributions extends base_installer_1.JavaBase { } const foundRelease = yield tc.findFromManifest(range, true, manifest, arch); if (!foundRelease) { - throw new Error(`Could not find satisfied version for SemVer ${range}. ${manifest + throw new Error(`Could not find satisfied version for SemVer ${range}.\nAvailable versions: ${manifest .map(item => item.version) .join(', ')}`); } - return { url: foundRelease.files[0].download_url, version: foundRelease.version }; + return { + url: foundRelease.files[0].download_url, + version: foundRelease.version + }; }); } getAvailableVersions() { @@ -104539,6 +104736,7 @@ class MicrosoftDistributions extends base_installer_1.JavaBase { // TODO get these dynamically! // We will need Microsoft to add an endpoint where we can query for versions. const token = core.getInput('token'); + const auth = !token ? undefined : `token ${token}`; const owner = 'actions'; const repository = 'setup-java'; const branch = 'main'; @@ -104546,10 +104744,13 @@ class MicrosoftDistributions extends base_installer_1.JavaBase { let releases = null; const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`; const headers = { - authorization: token, + authorization: auth, accept: 'application/vnd.github.VERSION.raw' }; let response = null; + if (core.isDebug()) { + console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console + } try { response = yield this.http.getJson(fileUrl, headers); if (!response.result) { @@ -104563,6 +104764,13 @@ class MicrosoftDistributions extends base_installer_1.JavaBase { if (response.result) { releases = response.result; } + if (core.isDebug() && releases) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console + core.debug(`Available versions: [${releases.length}]`); + core.debug(releases.map(item => item.version).join(', ')); + core.endGroup(); + } return releases; }); } @@ -104570,6 +104778,309 @@ class MicrosoftDistributions extends base_installer_1.JavaBase { exports.MicrosoftDistributions = MicrosoftDistributions; +/***/ }), + +/***/ 4298: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OracleDistribution = void 0; +const core = __importStar(__nccwpck_require__(2186)); +const tc = __importStar(__nccwpck_require__(7784)); +const fs_1 = __importDefault(__nccwpck_require__(7147)); +const path_1 = __importDefault(__nccwpck_require__(1017)); +const base_installer_1 = __nccwpck_require__(9741); +const util_1 = __nccwpck_require__(2629); +const http_client_1 = __nccwpck_require__(9925); +const ORACLE_DL_BASE = 'https://download.oracle.com/java'; +class OracleDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('Oracle', installerOptions); + } + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + const javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = util_1.getDownloadArchiveExtension(); + const extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); + } + findPackageForDownload(range) { + return __awaiter(this, void 0, void 0, function* () { + const arch = this.distributionArchitecture(); + if (arch !== 'x64' && arch !== 'aarch64') { + throw new Error(`Unsupported architecture: ${this.architecture}`); + } + if (!this.stable) { + throw new Error('Early access versions are not supported'); + } + if (this.packageType !== 'jdk') { + throw new Error('Oracle JDK provides only the `jdk` package type'); + } + const platform = this.getPlatform(); + const extension = util_1.getDownloadArchiveExtension(); + let major; + let fileUrl; + if (range.includes('.')) { + major = range.split('.')[0]; + fileUrl = `${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}`; + } + else { + major = range; + fileUrl = `${ORACLE_DL_BASE}/${range}/latest/jdk-${range}_${platform}-${arch}_bin.${extension}`; + } + if (parseInt(major) < 17) { + throw new Error('Oracle JDK is only supported for JDK 17 and later'); + } + const response = yield this.http.head(fileUrl); + if (response.message.statusCode === http_client_1.HttpCodes.NotFound) { + throw new Error(`Could not find Oracle JDK for SemVer ${range}`); + } + if (response.message.statusCode !== http_client_1.HttpCodes.OK) { + throw new Error(`Http request for Oracle JDK failed with status code: ${response.message.statusCode}`); + } + return { url: fileUrl, version: range }; + }); + } + getPlatform(platform = process.platform) { + switch (platform) { + case 'darwin': + return 'macos'; + case 'win32': + return 'windows'; + case 'linux': + return 'linux'; + default: + throw new Error(`Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'`); + } + } +} +exports.OracleDistribution = OracleDistribution; + + +/***/ }), + +/***/ 1121: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SemeruDistribution = void 0; +const base_installer_1 = __nccwpck_require__(9741); +const semver_1 = __importDefault(__nccwpck_require__(1383)); +const util_1 = __nccwpck_require__(2629); +const core = __importStar(__nccwpck_require__(2186)); +const tc = __importStar(__nccwpck_require__(7784)); +const fs_1 = __importDefault(__nccwpck_require__(7147)); +const path_1 = __importDefault(__nccwpck_require__(1017)); +const supportedArchitectures = [ + 'x64', + 'x86', + 'ppc64le', + 'ppc64', + 's390x', + 'aarch64' +]; +class SemeruDistribution extends base_installer_1.JavaBase { + constructor(installerOptions) { + super('IBM_Semeru', installerOptions); + } + findPackageForDownload(version) { + return __awaiter(this, void 0, void 0, function* () { + if (!supportedArchitectures.includes(this.architecture)) { + throw new Error(`Unsupported architecture for IBM Semeru: ${this.architecture}, the following are supported: ${supportedArchitectures.join(', ')}`); + } + if (!this.stable) { + throw new Error('IBM Semeru does not provide builds for early access versions'); + } + if (this.packageType !== 'jdk' && this.packageType !== 'jre') { + throw new Error('IBM Semeru only provide `jdk` and `jre` package types'); + } + const availableVersionsRaw = yield this.getAvailableVersions(); + const availableVersionsWithBinaries = availableVersionsRaw + .filter(item => item.binaries.length > 0) + .map(item => { + // normalize 17.0.0-beta+33.0.202107301459 to 17.0.0+33.0.202107301459 for earlier access versions + const formattedVersion = this.stable + ? item.version_data.semver + : item.version_data.semver.replace('-beta+', '+'); + return { + version: formattedVersion, + url: item.binaries[0].package.link + }; + }); + const satisfiedVersions = availableVersionsWithBinaries + .filter(item => util_1.isVersionSatisfies(version, item.version)) + .sort((a, b) => { + return -semver_1.default.compareBuild(a.version, b.version); + }); + const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + if (!resolvedFullVersion) { + const availableOptions = availableVersionsWithBinaries + .map(item => item.version) + .join(', '); + const availableOptionsMessage = availableOptions + ? `\nAvailable versions: ${availableOptions}` + : ''; + throw new Error(`Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}`); + } + return resolvedFullVersion; + }); + } + downloadTool(javaRelease) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); + const javaArchivePath = yield tc.downloadTool(javaRelease.url); + core.info(`Extracting Java archive...`); + const extension = util_1.getDownloadArchiveExtension(); + const extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath, extension); + const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; + const archivePath = path_1.default.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + return { version: javaRelease.version, path: javaPath }; + }); + } + get toolcacheFolderName() { + return super.toolcacheFolderName; + } + getAvailableVersions() { + return __awaiter(this, void 0, void 0, function* () { + const platform = this.getPlatformOption(); + const arch = this.architecture; + const imageType = this.packageType; + const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions + const releaseType = this.stable ? 'ga' : 'ea'; + if (core.isDebug()) { + console.time('Retrieving available versions for Semeru took'); // eslint-disable-line no-console + } + const baseRequestArguments = [ + `project=jdk`, + 'vendor=ibm', + `heap_size=normal`, + 'sort_method=DEFAULT', + 'sort_order=DESC', + `os=${platform}`, + `architecture=${arch}`, + `image_type=${imageType}`, + `release_type=${releaseType}`, + `jvm_impl=openj9` + ].join('&'); + // need to iterate through all pages to retrieve the list of all versions + // Adoptium API doesn't provide way to retrieve the count of pages to iterate so infinity loop + let page_index = 0; + const availableVersions = []; + while (true) { + const requestArguments = `${baseRequestArguments}&page_size=20&page=${page_index}`; + const availableVersionsUrl = `https://api.adoptopenjdk.net/v3/assets/version/${versionRange}?${requestArguments}`; + if (core.isDebug() && page_index === 0) { + // url is identical except page_index so print it once for debug + core.debug(`Gathering available versions from '${availableVersionsUrl}'`); + } + const paginationPage = (yield this.http.getJson(availableVersionsUrl)).result; + if (paginationPage === null || paginationPage.length === 0) { + // break infinity loop because we have reached end of pagination + break; + } + availableVersions.push(...paginationPage); + page_index++; + } + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Semeru took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.version_data.semver).join(', ')); + core.endGroup(); + } + return availableVersions; + }); + } + getPlatformOption() { + // Adopt has own platform names so need to map them + switch (process.platform) { + case 'darwin': + return 'mac'; + case 'win32': + return 'windows'; + default: + return process.platform; + } + } +} +exports.SemeruDistribution = SemeruDistribution; + + /***/ }), /***/ 8579: @@ -104648,7 +105159,9 @@ class TemurinDistribution extends base_installer_1.JavaBase { }); const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; if (!resolvedFullVersion) { - const availableOptions = availableVersionsWithBinaries.map(item => item.version).join(', '); + const availableOptions = availableVersionsWithBinaries + .map(item => item.version) + .join(', '); const availableOptionsMessage = availableOptions ? `\nAvailable versions: ${availableOptions}` : ''; @@ -104659,17 +105172,15 @@ class TemurinDistribution extends base_installer_1.JavaBase { } downloadTool(javaRelease) { return __awaiter(this, void 0, void 0, function* () { - let javaPath; - let extractedJavaPath; core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); const javaArchivePath = yield tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); - let extension = util_1.getDownloadArchiveExtension(); - extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath, extension); + const extension = util_1.getDownloadArchiveExtension(); + const extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath, extension); const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; const archivePath = path_1.default.join(extractedJavaPath, archiveName); const version = this.getToolcacheVersionName(javaRelease.version); - javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); return { version: javaRelease.version, path: javaPath }; }); } @@ -104684,7 +105195,7 @@ class TemurinDistribution extends base_installer_1.JavaBase { const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions const releaseType = this.stable ? 'ga' : 'ea'; if (core.isDebug()) { - console.time('temurin-retrieve-available-versions'); + console.time('Retrieving available versions for Temurin took'); // eslint-disable-line no-console } const baseRequestArguments = [ `project=jdk`, @@ -104719,9 +105230,9 @@ class TemurinDistribution extends base_installer_1.JavaBase { } if (core.isDebug()) { core.startGroup('Print information about available versions'); - console.timeEnd('temurin-retrieve-available-versions'); - console.log(`Available versions: [${availableVersions.length}]`); - console.log(availableVersions.map(item => item.version_data.semver).join(', ')); + console.timeEnd('Retrieving available versions for Temurin took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.version_data.semver).join(', ')); core.endGroup(); } return availableVersions; @@ -104819,7 +105330,9 @@ class ZuluDistribution extends base_installer_1.JavaBase { }); const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; if (!resolvedFullVersion) { - const availableOptions = availableVersions.map(item => item.version).join(', '); + const availableOptions = availableVersions + .map(item => item.version) + .join(', '); const availableOptionsMessage = availableOptions ? `\nAvailable versions: ${availableOptions}` : ''; @@ -104830,12 +105343,11 @@ class ZuluDistribution extends base_installer_1.JavaBase { } downloadTool(javaRelease) { return __awaiter(this, void 0, void 0, function* () { - let extractedJavaPath; core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`); const javaArchivePath = yield tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); - let extension = util_1.getDownloadArchiveExtension(); - extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath, extension); + const extension = util_1.getDownloadArchiveExtension(); + const extractedJavaPath = yield util_1.extractJdkFile(javaArchivePath, extension); const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0]; const archivePath = path_1.default.join(extractedJavaPath, archiveName); const javaPath = yield tc.cacheDir(archivePath, this.toolcacheFolderName, this.getToolcacheVersionName(javaRelease.version), this.architecture); @@ -104852,7 +105364,7 @@ class ZuluDistribution extends base_installer_1.JavaBase { const javafx = (_a = features === null || features === void 0 ? void 0 : features.includes('fx')) !== null && _a !== void 0 ? _a : false; const releaseStatus = this.stable ? 'ga' : 'ea'; if (core.isDebug()) { - console.time('azul-retrieve-available-versions'); + console.time('Retrieving available versions for Zulu took'); // eslint-disable-line no-console } const requestArguments = [ `os=${platform}`, @@ -104868,15 +105380,14 @@ class ZuluDistribution extends base_installer_1.JavaBase { .filter(Boolean) .join('&'); const availableVersionsUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?${requestArguments}`; - if (core.isDebug()) { - core.debug(`Gathering available versions from '${availableVersionsUrl}'`); - } - const availableVersions = (_b = (yield this.http.getJson(availableVersionsUrl)).result) !== null && _b !== void 0 ? _b : []; + core.debug(`Gathering available versions from '${availableVersionsUrl}'`); + const availableVersions = (_b = (yield this.http.getJson(availableVersionsUrl)) + .result) !== null && _b !== void 0 ? _b : []; if (core.isDebug()) { core.startGroup('Print information about available versions'); - console.timeEnd('azul-retrieve-available-versions'); - console.log(`Available versions: [${availableVersions.length}]`); - console.log(availableVersions.map(item => item.jdk_version.join('.')).join(', ')); + console.timeEnd('Retrieving available versions for Zulu took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.jdk_version.join('.')).join(', ')); core.endGroup(); } return availableVersions; @@ -104979,7 +105490,13 @@ function importKey(privateKey) { } } }; - yield exec.exec('gpg', ['--batch', '--import-options', 'import-show', '--import', exports.PRIVATE_KEY_FILE], options); + yield exec.exec('gpg', [ + '--batch', + '--import-options', + 'import-show', + '--import', + exports.PRIVATE_KEY_FILE + ], options); yield io.rmRF(exports.PRIVATE_KEY_FILE); const match = output.match(PRIVATE_KEY_FINGERPRINT_REGEX); return match && match[0]; @@ -105031,7 +105548,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); +const fs_1 = __importDefault(__nccwpck_require__(7147)); const core = __importStar(__nccwpck_require__(2186)); const auth = __importStar(__nccwpck_require__(3497)); const util_1 = __nccwpck_require__(2629); @@ -105043,37 +105564,44 @@ const distribution_factory_1 = __nccwpck_require__(924); function run() { return __awaiter(this, void 0, void 0, function* () { try { - const versions = core.getMultilineInput(constants.INPUT_JAVA_VERSION, { required: true }); - const distributionName = core.getInput(constants.INPUT_DISTRIBUTION, { required: true }); + const versions = core.getMultilineInput(constants.INPUT_JAVA_VERSION); + const distributionName = core.getInput(constants.INPUT_DISTRIBUTION, { + required: true + }); + const versionFile = core.getInput(constants.INPUT_JAVA_VERSION_FILE); const architecture = core.getInput(constants.INPUT_ARCHITECTURE); const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE); const jdkFile = core.getInput(constants.INPUT_JDK_FILE); const cache = core.getInput(constants.INPUT_CACHE); const checkLatest = util_1.getBooleanInput(constants.INPUT_CHECK_LATEST, false); let toolchainIds = core.getMultilineInput(constants.INPUT_MVN_TOOLCHAIN_ID); + core.startGroup('Installed distributions'); if (versions.length !== toolchainIds.length) { toolchainIds = []; } - core.startGroup('Installed distributions'); - for (const [index, version] of versions.entries()) { - const installerOptions = { - architecture, - packageType, - version, - checkLatest - }; - const distribution = distribution_factory_1.getJavaDistribution(distributionName, installerOptions, jdkFile); - if (!distribution) { - throw new Error(`No supported distribution was found for input ${distributionName}`); + if (!versions.length && !versionFile) { + throw new Error('java-version or java-version-file input expected'); + } + const installerInputsOptions = { + architecture, + packageType, + checkLatest, + distributionName, + jdkFile, + toolchainIds + }; + if (!versions.length) { + core.debug('java-version input is empty, looking for java-version-file input'); + const content = fs_1.default.readFileSync(versionFile).toString().trim(); + const version = util_1.getVersionFromFileContent(content, distributionName); + core.debug(`Parsed version from file '${version}'`); + if (!version) { + throw new Error(`No supported version was found in file ${versionFile}`); } - const result = yield distribution.setupJava(); - yield toolchains.configureToolchains(version, distributionName, result.path, toolchainIds[index]); - core.info(''); - core.info('Java configuration:'); - core.info(` Distribution: ${distributionName}`); - core.info(` Version: ${result.version}`); - core.info(` Path: ${result.path}`); - core.info(''); + yield installVersion(version, installerInputsOptions); + } + for (const [index, version] of versions.entries()) { + yield installVersion(version, installerInputsOptions, index); } core.endGroup(); const matchersPath = path.join(__dirname, '..', '..', '.github'); @@ -105089,6 +105617,29 @@ function run() { }); } run(); +function installVersion(version, options, toolchainId = 0) { + return __awaiter(this, void 0, void 0, function* () { + const { distributionName, jdkFile, architecture, packageType, checkLatest, toolchainIds } = options; + const installerOptions = { + architecture, + packageType, + checkLatest, + version + }; + const distribution = distribution_factory_1.getJavaDistribution(distributionName, installerOptions, jdkFile); + if (!distribution) { + throw new Error(`No supported distribution was found for input ${distributionName}`); + } + const result = yield distribution.setupJava(); + yield toolchains.configureToolchains(version, distributionName, result.path, toolchainIds[toolchainId]); + core.info(''); + core.info('Java configuration:'); + core.info(` Distribution: ${distributionName}`); + core.info(` Version: ${result.version}`); + core.info(` Path: ${result.path}`); + core.info(''); + }); +} /***/ }), @@ -105140,7 +105691,8 @@ function configureToolchains(version, distributionName, jdkHome, toolchainId) { return __awaiter(this, void 0, void 0, function* () { const vendor = core.getInput(constants.INPUT_MVN_TOOLCHAIN_VENDOR) || distributionName; const id = toolchainId || `${vendor}_${version}`; - const settingsDirectory = core.getInput(constants.INPUT_SETTINGS_PATH) || path.join(os.homedir(), constants.M2_DIR); + const settingsDirectory = core.getInput(constants.INPUT_SETTINGS_PATH) || + path.join(os.homedir(), constants.M2_DIR); const overwriteSettings = util_1.getBooleanInput(constants.INPUT_OVERWRITE_SETTINGS, true); yield createToolchainsSettings({ jdkInfo: { @@ -105290,7 +105842,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isCacheFeatureAvailable = exports.isGhes = exports.isJobStatusSuccess = exports.getToolcachePath = exports.isVersionSatisfies = exports.getDownloadArchiveExtension = exports.extractJdkFile = exports.getVersionFromToolcachePath = exports.getBooleanInput = exports.getTempDir = void 0; +exports.getVersionFromFileContent = exports.isCacheFeatureAvailable = exports.isGhes = exports.isJobStatusSuccess = exports.getToolcachePath = exports.isVersionSatisfies = exports.getDownloadArchiveExtension = exports.extractJdkFile = exports.getVersionFromToolcachePath = exports.getBooleanInput = exports.getTempDir = void 0; const os_1 = __importDefault(__nccwpck_require__(2037)); const path_1 = __importDefault(__nccwpck_require__(1017)); const fs = __importStar(__nccwpck_require__(7147)); @@ -105300,12 +105852,12 @@ const core = __importStar(__nccwpck_require__(2186)); const tc = __importStar(__nccwpck_require__(7784)); const constants_1 = __nccwpck_require__(9042); function getTempDir() { - let tempDirectory = process.env['RUNNER_TEMP'] || os_1.default.tmpdir(); + const tempDirectory = process.env['RUNNER_TEMP'] || os_1.default.tmpdir(); return tempDirectory; } exports.getTempDir = getTempDir; function getBooleanInput(inputName, defaultValue = false) { - return (core.getInput(inputName) || String(defaultValue)).toUpperCase() === 'TRUE'; + return ((core.getInput(inputName) || String(defaultValue)).toUpperCase() === 'TRUE'); } exports.getBooleanInput = getBooleanInput; function getVersionFromToolcachePath(toolPath) { @@ -105318,7 +105870,9 @@ exports.getVersionFromToolcachePath = getVersionFromToolcachePath; function extractJdkFile(toolPath, extension) { return __awaiter(this, void 0, void 0, function* () { if (!extension) { - extension = toolPath.endsWith('.tar.gz') ? 'tar.gz' : path_1.default.extname(toolPath); + extension = toolPath.endsWith('.tar.gz') + ? 'tar.gz' + : path_1.default.extname(toolPath); if (extension.startsWith('.')) { extension = extension.substring(1); } @@ -105374,18 +105928,47 @@ function isGhes() { } exports.isGhes = isGhes; function isCacheFeatureAvailable() { - if (!cache.isFeatureAvailable()) { - if (isGhes()) { - throw new Error('Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.'); - } - else { - core.warning('The runner was not able to contact the cache service. Caching will be skipped'); - } + if (cache.isFeatureAvailable()) { + return true; + } + if (isGhes()) { + core.warning('Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.'); return false; } - return true; + core.warning('The runner was not able to contact the cache service. Caching will be skipped'); + return false; } exports.isCacheFeatureAvailable = isCacheFeatureAvailable; +function getVersionFromFileContent(content, distributionName) { + var _a, _b, _c, _d, _e; + const javaVersionRegExp = /(?(?<=(^|\s|-))(\d+\S*))(\s|$)/; + const fileContent = ((_b = (_a = content.match(javaVersionRegExp)) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.version) + ? (_d = (_c = content.match(javaVersionRegExp)) === null || _c === void 0 ? void 0 : _c.groups) === null || _d === void 0 ? void 0 : _d.version + : ''; + if (!fileContent) { + return null; + } + core.debug(`Version from file '${fileContent}'`); + const tentativeVersion = avoidOldNotation(fileContent); + const rawVersion = tentativeVersion.split('-')[0]; + let version = semver.validRange(rawVersion) + ? tentativeVersion + : semver.coerce(tentativeVersion); + core.debug(`Range version from file is '${version}'`); + if (!version) { + return null; + } + if (constants_1.DISTRIBUTIONS_ONLY_MAJOR_VERSION.includes(distributionName)) { + const coerceVersion = (_e = semver.coerce(version)) !== null && _e !== void 0 ? _e : version; + version = semver.major(coerceVersion).toString(); + } + return version.toString(); +} +exports.getVersionFromFileContent = getVersionFromFileContent; +// By convention, action expects version 8 in the format `8.*` instead of `1.8` +function avoidOldNotation(content) { + return content.startsWith('1.') ? content.substring(2) : content; +} /***/ }), diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 93ebd854..7fbcc3a2 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -6,6 +6,7 @@ - [Liberica](#Liberica) - [Microsoft](#Microsoft) - [Amazon Corretto](#Amazon-Corretto) + - [Oracle](#Oracle) - [Installing custom Java package type](#Installing-custom-Java-package-type) - [Installing custom Java architecture](#Installing-custom-Java-architecture) - [Installing custom Java distribution from local file](#Installing-Java-from-local-file) @@ -15,6 +16,7 @@ - [Publishing using Gradle](#Publishing-using-Gradle) - [Hosted Tool Cache](#Hosted-Tool-Cache) - [Modifying Maven Toolchains](#Modifying-Maven-Toolchains) +- [Java-version file](#Java-version-file) See [action.yml](../action.yml) for more details on task inputs. @@ -80,6 +82,22 @@ steps: - run: java -cp java HelloWorldApp ``` +### Using Microsoft distribution on GHES + +`setup-java` comes pre-installed on the appliance with GHES if Actions is enabled. When dynamically downloading the Microsoft Build of OpenJDK distribution, `setup-java` makes a request to `actions/setup-java` to get available versions on github.com (outside of the appliance). These calls to `actions/setup-java` are made via unauthenticated requests, which are limited to [60 requests per hour per IP](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting). If more requests are made within the time frame, then you will start to see rate-limit errors during downloading that looks like: `##[error]API rate limit exceeded for...`. + +To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new) and pass it as the `token` input for the action: + +```yaml +uses: actions/setup-java@v3 +with: + token: ${{ secrets.GH_DOTCOM_TOKEN }} + distribution: 'microsoft' + java-version: '11' +``` + +If the runner is not able to access github.com, any Java versions requested during a workflow run must come from the runner's tool cache. See "[Setting up the tool cache on self-hosted runners without internet access](https://docs.github.com/en/enterprise-server@3.2/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)" for more information. + ### Amazon Corretto **NOTE:** Amazon Corretto only supports the major version specification. @@ -93,6 +111,19 @@ steps: - run: java -cp java HelloWorldApp ``` +### Oracle +**NOTE:** Oracle Java SE Development Kit is only available for version 17 and later. + +```yaml +steps: +- uses: actions/checkout@v3 +- uses: actions/setup-java@v3 + with: + distribution: 'oracle' + java-version: '17' +- run: java -cp java HelloWorldApp +``` + ## Installing custom Java package type ```yaml steps: @@ -115,7 +146,7 @@ steps: with: distribution: '' java-version: '11' - architecture: x86 # optional - defaults to x64 + architecture: x86 # optional - default value derived from the runner machine - run: java -cp java HelloWorldApp ``` @@ -348,7 +379,7 @@ See the help docs on [Publishing a Package with Gradle](https://help.github.com/ ## Hosted Tool Cache GitHub Hosted Runners have a tool cache that comes with some Java versions pre-installed. This tool cache helps speed up runs and tool setup by not requiring any new downloads. There is an environment variable called `RUNNER_TOOL_CACHE` on each runner that describes the location of this tools cache and this is where you can find the pre-installed versions of Java. `setup-java` works by taking a specific version of Java in this tool cache and adding it to PATH if the version, architecture and distribution match. -Currently, LTS versions of Adopt OpenJDK (`adopt`) are cached on the GitHub Hosted Runners. +Currently, LTS versions of Eclipse Temurin (`temurin`) are cached on the GitHub Hosted Runners. The tools cache gets updated on a weekly basis. For information regarding locally cached versions of Java on GitHub hosted runners, check out [GitHub Actions Virtual Environments](https://github.com/actions/virtual-environments). @@ -448,3 +479,15 @@ steps: something_else something_other ``` + +## Java-version file +If the `java-version-file` input is specified, the action will try to extract the version from the file and install it. +Action is able to recognize all variants of the version description according to [jenv](https://github.com/jenv/jenv). +Valid entry options: +``` +major versions: 8, 11, 16, 17 +more specific versions: 1.8.0.2, 17.0, 11.0, 11.0.4, 8.0.232, 8.0.282+8 +early access (EA) versions: 15-ea, 15.0.0-ea, 15.0.0-ea.2, 15.0.0+2-ea +versions with specified distribution: openjdk64-11.0.2 +``` +If the file contains multiple versions, only the first one will be recognized. diff --git a/docs/contributors.md b/docs/contributors.md index 1d698c71..7196d482 100644 --- a/docs/contributors.md +++ b/docs/contributors.md @@ -60,6 +60,7 @@ Pull requests are the easiest way to contribute changes to git repos at GitHub. - To implement new features or fix bugs, you need to make changes to the `.ts` files, which are located in the `src` folder - To comply with the code style, **you need to run the `format` script** +- To lint the code, **you need to run the `lint:fix` script** - To transpile source code to `javascript` we use [NCC](https://github.com/vercel/ncc). **It is very important to run the `build` script after making changes**, otherwise your changes will not get into the final `javascript` build **Learn more about how to implement tests:** diff --git a/package-lock.json b/package-lock.json index 351da997..c2343357 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,10 +23,15 @@ "@types/jest": "^27.0.2", "@types/node": "^16.11.25", "@types/semver": "^7.3.4", + "@typescript-eslint/eslint-plugin": "^5.54.0", + "@typescript-eslint/parser": "^5.54.0", "@vercel/ncc": "^0.33.4", + "eslint": "^8.35.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-jest": "^27.2.1", "jest": "^27.2.5", "jest-circus": "^27.2.5", - "prettier": "^1.19.1", + "prettier": "^2.8.4", "ts-jest": "^27.0.5", "typescript": "^4.2.3" } @@ -977,6 +982,116 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@eslint/eslintrc": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz", + "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz", + "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1066,31 +1181,6 @@ } } }, - "node_modules/@jest/core/node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/@jest/core/node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/@jest/environment": { "version": "27.2.5", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.2.5.tgz", @@ -1251,31 +1341,6 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/@jest/transform/node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/@jest/transform/node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/@jest/types": { "version": "27.2.5", "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.2.5.tgz", @@ -1292,6 +1357,41 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@oozcitak/dom": { "version": "1.15.8", "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.8.tgz", @@ -1455,6 +1555,12 @@ "pretty-format": "^27.0.0" } }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "node_modules/@types/node": { "version": "16.11.25", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz", @@ -1476,9 +1582,9 @@ "dev": true }, "node_modules/@types/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==", + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", "dev": true }, "node_modules/@types/stack-utils": { @@ -1510,6 +1616,194 @@ "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", "dev": true }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.54.0.tgz", + "integrity": "sha512-+hSN9BdSr629RF02d7mMtXhAJvDTyCbprNYJKrXETlul/Aml6YZwd90XioVbjejQeHbb3R8Dg0CkRgoJDxo8aw==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.54.0", + "@typescript-eslint/type-utils": "5.54.0", + "@typescript-eslint/utils": "5.54.0", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.54.0.tgz", + "integrity": "sha512-aAVL3Mu2qTi+h/r04WI/5PfNWvO6pdhpeMRWk9R7rEV4mwJNzoWf5CCU5vDKBsPIFQFjEq1xg7XBI2rjiMXQbQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.54.0", + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/typescript-estree": "5.54.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.54.0.tgz", + "integrity": "sha512-VTPYNZ7vaWtYna9M4oD42zENOBrb+ZYyCNdFs949GcN8Miwn37b8b7eMj+EZaq7VK9fx0Jd+JhmkhjFhvnovhg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.54.0.tgz", + "integrity": "sha512-WI+WMJ8+oS+LyflqsD4nlXMsVdzTMYTxl16myXPaCXnSgc7LWwMsjxQFZCK/rVmTZ3FN71Ct78ehO9bRC7erYQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "5.54.0", + "@typescript-eslint/utils": "5.54.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.0.tgz", + "integrity": "sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.0.tgz", + "integrity": "sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.54.0.tgz", + "integrity": "sha512-cuwm8D/Z/7AuyAeJ+T0r4WZmlnlxQ8wt7C7fLpFlKMR+dY6QO79Cq1WpJhvZbMA4ZeZGHiRWnht7ZJ8qkdAunw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.54.0", + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/typescript-estree": "5.54.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.0.tgz", + "integrity": "sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.54.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@vercel/ncc": { "version": "0.33.4", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.4.tgz", @@ -1537,9 +1831,9 @@ } }, "node_modules/acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1570,6 +1864,15 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/acorn-walk": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", @@ -1591,6 +1894,22 @@ "node": ">= 6.0.0" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1651,6 +1970,15 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2018,9 +2346,9 @@ } }, "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2087,6 +2415,30 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/domexception": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", @@ -2172,6 +2524,356 @@ "source-map": "~0.6.1" } }, + "node_modules/eslint": { + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz", + "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==", + "dev": true, + "dependencies": { + "@eslint/eslintrc": "^2.0.0", + "@eslint/js": "8.35.0", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", + "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-jest": { + "version": "27.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz", + "integrity": "sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "^5.10.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.0.0", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + }, + "jest": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-scope/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -2184,6 +2886,30 @@ "node": ">=4" } }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/estraverse": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", @@ -2279,6 +3005,40 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -2291,6 +3051,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fb-watchman": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", @@ -2300,6 +3069,18 @@ "bser": "2.1.1" } }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -2325,6 +3106,25 @@ "node": ">=8" } }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "node_modules/form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", @@ -2423,6 +3223,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -2432,12 +3244,38 @@ "node": ">=4" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/graceful-fs": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2525,6 +3363,40 @@ "node": ">=0.10.0" } }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/import-local": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", @@ -2598,6 +3470,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -2616,6 +3497,18 @@ "node": ">=6" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2625,6 +3518,15 @@ "node": ">=0.12.0" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -2838,31 +3740,6 @@ } } }, - "node_modules/jest-config/node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/jest-config/node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/jest-diff": { "version": "27.2.5", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.2.5.tgz", @@ -2976,31 +3853,6 @@ "fsevents": "^2.3.2" } }, - "node_modules/jest-haste-map/node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/jest-haste-map/node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/jest-jasmine2": { "version": "27.2.5", "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.2.5.tgz", @@ -3078,31 +3930,6 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-message-util/node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/jest-message-util/node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/jest-mock": { "version": "27.2.5", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.2.5.tgz", @@ -3313,18 +4140,6 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-util/node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/jest-validate": { "version": "27.2.5", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.2.5.tgz", @@ -3435,6 +4250,16 @@ } } }, + "node_modules/js-sdsl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", + "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3525,14 +4350,23 @@ "node": ">=4" } }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, "node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, "bin": { "json5": "lib/cli.js" }, @@ -3589,6 +4423,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -3645,6 +4485,28 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime-db": { "version": "1.46.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", @@ -3674,9 +4536,9 @@ } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3684,12 +4546,6 @@ "node": "*" } }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -3702,6 +4558,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -3865,6 +4727,18 @@ "node": ">=6" } }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -3904,6 +4778,15 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/picocolors": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", @@ -3911,9 +4794,9 @@ "dev": true }, "node_modules/picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" @@ -3956,15 +4839,18 @@ } }, "node_modules/prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", "dev": true, "bin": { "prettier": "bin-prettier.js" }, "engines": { - "node": ">=4" + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/pretty-format": { @@ -4028,12 +4914,44 @@ "node": ">=6" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/react-is": { "version": "17.0.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", "dev": true }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4077,6 +4995,16 @@ "node": ">=8" } }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -4092,6 +5020,29 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4122,9 +5073,9 @@ } }, "node_modules/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -4279,6 +5230,18 @@ "node": ">=6" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -4340,6 +5303,12 @@ "node": ">=8" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "node_modules/throat": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", @@ -4443,6 +5412,21 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -4514,6 +5498,15 @@ "node": ">= 4.0.0" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -4786,6 +5779,18 @@ "engines": { "node": ">=10" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } }, "dependencies": { @@ -5565,6 +6570,84 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@eslint/eslintrc": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz", + "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.4.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "@eslint/js": { + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz", + "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==", + "dev": true + }, + "@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -5632,24 +6715,6 @@ "rimraf": "^3.0.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - } } }, "@jest/environment": { @@ -5778,24 +6843,6 @@ "slash": "^3.0.0", "source-map": "^0.6.1", "write-file-atomic": "^3.0.0" - }, - "dependencies": { - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - } } }, "@jest/types": { @@ -5811,6 +6858,32 @@ "chalk": "^4.0.0" } }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, "@oozcitak/dom": { "version": "1.15.8", "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.8.tgz", @@ -5956,6 +7029,12 @@ "pretty-format": "^27.0.0" } }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "@types/node": { "version": "16.11.25", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz", @@ -5977,9 +7056,9 @@ "dev": true }, "@types/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==", + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", "dev": true }, "@types/stack-utils": { @@ -6011,6 +7090,105 @@ "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.54.0.tgz", + "integrity": "sha512-+hSN9BdSr629RF02d7mMtXhAJvDTyCbprNYJKrXETlul/Aml6YZwd90XioVbjejQeHbb3R8Dg0CkRgoJDxo8aw==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.54.0", + "@typescript-eslint/type-utils": "5.54.0", + "@typescript-eslint/utils": "5.54.0", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "regexpp": "^3.2.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/parser": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.54.0.tgz", + "integrity": "sha512-aAVL3Mu2qTi+h/r04WI/5PfNWvO6pdhpeMRWk9R7rEV4mwJNzoWf5CCU5vDKBsPIFQFjEq1xg7XBI2rjiMXQbQ==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.54.0", + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/typescript-estree": "5.54.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.54.0.tgz", + "integrity": "sha512-VTPYNZ7vaWtYna9M4oD42zENOBrb+ZYyCNdFs949GcN8Miwn37b8b7eMj+EZaq7VK9fx0Jd+JhmkhjFhvnovhg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.54.0.tgz", + "integrity": "sha512-WI+WMJ8+oS+LyflqsD4nlXMsVdzTMYTxl16myXPaCXnSgc7LWwMsjxQFZCK/rVmTZ3FN71Ct78ehO9bRC7erYQ==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "5.54.0", + "@typescript-eslint/utils": "5.54.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/types": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.0.tgz", + "integrity": "sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.0.tgz", + "integrity": "sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.54.0.tgz", + "integrity": "sha512-cuwm8D/Z/7AuyAeJ+T0r4WZmlnlxQ8wt7C7fLpFlKMR+dY6QO79Cq1WpJhvZbMA4ZeZGHiRWnht7ZJ8qkdAunw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.54.0", + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/typescript-estree": "5.54.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0", + "semver": "^7.3.7" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.0.tgz", + "integrity": "sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.54.0", + "eslint-visitor-keys": "^3.3.0" + } + }, "@vercel/ncc": { "version": "0.33.4", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.33.4.tgz", @@ -6032,9 +7210,9 @@ } }, "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true }, "acorn-globals": { @@ -6055,6 +7233,13 @@ } } }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, "acorn-walk": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", @@ -6070,6 +7255,18 @@ "debug": "4" } }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -6112,6 +7309,12 @@ "sprintf-js": "~1.0.2" } }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -6406,9 +7609,9 @@ } }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -6455,6 +7658,24 @@ "integrity": "sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==", "dev": true }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "domexception": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", @@ -6515,11 +7736,269 @@ "source-map": "~0.6.1" } }, + "eslint": { + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz", + "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==", + "dev": true, + "requires": { + "@eslint/eslintrc": "^2.0.0", + "@eslint/js": "8.35.0", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.4.0", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "regexpp": "^3.2.0", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint-scope": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "eslint-config-prettier": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz", + "integrity": "sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==", + "dev": true, + "requires": {} + }, + "eslint-plugin-jest": { + "version": "27.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz", + "integrity": "sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==", + "dev": true, + "requires": { + "@typescript-eslint/utils": "^5.10.0" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + } + } + }, + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true + }, + "espree": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.3.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + } + }, "estraverse": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", @@ -6587,6 +8066,36 @@ } } }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -6599,6 +8108,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "fb-watchman": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", @@ -6608,6 +8126,15 @@ "bser": "2.1.1" } }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -6627,6 +8154,22 @@ "path-exists": "^4.0.0" } }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", @@ -6694,18 +8237,47 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, "graceful-fs": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -6772,6 +8344,30 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, "import-local": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", @@ -6827,6 +8423,12 @@ "has": "^1.0.3" } }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -6839,12 +8441,27 @@ "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -7025,24 +8642,6 @@ "jest-validate": "^27.2.5", "micromatch": "^4.0.4", "pretty-format": "^27.2.5" - }, - "dependencies": { - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - } } }, "jest-diff": { @@ -7133,24 +8732,6 @@ "jest-worker": "^27.2.5", "micromatch": "^4.0.4", "walker": "^1.0.7" - }, - "dependencies": { - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - } } }, "jest-jasmine2": { @@ -7216,24 +8797,6 @@ "pretty-format": "^27.2.5", "slash": "^3.0.0", "stack-utils": "^2.0.3" - }, - "dependencies": { - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - } } }, "jest-mock": { @@ -7407,14 +8970,6 @@ "graceful-fs": "^4.2.4", "is-ci": "^3.0.0", "picomatch": "^2.2.3" - }, - "dependencies": { - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - } } }, "jest-validate": { @@ -7476,6 +9031,12 @@ } } }, + "js-sdsl": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", + "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -7545,14 +9106,23 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true }, "kleur": { "version": "3.0.3", @@ -7591,6 +9161,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -7637,6 +9213,22 @@ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, "mime-db": { "version": "1.46.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", @@ -7657,19 +9249,13 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -7682,6 +9268,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -7806,6 +9398,15 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -7836,6 +9437,12 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, "picocolors": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", @@ -7843,9 +9450,9 @@ "dev": true }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "pirates": { @@ -7873,9 +9480,9 @@ "dev": true }, "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", "dev": true }, "pretty-format": { @@ -7923,12 +9530,24 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "react-is": { "version": "17.0.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", "dev": true }, + "regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -7960,6 +9579,12 @@ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -7969,6 +9594,15 @@ "glob": "^7.1.3" } }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -7996,9 +9630,9 @@ } }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "requires": { "lru-cache": "^6.0.0" } @@ -8116,6 +9750,12 @@ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -8162,6 +9802,12 @@ "minimatch": "^3.0.4" } }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "throat": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", @@ -8229,6 +9875,15 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", @@ -8275,6 +9930,15 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -8485,6 +10149,12 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 9cb00e12..c9c051a2 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,10 @@ "main": "dist/setup/index.js", "scripts": { "build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts", - "format": "prettier --write \"{,!(node_modules)/**/}*.ts\"", - "format-check": "prettier --check \"{,!(node_modules)/**/}*.ts\"", + "format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"", + "format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"", + "lint": "eslint --config ./.eslintrc.js \"**/*.ts\"", + "lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix", "prerelease": "npm run-script build", "release": "git add -f dist/setup/index.js dist/cleanup/index.js", "test": "jest" @@ -38,10 +40,15 @@ "@types/jest": "^27.0.2", "@types/node": "^16.11.25", "@types/semver": "^7.3.4", + "@typescript-eslint/eslint-plugin": "^5.54.0", + "@typescript-eslint/parser": "^5.54.0", "@vercel/ncc": "^0.33.4", + "eslint": "^8.35.0", + "eslint-config-prettier": "^8.6.0", + "eslint-plugin-jest": "^27.2.1", "jest": "^27.2.5", "jest-circus": "^27.2.5", - "prettier": "^1.19.1", + "prettier": "^2.8.4", "ts-jest": "^27.0.5", "typescript": "^4.2.3" } diff --git a/src/auth.ts b/src/auth.ts index f697ddcd..c8ea6291 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -5,20 +5,25 @@ import * as io from '@actions/io'; import * as fs from 'fs'; import * as os from 'os'; -import { create as xmlCreate } from 'xmlbuilder2'; +import {create as xmlCreate} from 'xmlbuilder2'; import * as constants from './constants'; import * as gpg from './gpg'; -import { getBooleanInput } from './util'; +import {getBooleanInput} from './util'; export async function configureAuthentication() { const id = core.getInput(constants.INPUT_SERVER_ID); const username = core.getInput(constants.INPUT_SERVER_USERNAME); const password = core.getInput(constants.INPUT_SERVER_PASSWORD); const settingsDirectory = - core.getInput(constants.INPUT_SETTINGS_PATH) || path.join(os.homedir(), constants.M2_DIR); - const overwriteSettings = getBooleanInput(constants.INPUT_OVERWRITE_SETTINGS, true); + core.getInput(constants.INPUT_SETTINGS_PATH) || + path.join(os.homedir(), constants.M2_DIR); + const overwriteSettings = getBooleanInput( + constants.INPUT_OVERWRITE_SETTINGS, + true + ); const gpgPrivateKey = - core.getInput(constants.INPUT_GPG_PRIVATE_KEY) || constants.INPUT_DEFAULT_GPG_PRIVATE_KEY; + core.getInput(constants.INPUT_GPG_PRIVATE_KEY) || + constants.INPUT_DEFAULT_GPG_PRIVATE_KEY; const gpgPassphrase = core.getInput(constants.INPUT_GPG_PASSPHRASE) || (gpgPrivateKey ? constants.INPUT_DEFAULT_GPG_PASSPHRASE : undefined); @@ -69,7 +74,7 @@ export function generate( password: string, gpgPassphrase?: string | undefined ) { - const xmlObj: { [key: string]: any } = { + const xmlObj: {[key: string]: any} = { settings: { '@xmlns': 'http://maven.apache.org/SETTINGS/1.0.0', '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', @@ -102,7 +107,11 @@ export function generate( }); } -async function write(directory: string, settings: string, overwriteSettings: boolean) { +async function write( + directory: string, + settings: string, + overwriteSettings: boolean +) { const location = path.join(directory, constants.MVN_SETTINGS_FILE); const settingsExists = fs.existsSync(location); if (settingsExists && overwriteSettings) { diff --git a/src/cache.ts b/src/cache.ts index 20b553e8..81d0b273 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -2,7 +2,7 @@ * @fileoverview this file provides methods handling dependency cache */ -import { join } from 'path'; +import {join} from 'path'; import os from 'os'; import * as cache from '@actions/cache'; import * as core from '@actions/core'; @@ -29,7 +29,10 @@ const supportedPackageManager: PackageManager[] = [ }, { id: 'gradle', - path: [join(os.homedir(), '.gradle', 'caches'), join(os.homedir(), '.gradle', 'wrapper')], + path: [ + join(os.homedir(), '.gradle', 'caches'), + join(os.homedir(), '.gradle', 'wrapper') + ], // https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---gradle pattern: [ '**/*.gradle*', @@ -50,18 +53,25 @@ const supportedPackageManager: PackageManager[] = [ '!' + join(os.homedir(), '.sbt', '*.lock'), '!' + join(os.homedir(), '**', 'ivydata-*.properties') ], - pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] + pattern: [ + '**/*.sbt', + '**/project/build.properties', + '**/project/**.{scala,sbt}' + ] } ]; function getCoursierCachePath(): string { if (os.type() === 'Linux') return join(os.homedir(), '.cache', 'coursier'); - if (os.type() === 'Darwin') return join(os.homedir(), 'Library', 'Caches', 'Coursier'); + if (os.type() === 'Darwin') + return join(os.homedir(), 'Library', 'Caches', 'Coursier'); return join(os.homedir(), 'AppData', 'Local', 'Coursier', 'Cache'); } function findPackageManager(id: string): PackageManager { - const packageManager = supportedPackageManager.find(packageManager => packageManager.id === id); + const packageManager = supportedPackageManager.find( + packageManager => packageManager.id === id + ); if (packageManager === undefined) { throw new Error(`unknown package manager specified: ${id}`); } @@ -125,7 +135,9 @@ export async function save(id: string) { return; } else if (matchedKey === primaryKey) { // no change in target directories - core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`); + core.info( + `Cache hit occurred on the primary key ${primaryKey}, not saving cache.` + ); return; } try { @@ -151,8 +163,14 @@ export async function save(id: string) { * @returns true if the given error seems related to the {@link https://github.com/actions/cache/issues/454|running Gradle Daemon issue}. * @see {@link https://github.com/actions/cache/issues/454#issuecomment-840493935|why --no-daemon is necessary} */ -function isProbablyGradleDaemonProblem(packageManager: PackageManager, error: Error) { - if (packageManager.id !== 'gradle' || process.env['RUNNER_OS'] !== 'Windows') { +function isProbablyGradleDaemonProblem( + packageManager: PackageManager, + error: Error +) { + if ( + packageManager.id !== 'gradle' || + process.env['RUNNER_OS'] !== 'Windows' + ) { return false; } const message = error.message || ''; diff --git a/src/cleanup-java.ts b/src/cleanup-java.ts index a890c4b6..f320fa84 100644 --- a/src/cleanup-java.ts +++ b/src/cleanup-java.ts @@ -1,14 +1,16 @@ import * as core from '@actions/core'; import * as gpg from './gpg'; import * as constants from './constants'; -import { isJobStatusSuccess } from './util'; -import { save } from './cache'; +import {isJobStatusSuccess} from './util'; +import {save} from './cache'; async function removePrivateKeyFromKeychain() { - if (core.getInput(constants.INPUT_GPG_PRIVATE_KEY, { required: false })) { + if (core.getInput(constants.INPUT_GPG_PRIVATE_KEY, {required: false})) { core.info('Removing private key from keychain'); try { - const keyFingerprint = core.getState(constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT); + const keyFingerprint = core.getState( + constants.STATE_GPG_PRIVATE_KEY_FINGERPRINT + ); await gpg.deleteKey(keyFingerprint); } catch (error) { core.setFailed(`Failed to remove private key due to: ${error.message}`); diff --git a/src/constants.ts b/src/constants.ts index ad8709e7..9aa213fa 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,5 +1,6 @@ export const MACOS_JAVA_CONTENT_POSTFIX = 'Contents/Home'; export const INPUT_JAVA_VERSION = 'java-version'; +export const INPUT_JAVA_VERSION_FILE = 'java-version-file'; export const INPUT_ARCHITECTURE = 'architecture'; export const INPUT_JAVA_PACKAGE = 'java-package'; export const INPUT_DISTRIBUTION = 'distribution'; @@ -26,3 +27,5 @@ export const MVN_SETTINGS_FILE = 'settings.xml'; export const MVN_TOOLCHAINS_FILE = 'toolchains.xml'; export const INPUT_MVN_TOOLCHAIN_ID = 'mvn-toolchain-id'; export const INPUT_MVN_TOOLCHAIN_VENDOR = 'mvn-toolchain-vendor'; + +export const DISTRIBUTIONS_ONLY_MAJOR_VERSION = ['corretto']; diff --git a/src/distributions/adopt/installer.ts b/src/distributions/adopt/installer.ts index 52b64c6a..9887b789 100644 --- a/src/distributions/adopt/installer.ts +++ b/src/distributions/adopt/installer.ts @@ -5,10 +5,18 @@ import fs from 'fs'; import path from 'path'; import semver from 'semver'; -import { JavaBase } from '../base-installer'; -import { IAdoptAvailableVersions } from './models'; -import { JavaDownloadRelease, JavaInstallerOptions, JavaInstallerResults } from '../base-models'; -import { extractJdkFile, getDownloadArchiveExtension, isVersionSatisfies } from '../../util'; +import {JavaBase} from '../base-installer'; +import {IAdoptAvailableVersions} from './models'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; +import { + extractJdkFile, + getDownloadArchiveExtension, + isVersionSatisfies +} from '../../util'; export enum AdoptImplementation { Hotspot = 'Hotspot', @@ -23,7 +31,9 @@ export class AdoptDistribution extends JavaBase { super(`Adopt-${jvmImpl}`, installerOptions); } - protected async findPackageForDownload(version: string): Promise { + protected async findPackageForDownload( + version: string + ): Promise { const availableVersionsRaw = await this.getAvailableVersions(); const availableVersionsWithBinaries = availableVersionsRaw .filter(item => item.binaries.length > 0) @@ -40,9 +50,12 @@ export class AdoptDistribution extends JavaBase { return -semver.compareBuild(a.version, b.version); }); - const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + const resolvedFullVersion = + satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; if (!resolvedFullVersion) { - const availableOptions = availableVersionsWithBinaries.map(item => item.version).join(', '); + const availableOptions = availableVersionsWithBinaries + .map(item => item.version) + .join(', '); const availableOptionsMessage = availableOptions ? `\nAvailable versions: ${availableOptions}` : ''; @@ -54,27 +67,31 @@ export class AdoptDistribution extends JavaBase { return resolvedFullVersion; } - protected async downloadTool(javaRelease: JavaDownloadRelease): Promise { - let javaPath: string; - let extractedJavaPath: string; - + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); const javaArchivePath = await tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); - let extension = getDownloadArchiveExtension(); + const extension = getDownloadArchiveExtension(); - extractedJavaPath = await extractJdkFile(javaArchivePath, extension); + const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); const archiveName = fs.readdirSync(extractedJavaPath)[0]; const archivePath = path.join(extractedJavaPath, archiveName); const version = this.getToolcacheVersionName(javaRelease.version); - javaPath = await tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + const javaPath = await tc.cacheDir( + archivePath, + this.toolcacheFolderName, + version, + this.architecture + ); - return { version: javaRelease.version, path: javaPath }; + return {version: javaRelease.version, path: javaPath}; } protected get toolcacheFolderName(): string { @@ -94,7 +111,7 @@ export class AdoptDistribution extends JavaBase { const releaseType = this.stable ? 'ga' : 'ea'; if (core.isDebug()) { - console.time('adopt-retrieve-available-versions'); + console.time('Retrieving available versions for Adopt took'); // eslint-disable-line no-console } const baseRequestArguments = [ @@ -119,7 +136,9 @@ export class AdoptDistribution extends JavaBase { const availableVersionsUrl = `https://api.adoptopenjdk.net/v3/assets/version/${versionRange}?${requestArguments}`; if (core.isDebug() && page_index === 0) { // url is identical except page_index so print it once for debug - core.debug(`Gathering available versions from '${availableVersionsUrl}'`); + core.debug( + `Gathering available versions from '${availableVersionsUrl}'` + ); } const paginationPage = ( @@ -136,9 +155,11 @@ export class AdoptDistribution extends JavaBase { if (core.isDebug()) { core.startGroup('Print information about available versions'); - console.timeEnd('adopt-retrieve-available-versions'); - console.log(`Available versions: [${availableVersions.length}]`); - console.log(availableVersions.map(item => item.version_data.semver).join(', ')); + console.timeEnd('Retrieving available versions for Adopt took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug( + availableVersions.map(item => item.version_data.semver).join(', ') + ); core.endGroup(); } diff --git a/src/distributions/base-installer.ts b/src/distributions/base-installer.ts index 1a31ffaa..258ac9f4 100644 --- a/src/distributions/base-installer.ts +++ b/src/distributions/base-installer.ts @@ -4,9 +4,13 @@ import * as fs from 'fs'; import semver from 'semver'; import path from 'path'; import * as httpm from '@actions/http-client'; -import { getToolcachePath, isVersionSatisfies } from '../util'; -import { JavaDownloadRelease, JavaInstallerOptions, JavaInstallerResults } from './base-models'; -import { MACOS_JAVA_CONTENT_POSTFIX } from '../constants'; +import {getToolcachePath, isVersionSatisfies} from '../util'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from './base-models'; +import {MACOS_JAVA_CONTENT_POSTFIX} from '../constants'; import os from 'os'; export abstract class JavaBase { @@ -17,13 +21,16 @@ export abstract class JavaBase { protected stable: boolean; protected checkLatest: boolean; - constructor(protected distribution: string, installerOptions: JavaInstallerOptions) { + constructor( + protected distribution: string, + installerOptions: JavaInstallerOptions + ) { this.http = new httpm.HttpClient('actions/setup-java', undefined, { allowRetries: true, maxRetries: 3 }); - ({ version: this.version, stable: this.stable } = this.normalizeVersion( + ({version: this.version, stable: this.stable} = this.normalizeVersion( installerOptions.version )); this.architecture = installerOptions.architecture || os.arch(); @@ -31,8 +38,12 @@ export abstract class JavaBase { this.checkLatest = installerOptions.checkLatest; } - protected abstract downloadTool(javaRelease: JavaDownloadRelease): Promise; - protected abstract findPackageForDownload(range: string): Promise; + protected abstract downloadTool( + javaRelease: JavaDownloadRelease + ): Promise; + protected abstract findPackageForDownload( + range: string + ): Promise; public async setupJava(): Promise { let foundJava = this.findInToolcache(); @@ -52,7 +63,10 @@ export abstract class JavaBase { } // JDK folder may contain postfix "Contents/Home" on macOS - const macOSPostfixPath = path.join(foundJava.path, MACOS_JAVA_CONTENT_POSTFIX); + const macOSPostfixPath = path.join( + foundJava.path, + MACOS_JAVA_CONTENT_POSTFIX + ); if (process.platform === 'darwin' && fs.existsSync(macOSPostfixPath)) { foundJava.path = macOSPostfixPath; } @@ -96,7 +110,12 @@ export abstract class JavaBase { // so replace "/hostedtoolcache/Java/11.0.3-4/x64" to "/hostedtoolcache/Java/11.0.3+4/x64" when retrieves to cache // related issue: https://github.com/actions/virtual-environments/issues/3014 .replace('-', '+'), - path: getToolcachePath(this.toolcacheFolderName, item, this.architecture) || '', + path: + getToolcachePath( + this.toolcacheFolderName, + item, + this.architecture + ) || '', stable: !item.includes('-ea') }; }) @@ -149,7 +168,10 @@ export abstract class JavaBase { core.setOutput('distribution', this.distribution); core.setOutput('path', toolPath); core.setOutput('version', version); - core.exportVariable(`JAVA_HOME_${majorVersion}_${this.architecture.toUpperCase()}`, toolPath); + core.exportVariable( + `JAVA_HOME_${majorVersion}_${this.architecture.toUpperCase()}`, + toolPath + ); } protected distributionArchitecture(): string { diff --git a/src/distributions/corretto/installer.ts b/src/distributions/corretto/installer.ts index 6b4872d8..38384cb7 100644 --- a/src/distributions/corretto/installer.ts +++ b/src/distributions/corretto/installer.ts @@ -2,17 +2,26 @@ import * as core from '@actions/core'; import * as tc from '@actions/tool-cache'; import fs from 'fs'; import path from 'path'; -import { extractJdkFile, getDownloadArchiveExtension } from '../../util'; -import { JavaBase } from '../base-installer'; -import { JavaDownloadRelease, JavaInstallerOptions, JavaInstallerResults } from '../base-models'; -import { ICorrettoAllAvailableVersions, ICorrettoAvailableVersions } from './models'; +import {extractJdkFile, getDownloadArchiveExtension} from '../../util'; +import {JavaBase} from '../base-installer'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; +import { + ICorrettoAllAvailableVersions, + ICorrettoAvailableVersions +} from './models'; export class CorrettoDistribution extends JavaBase { constructor(installerOptions: JavaInstallerOptions) { super('Corretto', installerOptions); } - protected async downloadTool(javaRelease: JavaDownloadRelease): Promise { + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); @@ -20,7 +29,10 @@ export class CorrettoDistribution extends JavaBase { core.info(`Extracting Java archive...`); - const extractedJavaPath = await extractJdkFile(javaArchivePath, getDownloadArchiveExtension()); + const extractedJavaPath = await extractJdkFile( + javaArchivePath, + getDownloadArchiveExtension() + ); const archiveName = fs.readdirSync(extractedJavaPath)[0]; const archivePath = path.join(extractedJavaPath, archiveName); @@ -33,10 +45,12 @@ export class CorrettoDistribution extends JavaBase { this.architecture ); - return { version: javaRelease.version, path: javaPath }; + return {version: javaRelease.version, path: javaPath}; } - protected async findPackageForDownload(version: string): Promise { + protected async findPackageForDownload( + version: string + ): Promise { if (!this.stable) { throw new Error('Early access versions are not supported'); } @@ -53,9 +67,12 @@ export class CorrettoDistribution extends JavaBase { } as JavaDownloadRelease; }); - const resolvedVersion = matchingVersions.length > 0 ? matchingVersions[0] : null; + const resolvedVersion = + matchingVersions.length > 0 ? matchingVersions[0] : null; if (!resolvedVersion) { - const availableOptions = availableVersions.map(item => item.version).join(', '); + const availableOptions = availableVersions + .map(item => item.version) + .join(', '); const availableOptionsMessage = availableOptions ? `\nAvailable versions: ${availableOptions}` : ''; @@ -72,43 +89,61 @@ export class CorrettoDistribution extends JavaBase { const imageType = this.packageType; if (core.isDebug()) { - console.time('corretto-retrieve-available-versions'); + console.time('Retrieving available versions for Coretto took'); // eslint-disable-line no-console } const availableVersionsUrl = 'https://corretto.github.io/corretto-downloads/latest_links/indexmap_with_checksum.json'; - const fetchCurrentVersions = await this.http.getJson( - availableVersionsUrl - ); + const fetchCurrentVersions = + await this.http.getJson( + availableVersionsUrl + ); const fetchedCurrentVersions = fetchCurrentVersions.result; if (!fetchedCurrentVersions) { - throw Error(`Could not fetch latest corretto versions from ${availableVersionsUrl}`); + throw Error( + `Could not fetch latest corretto versions from ${availableVersionsUrl}` + ); } - const eligibleVersions = fetchedCurrentVersions?.[platform]?.[arch]?.[imageType]; - const availableVersions = this.getAvailableVersionsForPlatform(eligibleVersions); + const eligibleVersions = + fetchedCurrentVersions?.[platform]?.[arch]?.[imageType]; + const availableVersions = + this.getAvailableVersionsForPlatform(eligibleVersions); if (core.isDebug()) { - this.printAvailableVersions(availableVersions); + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Coretto took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug( + availableVersions + .map(item => `${item.version}: ${item.correttoVersion}`) + .join(', ') + ); + core.endGroup(); } return availableVersions; } private getAvailableVersionsForPlatform( - eligibleVersions: ICorrettoAllAvailableVersions['os']['arch']['imageType'] | undefined + eligibleVersions: + | ICorrettoAllAvailableVersions['os']['arch']['imageType'] + | undefined ): ICorrettoAvailableVersions[] { const availableVersions: ICorrettoAvailableVersions[] = []; for (const version in eligibleVersions) { const availableVersion = eligibleVersions[version]; for (const fileType in availableVersion) { - const skipNonExtractableBinaries = fileType != getDownloadArchiveExtension(); + const skipNonExtractableBinaries = + fileType != getDownloadArchiveExtension(); if (skipNonExtractableBinaries) { continue; } const availableVersionDetails = availableVersion[fileType]; - const correttoVersion = this.getCorrettoVersion(availableVersionDetails.resource); + const correttoVersion = this.getCorrettoVersion( + availableVersionDetails.resource + ); availableVersions.push({ checksum: availableVersionDetails.checksum, @@ -124,16 +159,6 @@ export class CorrettoDistribution extends JavaBase { return availableVersions; } - private printAvailableVersions(availableVersions: ICorrettoAvailableVersions[]) { - core.startGroup('Print information about available versions'); - console.timeEnd('corretto-retrieve-available-versions'); - console.log(`Available versions: [${availableVersions.length}]`); - console.log( - availableVersions.map(item => `${item.version}: ${item.correttoVersion}`).join(', ') - ); - core.endGroup(); - } - private getPlatformOption(): string { // Corretto has its own platform names so we need to map them switch (process.platform) { diff --git a/src/distributions/distribution-factory.ts b/src/distributions/distribution-factory.ts index 9e14a804..1dd5131a 100644 --- a/src/distributions/distribution-factory.ts +++ b/src/distributions/distribution-factory.ts @@ -1,12 +1,14 @@ -import { JavaBase } from './base-installer'; -import { JavaInstallerOptions } from './base-models'; -import { LocalDistribution } from './local/installer'; -import { ZuluDistribution } from './zulu/installer'; -import { AdoptDistribution, AdoptImplementation } from './adopt/installer'; -import { TemurinDistribution, TemurinImplementation } from './temurin/installer'; -import { LibericaDistributions } from './liberica/installer'; -import { MicrosoftDistributions } from './microsoft/installer'; -import { CorrettoDistribution } from './corretto/installer'; +import {JavaBase} from './base-installer'; +import {JavaInstallerOptions} from './base-models'; +import {LocalDistribution} from './local/installer'; +import {ZuluDistribution} from './zulu/installer'; +import {AdoptDistribution, AdoptImplementation} from './adopt/installer'; +import {TemurinDistribution, TemurinImplementation} from './temurin/installer'; +import {LibericaDistributions} from './liberica/installer'; +import {MicrosoftDistributions} from './microsoft/installer'; +import {SemeruDistribution} from './semeru/installer'; +import {CorrettoDistribution} from './corretto/installer'; +import {OracleDistribution} from './oracle/installer'; enum JavaDistribution { Adopt = 'adopt', @@ -17,7 +19,9 @@ enum JavaDistribution { Liberica = 'liberica', JdkFile = 'jdkfile', Microsoft = 'microsoft', - Corretto = 'corretto' + Semeru = 'semeru', + Corretto = 'corretto', + Oracle = 'oracle' } export function getJavaDistribution( @@ -30,19 +34,32 @@ export function getJavaDistribution( return new LocalDistribution(installerOptions, jdkFile); case JavaDistribution.Adopt: case JavaDistribution.AdoptHotspot: - return new AdoptDistribution(installerOptions, AdoptImplementation.Hotspot); + return new AdoptDistribution( + installerOptions, + AdoptImplementation.Hotspot + ); case JavaDistribution.AdoptOpenJ9: - return new AdoptDistribution(installerOptions, AdoptImplementation.OpenJ9); + return new AdoptDistribution( + installerOptions, + AdoptImplementation.OpenJ9 + ); case JavaDistribution.Temurin: - return new TemurinDistribution(installerOptions, TemurinImplementation.Hotspot); + return new TemurinDistribution( + installerOptions, + TemurinImplementation.Hotspot + ); case JavaDistribution.Zulu: return new ZuluDistribution(installerOptions); case JavaDistribution.Liberica: return new LibericaDistributions(installerOptions); case JavaDistribution.Microsoft: return new MicrosoftDistributions(installerOptions); + case JavaDistribution.Semeru: + return new SemeruDistribution(installerOptions); case JavaDistribution.Corretto: return new CorrettoDistribution(installerOptions); + case JavaDistribution.Oracle: + return new OracleDistribution(installerOptions); default: return null; } diff --git a/src/distributions/liberica/installer.ts b/src/distributions/liberica/installer.ts index f06e56ee..313f29ea 100644 --- a/src/distributions/liberica/installer.ts +++ b/src/distributions/liberica/installer.ts @@ -1,9 +1,17 @@ -import { JavaBase } from '../base-installer'; -import { JavaDownloadRelease, JavaInstallerOptions, JavaInstallerResults } from '../base-models'; +import {JavaBase} from '../base-installer'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; import semver from 'semver'; -import { extractJdkFile, getDownloadArchiveExtension, isVersionSatisfies } from '../../util'; +import { + extractJdkFile, + getDownloadArchiveExtension, + isVersionSatisfies +} from '../../util'; import * as core from '@actions/core'; -import { ArchitectureOptions, LibericaVersion, OsVersions } from './models'; +import {ArchitectureOptions, LibericaVersion, OsVersions} from './models'; import * as tc from '@actions/tool-cache'; import fs from 'fs'; import path from 'path'; @@ -17,7 +25,9 @@ export class LibericaDistributions extends JavaBase { super('Liberica', installerOptions); } - protected async downloadTool(javaRelease: JavaDownloadRelease): Promise { + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); @@ -37,10 +47,12 @@ export class LibericaDistributions extends JavaBase { this.architecture ); - return { version: javaRelease.version, path: javaPath }; + return {version: javaRelease.version, path: javaPath}; } - protected async findPackageForDownload(range: string): Promise { + protected async findPackageForDownload( + range: string + ): Promise { const availableVersionsRaw = await this.getAvailableVersions(); const availableVersions = availableVersionsRaw.map(item => ({ @@ -53,7 +65,9 @@ export class LibericaDistributions extends JavaBase { .sort((a, b) => -semver.compareBuild(a.version, b.version))[0]; if (!satisfiedVersion) { - const availableOptions = availableVersions.map(item => item.version).join(', '); + const availableOptions = availableVersions + .map(item => item.version) + .join(', '); const availableOptionsMessage = availableOptions ? `\nAvailable versions: ${availableOptions}` : ''; @@ -67,21 +81,20 @@ export class LibericaDistributions extends JavaBase { private async getAvailableVersions(): Promise { if (core.isDebug()) { - console.time('liberica-retrieve-available-versions'); + console.time('Retrieving available versions for Liberica took'); // eslint-disable-line no-console } const url = this.prepareAvailableVersionsUrl(); - if (core.isDebug()) { - core.debug(`Gathering available versions from '${url}'`); - } + core.debug(`Gathering available versions from '${url}'`); - const availableVersions = (await this.http.getJson(url)).result ?? []; + const availableVersions = + (await this.http.getJson(url)).result ?? []; if (core.isDebug()) { core.startGroup('Print information about available versions'); - console.timeEnd('liberica-retrieve-available-versions'); - console.log(`Available versions: [${availableVersions.length}]`); - console.log(availableVersions.map(item => item.version)); + console.timeEnd('Retrieving available versions for Liberica took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug(availableVersions.map(item => item.version).join(', ')); core.endGroup(); } @@ -95,7 +108,8 @@ export class LibericaDistributions extends JavaBase { ...this.getArchitectureOptions(), 'build-type': this.stable ? 'all' : 'ea', 'installation-type': 'archive', - fields: 'downloadUrl,version,featureVersion,interimVersion,updateVersion,buildVersion' + fields: + 'downloadUrl,version,featureVersion,interimVersion,updateVersion,buildVersion' }; const searchParams = new URLSearchParams(urlOptions).toString(); @@ -115,15 +129,15 @@ export class LibericaDistributions extends JavaBase { const arch = this.distributionArchitecture(); switch (arch) { case 'x86': - return { bitness: '32', arch: 'x86' }; + return {bitness: '32', arch: 'x86'}; case 'x64': - return { bitness: '64', arch: 'x86' }; + return {bitness: '64', arch: 'x86'}; case 'armv7': - return { bitness: '32', arch: 'arm' }; + return {bitness: '32', arch: 'arm'}; case 'aarch64': - return { bitness: '64', arch: 'arm' }; + return {bitness: '64', arch: 'arm'}; case 'ppc64le': - return { bitness: '64', arch: 'ppc' }; + return {bitness: '64', arch: 'ppc'}; default: throw new Error( `Architecture '${this.architecture}' is not supported. Supported architectures: ${supportedArchitectures}` @@ -131,7 +145,9 @@ export class LibericaDistributions extends JavaBase { } } - private getPlatformOption(platform: NodeJS.Platform = process.platform): OsVersions { + private getPlatformOption( + platform: NodeJS.Platform = process.platform + ): OsVersions { switch (platform) { case 'darwin': return 'macos'; @@ -150,8 +166,11 @@ export class LibericaDistributions extends JavaBase { } private convertVersionToSemver(version: LibericaVersion): string { - let { buildVersion, featureVersion, interimVersion, updateVersion } = version; - const mainVersion = [featureVersion, interimVersion, updateVersion].join('.'); + const {buildVersion, featureVersion, interimVersion, updateVersion} = + version; + const mainVersion = [featureVersion, interimVersion, updateVersion].join( + '.' + ); if (buildVersion != 0) { return `${mainVersion}+${buildVersion}`; } @@ -159,7 +178,7 @@ export class LibericaDistributions extends JavaBase { } protected distributionArchitecture(): string { - let arch = super.distributionArchitecture(); + const arch = super.distributionArchitecture(); switch (arch) { case 'arm': return 'armv7'; diff --git a/src/distributions/liberica/models.ts b/src/distributions/liberica/models.ts index 1f19071d..c9285fb7 100644 --- a/src/distributions/liberica/models.ts +++ b/src/distributions/liberica/models.ts @@ -3,7 +3,12 @@ export type Bitness = '32' | '64'; export type ArchType = 'arm' | 'ppc' | 'sparc' | 'x86'; -export type OsVersions = 'linux' | 'linux-musl' | 'macos' | 'solaris' | 'windows'; +export type OsVersions = + | 'linux' + | 'linux-musl' + | 'macos' + | 'solaris' + | 'windows'; export interface ArchitectureOptions { bitness: Bitness; diff --git a/src/distributions/local/installer.ts b/src/distributions/local/installer.ts index 0b91febf..82826064 100644 --- a/src/distributions/local/installer.ts +++ b/src/distributions/local/installer.ts @@ -3,15 +3,21 @@ import * as core from '@actions/core'; import fs from 'fs'; import path from 'path'; -import semver from 'semver'; -import { JavaBase } from '../base-installer'; -import { JavaInstallerOptions, JavaDownloadRelease, JavaInstallerResults } from '../base-models'; -import { extractJdkFile } from '../../util'; -import { MACOS_JAVA_CONTENT_POSTFIX } from '../../constants'; +import {JavaBase} from '../base-installer'; +import { + JavaInstallerOptions, + JavaDownloadRelease, + JavaInstallerResults +} from '../base-models'; +import {extractJdkFile} from '../../util'; +import {MACOS_JAVA_CONTENT_POSTFIX} from '../../constants'; export class LocalDistribution extends JavaBase { - constructor(installerOptions: JavaInstallerOptions, private jdkFile?: string) { + constructor( + installerOptions: JavaInstallerOptions, + private jdkFile?: string + ) { super('jdkfile', installerOptions); } @@ -21,7 +27,9 @@ export class LocalDistribution extends JavaBase { if (foundJava) { core.info(`Resolved Java ${foundJava.version} from tool-cache`); } else { - core.info(`Java ${this.version} was not found in tool-cache. Trying to unpack JDK file...`); + core.info( + `Java ${this.version} was not found in tool-cache. Trying to unpack JDK file...` + ); if (!this.jdkFile) { throw new Error("'jdkFile' is not specified"); } @@ -64,11 +72,19 @@ export class LocalDistribution extends JavaBase { return foundJava; } - protected async findPackageForDownload(version: string): Promise { - throw new Error('This method should not be implemented in local file provider'); + protected async findPackageForDownload( + version: string // eslint-disable-line @typescript-eslint/no-unused-vars + ): Promise { + throw new Error( + 'This method should not be implemented in local file provider' + ); } - protected async downloadTool(javaRelease: JavaDownloadRelease): Promise { - throw new Error('This method should not be implemented in local file provider'); + protected async downloadTool( + javaRelease: JavaDownloadRelease // eslint-disable-line @typescript-eslint/no-unused-vars + ): Promise { + throw new Error( + 'This method should not be implemented in local file provider' + ); } } diff --git a/src/distributions/microsoft/installer.ts b/src/distributions/microsoft/installer.ts index 6284f961..8b6a7a38 100644 --- a/src/distributions/microsoft/installer.ts +++ b/src/distributions/microsoft/installer.ts @@ -1,19 +1,25 @@ -import { JavaBase } from '../base-installer'; -import { JavaDownloadRelease, JavaInstallerOptions, JavaInstallerResults } from '../base-models'; -import { extractJdkFile, getDownloadArchiveExtension } from '../../util'; +import {JavaBase} from '../base-installer'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; +import {extractJdkFile, getDownloadArchiveExtension} from '../../util'; import * as core from '@actions/core'; import * as tc from '@actions/tool-cache'; -import { OutgoingHttpHeaders } from 'http'; +import {OutgoingHttpHeaders} from 'http'; import fs from 'fs'; import path from 'path'; -import { ITypedResponse } from '@actions/http-client/interfaces'; +import {ITypedResponse} from '@actions/http-client/interfaces'; export class MicrosoftDistributions extends JavaBase { constructor(installerOptions: JavaInstallerOptions) { super('Microsoft', installerOptions); } - protected async downloadTool(javaRelease: JavaDownloadRelease): Promise { + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); @@ -33,10 +39,12 @@ export class MicrosoftDistributions extends JavaBase { this.architecture ); - return { version: javaRelease.version, path: javaPath }; + return {version: javaRelease.version, path: javaPath}; } - protected async findPackageForDownload(range: string): Promise { + protected async findPackageForDownload( + range: string + ): Promise { const arch = this.distributionArchitecture(); if (arch !== 'x64' && arch !== 'aarch64') { throw new Error(`Unsupported architecture: ${this.architecture}`); @@ -47,7 +55,9 @@ export class MicrosoftDistributions extends JavaBase { } if (this.packageType !== 'jdk') { - throw new Error('Microsoft Build of OpenJDK provides only the `jdk` package type'); + throw new Error( + 'Microsoft Build of OpenJDK provides only the `jdk` package type' + ); } const manifest = await this.getAvailableVersions(); @@ -60,34 +70,43 @@ export class MicrosoftDistributions extends JavaBase { if (!foundRelease) { throw new Error( - `Could not find satisfied version for SemVer ${range}. ${manifest + `Could not find satisfied version for SemVer ${range}.\nAvailable versions: ${manifest .map(item => item.version) .join(', ')}` ); } - return { url: foundRelease.files[0].download_url, version: foundRelease.version }; + return { + url: foundRelease.files[0].download_url, + version: foundRelease.version + }; } private async getAvailableVersions(): Promise { // TODO get these dynamically! // We will need Microsoft to add an endpoint where we can query for versions. const token = core.getInput('token'); + const auth = !token ? undefined : `token ${token}`; const owner = 'actions'; const repository = 'setup-java'; const branch = 'main'; - const filePath = 'src/distributions/microsoft/microsoft-openjdk-versions.json'; + const filePath = + 'src/distributions/microsoft/microsoft-openjdk-versions.json'; let releases: tc.IToolRelease[] | null = null; const fileUrl = `https://api.github.com/repos/${owner}/${repository}/contents/${filePath}?ref=${branch}`; const headers: OutgoingHttpHeaders = { - authorization: token, + authorization: auth, accept: 'application/vnd.github.VERSION.raw' }; let response: ITypedResponse | null = null; + if (core.isDebug()) { + console.time('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console + } + try { response = await this.http.getJson(fileUrl, headers); if (!response.result) { @@ -104,6 +123,14 @@ export class MicrosoftDistributions extends JavaBase { releases = response.result; } + if (core.isDebug() && releases) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Microsoft took'); // eslint-disable-line no-console + core.debug(`Available versions: [${releases.length}]`); + core.debug(releases.map(item => item.version).join(', ')); + core.endGroup(); + } + return releases; } } diff --git a/src/distributions/microsoft/models.ts b/src/distributions/microsoft/models.ts index c012bc73..ed39a734 100644 --- a/src/distributions/microsoft/models.ts +++ b/src/distributions/microsoft/models.ts @@ -1,2 +1,3 @@ +/* eslint @typescript-eslint/no-unused-vars: "off" -- There is a bug with this rule, it's not working properly with types */ type OsVersions = 'linux' | 'macos' | 'windows'; type ArchiveType = 'tar.gz' | 'zip'; diff --git a/src/distributions/oracle/installer.ts b/src/distributions/oracle/installer.ts new file mode 100644 index 00000000..2093339a --- /dev/null +++ b/src/distributions/oracle/installer.ts @@ -0,0 +1,111 @@ +import * as core from '@actions/core'; +import * as tc from '@actions/tool-cache'; + +import fs from 'fs'; +import path from 'path'; + +import {JavaBase} from '../base-installer'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; +import {extractJdkFile, getDownloadArchiveExtension} from '../../util'; +import {HttpCodes} from '@actions/http-client'; + +const ORACLE_DL_BASE = 'https://download.oracle.com/java'; + +export class OracleDistribution extends JavaBase { + constructor(installerOptions: JavaInstallerOptions) { + super('Oracle', installerOptions); + } + + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { + core.info( + `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` + ); + const javaArchivePath = await tc.downloadTool(javaRelease.url); + + core.info(`Extracting Java archive...`); + const extension = getDownloadArchiveExtension(); + + const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); + + const archiveName = fs.readdirSync(extractedJavaPath)[0]; + const archivePath = path.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + + const javaPath = await tc.cacheDir( + archivePath, + this.toolcacheFolderName, + version, + this.architecture + ); + + return {version: javaRelease.version, path: javaPath}; + } + + protected async findPackageForDownload( + range: string + ): Promise { + const arch = this.distributionArchitecture(); + if (arch !== 'x64' && arch !== 'aarch64') { + throw new Error(`Unsupported architecture: ${this.architecture}`); + } + + if (!this.stable) { + throw new Error('Early access versions are not supported'); + } + + if (this.packageType !== 'jdk') { + throw new Error('Oracle JDK provides only the `jdk` package type'); + } + + const platform = this.getPlatform(); + const extension = getDownloadArchiveExtension(); + let major; + let fileUrl; + if (range.includes('.')) { + major = range.split('.')[0]; + fileUrl = `${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}`; + } else { + major = range; + fileUrl = `${ORACLE_DL_BASE}/${range}/latest/jdk-${range}_${platform}-${arch}_bin.${extension}`; + } + + if (parseInt(major) < 17) { + throw new Error('Oracle JDK is only supported for JDK 17 and later'); + } + + const response = await this.http.head(fileUrl); + + if (response.message.statusCode === HttpCodes.NotFound) { + throw new Error(`Could not find Oracle JDK for SemVer ${range}`); + } + + if (response.message.statusCode !== HttpCodes.OK) { + throw new Error( + `Http request for Oracle JDK failed with status code: ${response.message.statusCode}` + ); + } + + return {url: fileUrl, version: range}; + } + + public getPlatform(platform: NodeJS.Platform = process.platform): OsVersions { + switch (platform) { + case 'darwin': + return 'macos'; + case 'win32': + return 'windows'; + case 'linux': + return 'linux'; + default: + throw new Error( + `Platform '${platform}' is not supported. Supported platforms: 'linux', 'macos', 'windows'` + ); + } + } +} diff --git a/src/distributions/oracle/models.ts b/src/distributions/oracle/models.ts new file mode 100644 index 00000000..2838ead4 --- /dev/null +++ b/src/distributions/oracle/models.ts @@ -0,0 +1 @@ +export type OsVersions = 'linux' | 'macos' | 'windows'; diff --git a/src/distributions/semeru/installer.ts b/src/distributions/semeru/installer.ts new file mode 100644 index 00000000..c4075261 --- /dev/null +++ b/src/distributions/semeru/installer.ts @@ -0,0 +1,201 @@ +import {JavaBase} from '../base-installer'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; +import semver from 'semver'; +import { + extractJdkFile, + getDownloadArchiveExtension, + isVersionSatisfies +} from '../../util'; +import * as core from '@actions/core'; +import * as tc from '@actions/tool-cache'; +import fs from 'fs'; +import path from 'path'; +import {ISemeruAvailableVersions} from './models'; + +const supportedArchitectures = [ + 'x64', + 'x86', + 'ppc64le', + 'ppc64', + 's390x', + 'aarch64' +]; + +export class SemeruDistribution extends JavaBase { + constructor(installerOptions: JavaInstallerOptions) { + super('IBM_Semeru', installerOptions); + } + + protected async findPackageForDownload( + version: string + ): Promise { + if (!supportedArchitectures.includes(this.architecture)) { + throw new Error( + `Unsupported architecture for IBM Semeru: ${ + this.architecture + }, the following are supported: ${supportedArchitectures.join(', ')}` + ); + } + + if (!this.stable) { + throw new Error( + 'IBM Semeru does not provide builds for early access versions' + ); + } + + if (this.packageType !== 'jdk' && this.packageType !== 'jre') { + throw new Error('IBM Semeru only provide `jdk` and `jre` package types'); + } + + const availableVersionsRaw = await this.getAvailableVersions(); + const availableVersionsWithBinaries = availableVersionsRaw + .filter(item => item.binaries.length > 0) + .map(item => { + // normalize 17.0.0-beta+33.0.202107301459 to 17.0.0+33.0.202107301459 for earlier access versions + const formattedVersion = this.stable + ? item.version_data.semver + : item.version_data.semver.replace('-beta+', '+'); + return { + version: formattedVersion, + url: item.binaries[0].package.link + } as JavaDownloadRelease; + }); + + const satisfiedVersions = availableVersionsWithBinaries + .filter(item => isVersionSatisfies(version, item.version)) + .sort((a, b) => { + return -semver.compareBuild(a.version, b.version); + }); + + const resolvedFullVersion = + satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + if (!resolvedFullVersion) { + const availableOptions = availableVersionsWithBinaries + .map(item => item.version) + .join(', '); + const availableOptionsMessage = availableOptions + ? `\nAvailable versions: ${availableOptions}` + : ''; + throw new Error( + `Could not find satisfied version for SemVer '${version}'. ${availableOptionsMessage}` + ); + } + + return resolvedFullVersion; + } + + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { + core.info( + `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` + ); + const javaArchivePath = await tc.downloadTool(javaRelease.url); + + core.info(`Extracting Java archive...`); + const extension = getDownloadArchiveExtension(); + + const extractedJavaPath: string = await extractJdkFile( + javaArchivePath, + extension + ); + + const archiveName = fs.readdirSync(extractedJavaPath)[0]; + const archivePath = path.join(extractedJavaPath, archiveName); + const version = this.getToolcacheVersionName(javaRelease.version); + + const javaPath: string = await tc.cacheDir( + archivePath, + this.toolcacheFolderName, + version, + this.architecture + ); + + return {version: javaRelease.version, path: javaPath}; + } + + protected get toolcacheFolderName(): string { + return super.toolcacheFolderName; + } + + public async getAvailableVersions(): Promise { + const platform = this.getPlatformOption(); + const arch = this.architecture; + const imageType = this.packageType; + const versionRange = encodeURI('[1.0,100.0]'); // retrieve all available versions + const releaseType = this.stable ? 'ga' : 'ea'; + + if (core.isDebug()) { + console.time('Retrieving available versions for Semeru took'); // eslint-disable-line no-console + } + + const baseRequestArguments = [ + `project=jdk`, + 'vendor=ibm', + `heap_size=normal`, + 'sort_method=DEFAULT', + 'sort_order=DESC', + `os=${platform}`, + `architecture=${arch}`, + `image_type=${imageType}`, + `release_type=${releaseType}`, + `jvm_impl=openj9` + ].join('&'); + + // need to iterate through all pages to retrieve the list of all versions + // Adoptium API doesn't provide way to retrieve the count of pages to iterate so infinity loop + let page_index = 0; + const availableVersions: ISemeruAvailableVersions[] = []; + while (true) { + const requestArguments = `${baseRequestArguments}&page_size=20&page=${page_index}`; + const availableVersionsUrl = `https://api.adoptopenjdk.net/v3/assets/version/${versionRange}?${requestArguments}`; + if (core.isDebug() && page_index === 0) { + // url is identical except page_index so print it once for debug + core.debug( + `Gathering available versions from '${availableVersionsUrl}'` + ); + } + + const paginationPage = ( + await this.http.getJson( + availableVersionsUrl + ) + ).result; + if (paginationPage === null || paginationPage.length === 0) { + // break infinity loop because we have reached end of pagination + break; + } + + availableVersions.push(...paginationPage); + page_index++; + } + + if (core.isDebug()) { + core.startGroup('Print information about available versions'); + console.timeEnd('Retrieving available versions for Semeru took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug( + availableVersions.map(item => item.version_data.semver).join(', ') + ); + core.endGroup(); + } + + return availableVersions; + } + + private getPlatformOption(): string { + // Adopt has own platform names so need to map them + switch (process.platform) { + case 'darwin': + return 'mac'; + case 'win32': + return 'windows'; + default: + return process.platform; + } + } +} diff --git a/src/distributions/semeru/models.ts b/src/distributions/semeru/models.ts new file mode 100644 index 00000000..c9fdc023 --- /dev/null +++ b/src/distributions/semeru/models.ts @@ -0,0 +1,36 @@ +export interface ISemeruAvailableVersions { + binaries: [ + { + architecture: string; + heap_size: string; + image_type: string; + jvm_impl: string; + os: string; + package: { + checksum: string; + checksum_link: string; + download_count: number; + link: string; + metadata_link: string; + name: string; + size: string; + }; + project: string; + scm_ref: string; + updated_at: string; + } + ]; + id: string; + release_link: string; + release_name: string; + release_type: string; + vendor: string; + version_data: { + build: number; + major: number; + minor: number; + openjdk_version: string; + security: string; + semver: string; + }; +} diff --git a/src/distributions/temurin/installer.ts b/src/distributions/temurin/installer.ts index 4cd3e667..4a1989bc 100644 --- a/src/distributions/temurin/installer.ts +++ b/src/distributions/temurin/installer.ts @@ -5,10 +5,18 @@ import fs from 'fs'; import path from 'path'; import semver from 'semver'; -import { JavaBase } from '../base-installer'; -import { ITemurinAvailableVersions } from './models'; -import { JavaDownloadRelease, JavaInstallerOptions, JavaInstallerResults } from '../base-models'; -import { extractJdkFile, getDownloadArchiveExtension, isVersionSatisfies } from '../../util'; +import {JavaBase} from '../base-installer'; +import {ITemurinAvailableVersions} from './models'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; +import { + extractJdkFile, + getDownloadArchiveExtension, + isVersionSatisfies +} from '../../util'; export enum TemurinImplementation { Hotspot = 'Hotspot' @@ -22,7 +30,9 @@ export class TemurinDistribution extends JavaBase { super(`Temurin-${jvmImpl}`, installerOptions); } - protected async findPackageForDownload(version: string): Promise { + protected async findPackageForDownload( + version: string + ): Promise { const availableVersionsRaw = await this.getAvailableVersions(); const availableVersionsWithBinaries = availableVersionsRaw .filter(item => item.binaries.length > 0) @@ -43,9 +53,12 @@ export class TemurinDistribution extends JavaBase { return -semver.compareBuild(a.version, b.version); }); - const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + const resolvedFullVersion = + satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; if (!resolvedFullVersion) { - const availableOptions = availableVersionsWithBinaries.map(item => item.version).join(', '); + const availableOptions = availableVersionsWithBinaries + .map(item => item.version) + .join(', '); const availableOptionsMessage = availableOptions ? `\nAvailable versions: ${availableOptions}` : ''; @@ -57,27 +70,31 @@ export class TemurinDistribution extends JavaBase { return resolvedFullVersion; } - protected async downloadTool(javaRelease: JavaDownloadRelease): Promise { - let javaPath: string; - let extractedJavaPath: string; - + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); const javaArchivePath = await tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); - let extension = getDownloadArchiveExtension(); + const extension = getDownloadArchiveExtension(); - extractedJavaPath = await extractJdkFile(javaArchivePath, extension); + const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); const archiveName = fs.readdirSync(extractedJavaPath)[0]; const archivePath = path.join(extractedJavaPath, archiveName); const version = this.getToolcacheVersionName(javaRelease.version); - javaPath = await tc.cacheDir(archivePath, this.toolcacheFolderName, version, this.architecture); + const javaPath = await tc.cacheDir( + archivePath, + this.toolcacheFolderName, + version, + this.architecture + ); - return { version: javaRelease.version, path: javaPath }; + return {version: javaRelease.version, path: javaPath}; } protected get toolcacheFolderName(): string { @@ -92,7 +109,7 @@ export class TemurinDistribution extends JavaBase { const releaseType = this.stable ? 'ga' : 'ea'; if (core.isDebug()) { - console.time('temurin-retrieve-available-versions'); + console.time('Retrieving available versions for Temurin took'); // eslint-disable-line no-console } const baseRequestArguments = [ @@ -117,11 +134,15 @@ export class TemurinDistribution extends JavaBase { const availableVersionsUrl = `https://api.adoptium.net/v3/assets/version/${versionRange}?${requestArguments}`; if (core.isDebug() && page_index === 0) { // url is identical except page_index so print it once for debug - core.debug(`Gathering available versions from '${availableVersionsUrl}'`); + core.debug( + `Gathering available versions from '${availableVersionsUrl}'` + ); } const paginationPage = ( - await this.http.getJson(availableVersionsUrl) + await this.http.getJson( + availableVersionsUrl + ) ).result; if (paginationPage === null || paginationPage.length === 0) { // break infinity loop because we have reached end of pagination @@ -134,9 +155,11 @@ export class TemurinDistribution extends JavaBase { if (core.isDebug()) { core.startGroup('Print information about available versions'); - console.timeEnd('temurin-retrieve-available-versions'); - console.log(`Available versions: [${availableVersions.length}]`); - console.log(availableVersions.map(item => item.version_data.semver).join(', ')); + console.timeEnd('Retrieving available versions for Temurin took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug( + availableVersions.map(item => item.version_data.semver).join(', ') + ); core.endGroup(); } diff --git a/src/distributions/zulu/installer.ts b/src/distributions/zulu/installer.ts index 0ca6571a..dec9dbfe 100644 --- a/src/distributions/zulu/installer.ts +++ b/src/distributions/zulu/installer.ts @@ -5,17 +5,27 @@ import path from 'path'; import fs from 'fs'; import semver from 'semver'; -import { JavaBase } from '../base-installer'; -import { IZuluVersions } from './models'; -import { extractJdkFile, getDownloadArchiveExtension, isVersionSatisfies } from '../../util'; -import { JavaDownloadRelease, JavaInstallerOptions, JavaInstallerResults } from '../base-models'; +import {JavaBase} from '../base-installer'; +import {IZuluVersions} from './models'; +import { + extractJdkFile, + getDownloadArchiveExtension, + isVersionSatisfies +} from '../../util'; +import { + JavaDownloadRelease, + JavaInstallerOptions, + JavaInstallerResults +} from '../base-models'; export class ZuluDistribution extends JavaBase { constructor(installerOptions: JavaInstallerOptions) { super('Zulu', installerOptions); } - protected async findPackageForDownload(version: string): Promise { + protected async findPackageForDownload( + version: string + ): Promise { const availableVersionsRaw = await this.getAvailableVersions(); const availableVersions = availableVersionsRaw.map(item => { return { @@ -42,9 +52,12 @@ export class ZuluDistribution extends JavaBase { } as JavaDownloadRelease; }); - const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; + const resolvedFullVersion = + satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; if (!resolvedFullVersion) { - const availableOptions = availableVersions.map(item => item.version).join(', '); + const availableOptions = availableVersions + .map(item => item.version) + .join(', '); const availableOptionsMessage = availableOptions ? `\nAvailable versions: ${availableOptions}` : ''; @@ -56,18 +69,18 @@ export class ZuluDistribution extends JavaBase { return resolvedFullVersion; } - protected async downloadTool(javaRelease: JavaDownloadRelease): Promise { - let extractedJavaPath: string; - + protected async downloadTool( + javaRelease: JavaDownloadRelease + ): Promise { core.info( `Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...` ); const javaArchivePath = await tc.downloadTool(javaRelease.url); core.info(`Extracting Java archive...`); - let extension = getDownloadArchiveExtension(); + const extension = getDownloadArchiveExtension(); - extractedJavaPath = await extractJdkFile(javaArchivePath, extension); + const extractedJavaPath = await extractJdkFile(javaArchivePath, extension); const archiveName = fs.readdirSync(extractedJavaPath)[0]; const archivePath = path.join(extractedJavaPath, archiveName); @@ -79,11 +92,11 @@ export class ZuluDistribution extends JavaBase { this.architecture ); - return { version: javaRelease.version, path: javaPath }; + return {version: javaRelease.version, path: javaPath}; } private async getAvailableVersions(): Promise { - const { arch, hw_bitness, abi } = this.getArchitectureOptions(); + const {arch, hw_bitness, abi} = this.getArchitectureOptions(); const [bundleType, features] = this.packageType.split('+'); const platform = this.getPlatformOption(); const extension = getDownloadArchiveExtension(); @@ -91,8 +104,9 @@ export class ZuluDistribution extends JavaBase { const releaseStatus = this.stable ? 'ga' : 'ea'; if (core.isDebug()) { - console.time('azul-retrieve-available-versions'); + console.time('Retrieving available versions for Zulu took'); // eslint-disable-line no-console } + const requestArguments = [ `os=${platform}`, `ext=${extension}`, @@ -108,18 +122,20 @@ export class ZuluDistribution extends JavaBase { .join('&'); const availableVersionsUrl = `https://api.azul.com/zulu/download/community/v1.0/bundles/?${requestArguments}`; - if (core.isDebug()) { - core.debug(`Gathering available versions from '${availableVersionsUrl}'`); - } + + core.debug(`Gathering available versions from '${availableVersionsUrl}'`); const availableVersions = - (await this.http.getJson>(availableVersionsUrl)).result ?? []; + (await this.http.getJson>(availableVersionsUrl)) + .result ?? []; if (core.isDebug()) { core.startGroup('Print information about available versions'); - console.timeEnd('azul-retrieve-available-versions'); - console.log(`Available versions: [${availableVersions.length}]`); - console.log(availableVersions.map(item => item.jdk_version.join('.')).join(', ')); + console.timeEnd('Retrieving available versions for Zulu took'); // eslint-disable-line no-console + core.debug(`Available versions: [${availableVersions.length}]`); + core.debug( + availableVersions.map(item => item.jdk_version.join('.')).join(', ') + ); core.endGroup(); } @@ -134,14 +150,14 @@ export class ZuluDistribution extends JavaBase { const arch = this.distributionArchitecture(); switch (arch) { case 'x64': - return { arch: 'x86', hw_bitness: '64', abi: '' }; + return {arch: 'x86', hw_bitness: '64', abi: ''}; case 'x86': - return { arch: 'x86', hw_bitness: '32', abi: '' }; + return {arch: 'x86', hw_bitness: '32', abi: ''}; case 'aarch64': case 'arm64': - return { arch: 'arm', hw_bitness: '64', abi: '' }; + return {arch: 'arm', hw_bitness: '64', abi: ''}; default: - return { arch: arch, hw_bitness: '', abi: '' }; + return {arch: arch, hw_bitness: '', abi: ''}; } } diff --git a/src/gpg.ts b/src/gpg.ts index 82fd22ff..3b74c151 100644 --- a/src/gpg.ts +++ b/src/gpg.ts @@ -3,7 +3,7 @@ import * as path from 'path'; import * as io from '@actions/io'; import * as exec from '@actions/exec'; import * as util from './util'; -import { ExecOptions } from '@actions/exec/lib/interfaces'; +import {ExecOptions} from '@actions/exec/lib/interfaces'; export const PRIVATE_KEY_FILE = path.join(util.getTempDir(), 'private-key.asc'); @@ -28,7 +28,13 @@ export async function importKey(privateKey: string) { await exec.exec( 'gpg', - ['--batch', '--import-options', 'import-show', '--import', PRIVATE_KEY_FILE], + [ + '--batch', + '--import-options', + 'import-show', + '--import', + PRIVATE_KEY_FILE + ], options ); @@ -39,7 +45,11 @@ export async function importKey(privateKey: string) { } export async function deleteKey(keyFingerprint: string) { - await exec.exec('gpg', ['--batch', '--yes', '--delete-secret-and-public-key', keyFingerprint], { - silent: true - }); + await exec.exec( + 'gpg', + ['--batch', '--yes', '--delete-secret-and-public-key', keyFingerprint], + { + silent: true + } + ); } diff --git a/src/setup-java.ts b/src/setup-java.ts index 048c5dd6..4168d53d 100644 --- a/src/setup-java.ts +++ b/src/setup-java.ts @@ -1,17 +1,25 @@ +import fs from 'fs'; import * as core from '@actions/core'; import * as auth from './auth'; -import { getBooleanInput, isCacheFeatureAvailable } from './util'; +import { + getBooleanInput, + isCacheFeatureAvailable, + getVersionFromFileContent +} from './util'; import * as toolchains from './toolchains'; import * as constants from './constants'; -import { restore } from './cache'; +import {restore} from './cache'; import * as path from 'path'; -import { getJavaDistribution } from './distributions/distribution-factory'; -import { JavaInstallerOptions } from './distributions/base-models'; +import {getJavaDistribution} from './distributions/distribution-factory'; +import {JavaInstallerOptions} from './distributions/base-models'; async function run() { try { - const versions = core.getMultilineInput(constants.INPUT_JAVA_VERSION, { required: true }); - const distributionName = core.getInput(constants.INPUT_DISTRIBUTION, { required: true }); + const versions = core.getMultilineInput(constants.INPUT_JAVA_VERSION); + const distributionName = core.getInput(constants.INPUT_DISTRIBUTION, { + required: true + }); + const versionFile = core.getInput(constants.INPUT_JAVA_VERSION_FILE); const architecture = core.getInput(constants.INPUT_ARCHITECTURE); const packageType = core.getInput(constants.INPUT_JAVA_PACKAGE); const jdkFile = core.getInput(constants.INPUT_JDK_FILE); @@ -19,38 +27,45 @@ async function run() { const checkLatest = getBooleanInput(constants.INPUT_CHECK_LATEST, false); let toolchainIds = core.getMultilineInput(constants.INPUT_MVN_TOOLCHAIN_ID); + core.startGroup('Installed distributions'); + if (versions.length !== toolchainIds.length) { toolchainIds = []; } - core.startGroup('Installed distributions'); - for (const [index, version] of versions.entries()) { - const installerOptions: JavaInstallerOptions = { - architecture, - packageType, - version, - checkLatest - }; + if (!versions.length && !versionFile) { + throw new Error('java-version or java-version-file input expected'); + } - const distribution = getJavaDistribution(distributionName, installerOptions, jdkFile); - if (!distribution) { - throw new Error(`No supported distribution was found for input ${distributionName}`); + const installerInputsOptions: installerInputsOptions = { + architecture, + packageType, + checkLatest, + distributionName, + jdkFile, + toolchainIds + }; + + if (!versions.length) { + core.debug( + 'java-version input is empty, looking for java-version-file input' + ); + const content = fs.readFileSync(versionFile).toString().trim(); + + const version = getVersionFromFileContent(content, distributionName); + core.debug(`Parsed version from file '${version}'`); + + if (!version) { + throw new Error( + `No supported version was found in file ${versionFile}` + ); } - const result = await distribution.setupJava(); - await toolchains.configureToolchains( - version, - distributionName, - result.path, - toolchainIds[index] - ); + await installVersion(version, installerInputsOptions); + } - core.info(''); - core.info('Java configuration:'); - core.info(` Distribution: ${distributionName}`); - core.info(` Version: ${result.version}`); - core.info(` Path: ${result.path}`); - core.info(''); + for (const [index, version] of versions.entries()) { + await installVersion(version, installerInputsOptions, index); } core.endGroup(); const matchersPath = path.join(__dirname, '..', '..', '.github'); @@ -66,3 +81,60 @@ async function run() { } run(); + +async function installVersion( + version: string, + options: installerInputsOptions, + toolchainId = 0 +) { + const { + distributionName, + jdkFile, + architecture, + packageType, + checkLatest, + toolchainIds + } = options; + + const installerOptions: JavaInstallerOptions = { + architecture, + packageType, + checkLatest, + version + }; + + const distribution = getJavaDistribution( + distributionName, + installerOptions, + jdkFile + ); + if (!distribution) { + throw new Error( + `No supported distribution was found for input ${distributionName}` + ); + } + + const result = await distribution.setupJava(); + await toolchains.configureToolchains( + version, + distributionName, + result.path, + toolchainIds[toolchainId] + ); + + core.info(''); + core.info('Java configuration:'); + core.info(` Distribution: ${distributionName}`); + core.info(` Version: ${result.version}`); + core.info(` Path: ${result.path}`); + core.info(''); +} + +interface installerInputsOptions { + architecture: string; + packageType: string; + checkLatest: boolean; + distributionName: string; + jdkFile: string; + toolchainIds: Array; +} diff --git a/src/toolchains.ts b/src/toolchains.ts index 8c7d72c4..2ed70622 100644 --- a/src/toolchains.ts +++ b/src/toolchains.ts @@ -5,8 +5,8 @@ import * as core from '@actions/core'; import * as io from '@actions/io'; import * as constants from './constants'; -import { getBooleanInput } from './util'; -import { create as xmlCreate } from 'xmlbuilder2'; +import {getBooleanInput} from './util'; +import {create as xmlCreate} from 'xmlbuilder2'; interface JdkInfo { version: string; @@ -21,11 +21,16 @@ export async function configureToolchains( jdkHome: string, toolchainId?: string ) { - const vendor = core.getInput(constants.INPUT_MVN_TOOLCHAIN_VENDOR) || distributionName; + const vendor = + core.getInput(constants.INPUT_MVN_TOOLCHAIN_VENDOR) || distributionName; const id = toolchainId || `${vendor}_${version}`; const settingsDirectory = - core.getInput(constants.INPUT_SETTINGS_PATH) || path.join(os.homedir(), constants.M2_DIR); - const overwriteSettings = getBooleanInput(constants.INPUT_OVERWRITE_SETTINGS, true); + core.getInput(constants.INPUT_SETTINGS_PATH) || + path.join(os.homedir(), constants.M2_DIR); + const overwriteSettings = getBooleanInput( + constants.INPUT_OVERWRITE_SETTINGS, + true + ); await createToolchainsSettings({ jdkInfo: { @@ -54,7 +59,9 @@ export async function createToolchainsSettings({ // when an alternate m2 location is specified use only that location (no .m2 directory) // otherwise use the home/.m2/ path await io.mkdirP(settingsDirectory); - const originalToolchains = await readExistingToolchainsFile(settingsDirectory); + const originalToolchains = await readExistingToolchainsFile( + settingsDirectory + ); const updatedToolchains = generateToolchainDefinition( originalToolchains, jdkInfo.version, @@ -62,7 +69,11 @@ export async function createToolchainsSettings({ jdkInfo.id, jdkInfo.jdkHome ); - await writeToolchainsFileToDisk(settingsDirectory, updatedToolchains, overwriteSettings); + await writeToolchainsFileToDisk( + settingsDirectory, + updatedToolchains, + overwriteSettings + ); } // only exported for testing purposes diff --git a/src/util.ts b/src/util.ts index 10f18c5f..acd9e6ea 100644 --- a/src/util.ts +++ b/src/util.ts @@ -6,16 +6,18 @@ import * as cache from '@actions/cache'; import * as core from '@actions/core'; import * as tc from '@actions/tool-cache'; -import { INPUT_JOB_STATUS } from './constants'; +import {INPUT_JOB_STATUS, DISTRIBUTIONS_ONLY_MAJOR_VERSION} from './constants'; export function getTempDir() { - let tempDirectory = process.env['RUNNER_TEMP'] || os.tmpdir(); + const tempDirectory = process.env['RUNNER_TEMP'] || os.tmpdir(); return tempDirectory; } -export function getBooleanInput(inputName: string, defaultValue: boolean = false) { - return (core.getInput(inputName) || String(defaultValue)).toUpperCase() === 'TRUE'; +export function getBooleanInput(inputName: string, defaultValue = false) { + return ( + (core.getInput(inputName) || String(defaultValue)).toUpperCase() === 'TRUE' + ); } export function getVersionFromToolcachePath(toolPath: string) { @@ -28,7 +30,9 @@ export function getVersionFromToolcachePath(toolPath: string) { export async function extractJdkFile(toolPath: string, extension?: string) { if (!extension) { - extension = toolPath.endsWith('.tar.gz') ? 'tar.gz' : path.extname(toolPath); + extension = toolPath.endsWith('.tar.gz') + ? 'tar.gz' + : path.extname(toolPath); if (extension.startsWith('.')) { extension = extension.substring(1); } @@ -63,7 +67,11 @@ export function isVersionSatisfies(range: string, version: string): boolean { return semver.satisfies(version, range); } -export function getToolcachePath(toolName: string, version: string, architecture: string) { +export function getToolcachePath( + toolName: string, + version: string, + architecture: string +) { const toolcacheRoot = process.env['RUNNER_TOOL_CACHE'] ?? ''; const fullPath = path.join(toolcacheRoot, toolName, version, architecture); if (fs.existsSync(fullPath)) { @@ -80,22 +88,66 @@ export function isJobStatusSuccess() { } export function isGhes(): boolean { - const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); + const ghUrl = new URL( + process.env['GITHUB_SERVER_URL'] || 'https://github.com' + ); return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM'; } export function isCacheFeatureAvailable(): boolean { - if (!cache.isFeatureAvailable()) { - if (isGhes()) { - throw new Error( - 'Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.' - ); - } else { - core.warning('The runner was not able to contact the cache service. Caching will be skipped'); - } + if (cache.isFeatureAvailable()) { + return true; + } + if (isGhes()) { + core.warning( + 'Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.' + ); return false; } - return true; + core.warning( + 'The runner was not able to contact the cache service. Caching will be skipped' + ); + return false; +} + +export function getVersionFromFileContent( + content: string, + distributionName: string +): string | null { + const javaVersionRegExp = /(?(?<=(^|\s|-))(\d+\S*))(\s|$)/; + const fileContent = content.match(javaVersionRegExp)?.groups?.version + ? (content.match(javaVersionRegExp)?.groups?.version as string) + : ''; + if (!fileContent) { + return null; + } + + core.debug(`Version from file '${fileContent}'`); + + const tentativeVersion = avoidOldNotation(fileContent); + const rawVersion = tentativeVersion.split('-')[0]; + + let version = semver.validRange(rawVersion) + ? tentativeVersion + : semver.coerce(tentativeVersion); + + core.debug(`Range version from file is '${version}'`); + + if (!version) { + return null; + } + + if (DISTRIBUTIONS_ONLY_MAJOR_VERSION.includes(distributionName)) { + const coerceVersion = semver.coerce(version) ?? version; + version = semver.major(coerceVersion).toString(); + } + + return version.toString(); +} + +// By convention, action expects version 8 in the format `8.*` instead of `1.8` +function avoidOldNotation(content: string): string { + return content.startsWith('1.') ? content.substring(2) : content; } diff --git a/tsconfig.json b/tsconfig.json index 56211580..ef0f19bf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,6 +21,7 @@ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + "newLine": "lf", /* Specify the end of line sequence to be used when emitting files: ‘CRLF’ (dos) or ‘LF’ (unix). */ /* Strict Type-Checking Options */ "strict": true, /* Enable all strict type-checking options. */ diff --git a/yaml-lint-config.yml b/yaml-lint-config.yml deleted file mode 100644 index 21fad9c7..00000000 --- a/yaml-lint-config.yml +++ /dev/null @@ -1,7 +0,0 @@ -extends: default - -rules: - # 100 chars should be enough, but don't fail if a line is longer - line-length: - max: 100 - level: warning