mirror of
				https://github.com/actions/setup-java.git
				synced 2025-10-31 14:05:31 +00:00 
			
		
		
		
	Merge branch 'main' into dragonwell
This commit is contained in:
		
						commit
						446ddaedf9
					
				| @ -7,7 +7,7 @@ module.exports = { | |||||||
|     'eslint-config-prettier' |     'eslint-config-prettier' | ||||||
|   ], |   ], | ||||||
|   parser: '@typescript-eslint/parser', |   parser: '@typescript-eslint/parser', | ||||||
|   plugins: ['@typescript-eslint', 'eslint-plugin-jest'], |   plugins: ['@typescript-eslint', 'eslint-plugin-node', 'eslint-plugin-jest'], | ||||||
|   rules: { |   rules: { | ||||||
|     '@typescript-eslint/no-require-imports': 'error', |     '@typescript-eslint/no-require-imports': 'error', | ||||||
|     '@typescript-eslint/no-non-null-assertion': 'off', |     '@typescript-eslint/no-non-null-assertion': 'off', | ||||||
| @ -28,7 +28,8 @@ module.exports = { | |||||||
|       } |       } | ||||||
|     ], |     ], | ||||||
|     'no-control-regex': 'off', |     'no-control-regex': 'off', | ||||||
|     'no-constant-condition': ['error', {checkLoops: false}] |     'no-constant-condition': ['error', {checkLoops: false}], | ||||||
|  |     'node/no-extraneous-import': 'error' | ||||||
|   }, |   }, | ||||||
|   overrides: [ |   overrides: [ | ||||||
|     { |     { | ||||||
|  | |||||||
							
								
								
									
										11
									
								
								.github/workflows/e2e-versions.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/e2e-versions.yml
									
									
									
									
										vendored
									
									
								
							| @ -32,7 +32,7 @@ jobs: | |||||||
|             'corretto', |             'corretto', | ||||||
|             'dragonwell' |             'dragonwell' | ||||||
|           ] # internally 'adopt-hotspot' is the same as 'adopt' |           ] # internally 'adopt-hotspot' is the same as 'adopt' | ||||||
|         version: ['8', '11', '16'] |         version: ['8', '11', '17'] | ||||||
|         exclude: |         exclude: | ||||||
|           - distribution: microsoft |           - distribution: microsoft | ||||||
|             version: 8 |             version: 8 | ||||||
| @ -46,16 +46,17 @@ jobs: | |||||||
|             version: 17 |             version: 17 | ||||||
|           - distribution: oracle |           - distribution: oracle | ||||||
|             os: windows-latest |             os: windows-latest | ||||||
|             version: 19 |             version: 20 | ||||||
|           - distribution: oracle |           - distribution: oracle | ||||||
|             os: ubuntu-latest |             os: ubuntu-latest | ||||||
|             version: 19 |             version: 20 | ||||||
|           - distribution: dragonwell |           - distribution: dragonwell | ||||||
|             os: windows-latest |             os: windows-latest | ||||||
|             version: 17 |             version: 17 | ||||||
|           - distribution: dragonwell |           - distribution: dragonwell | ||||||
|             os: ubuntu-latest |             os: ubuntu-latest | ||||||
|             version: 17 |             version: 17 | ||||||
|  | 
 | ||||||
|     steps: |     steps: | ||||||
|       - name: Checkout |       - name: Checkout | ||||||
|         uses: actions/checkout@v3 |         uses: actions/checkout@v3 | ||||||
| @ -81,11 +82,11 @@ jobs: | |||||||
|         version: |         version: | ||||||
|           - '11.0' |           - '11.0' | ||||||
|           - '8.0.302' |           - '8.0.302' | ||||||
|           - '16.0.2+7' |           - '17.0.7+7' | ||||||
|         include: |         include: | ||||||
|           - distribution: oracle |           - distribution: oracle | ||||||
|             os: ubuntu-latest |             os: ubuntu-latest | ||||||
|             version: '19.0.1' |             version: '20.0.1' | ||||||
|           - distribution: dragonwell |           - distribution: dragonwell | ||||||
|             os: ubuntu-latest |             os: ubuntu-latest | ||||||
|             version: '11.0' |             version: '11.0' | ||||||
|  | |||||||
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-http.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-http.dep.yml
									
									
									
										generated
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-util.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-util.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/ms-rest-js.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/ms-rest-js.dep.yml
									
									
									
										generated
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/storage-blob.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/storage-blob.dep.yml
									
									
									
										generated
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@types/node-fetch.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@types/node-fetch.dep.yml
									
									
									
										generated
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/tough-cookie-4.0.0.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/tough-cookie-4.0.0.dep.yml
									
									
									
										generated
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/tslib-2.5.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/tslib-2.5.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/universalify.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/universalify.dep.yml
									
									
									
										generated
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/xml2js.dep.yml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/xml2js.dep.yml
									
									
									
										generated
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										16
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								README.md
									
									
									
									
									
								
							| @ -5,7 +5,7 @@ | |||||||
| [](https://github.com/actions/setup-java/actions/workflows/e2e-cache.yml) | [](https://github.com/actions/setup-java/actions/workflows/e2e-cache.yml) | ||||||
| 
 | 
 | ||||||
| The `setup-java` action provides the following functionality for GitHub Actions runners: | 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. | - 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. | - Extracting and caching custom version of Java from a local file. | ||||||
| - Configuring runner for publishing using Apache Maven. | - Configuring runner for publishing using Apache Maven. | ||||||
| - Configuring runner for publishing using Gradle. | - Configuring runner for publishing using Gradle. | ||||||
| @ -31,7 +31,7 @@ This action allows you to work with Java and Scala projects. | |||||||
|     |     | ||||||
|   - `distribution`: _(required)_ Java [distribution](#supported-distributions). |   - `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`. |   - `java-package`: The packaging variant of the chosen 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: Derived from the runner machine. |   - `architecture`: The target architecture of the package. Possible values: `x86`, `x64`, `armv7`, `aarch64`, `ppc64le`. Default value: Derived from the runner machine. | ||||||
| 
 | 
 | ||||||
| @ -39,12 +39,12 @@ This action allows you to work with Java and Scala projects. | |||||||
| 
 | 
 | ||||||
|   - `check-latest`: Setting this option makes the action to check for the latest available version for the version spec. |   - `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 predefined package managers. It can be one of "maven", "gradle" or "sbt". | ||||||
| 
 | 
 | ||||||
|   #### Maven options |   #### 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. |   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. | ||||||
| 
 | 
 | ||||||
|   - `overwrite-settings`: By default action overwrites the settings.xml. In order to skip generation of file if it exists set this to `false`. |   - `overwrite-settings`: By default action overwrites the settings.xml. In order to skip generation of file if it exists, set this to `false`. | ||||||
| 
 | 
 | ||||||
|   - `server-id`: ID of the distributionManagement repository in the pom.xml file. Default is `github`. |   - `server-id`: ID of the distributionManagement repository in the pom.xml file. Default is `github`. | ||||||
| 
 | 
 | ||||||
| @ -56,7 +56,7 @@ This action allows you to work with Java and Scala projects. | |||||||
| 
 | 
 | ||||||
|   - `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`: 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. |   - `mvn-toolchain-id`: Name of Maven Toolchain ID if the default name of `${distribution}_${java-version}` is not wanted. | ||||||
| 
 | 
 | ||||||
| @ -114,10 +114,10 @@ Currently, the following distributions are supported: | |||||||
| **NOTE:** For Azul Zulu OpenJDK architectures x64 and arm64 are mapped to x86 / arm with proper hw_bitness. | **NOTE:** For Azul Zulu OpenJDK architectures x64 and arm64 are mapped to x86 / arm with proper hw_bitness. | ||||||
| 
 | 
 | ||||||
| ### Caching packages dependencies | ### Caching packages dependencies | ||||||
| The action has a built-in functionality for caching and restoring dependencies. It uses [actions/cache](https://github.com/actions/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files: | The action has a built-in functionality for caching and restoring dependencies. It uses [toolkit/cache](https://github.com/actions/toolkit/tree/main/packages/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files: | ||||||
| - gradle: `**/*.gradle*`, `**/gradle-wrapper.properties`, `buildSrc/**/Versions.kt`, `buildSrc/**/Dependencies.kt`, and `gradle/*.versions.toml` | - gradle: `**/*.gradle*`, `**/gradle-wrapper.properties`, `buildSrc/**/Versions.kt`, `buildSrc/**/Dependencies.kt`, `gradle/*.versions.toml`, and `**/versions.properties` | ||||||
| - maven: `**/pom.xml` | - maven: `**/pom.xml` | ||||||
| - sbt: all sbt build definition files `**/*.sbt`, `**/project/build.properties`, `**/project/**.{scala,sbt}` | - sbt: all sbt build definition files `**/*.sbt`, `**/project/build.properties`, `**/project/**.scala`, `**/project/**.sbt` | ||||||
| 
 | 
 | ||||||
| The workflow output `cache-hit` is set to indicate if an exact match was found for the key [as actions/cache does](https://github.com/actions/cache/tree/main#outputs). | The workflow output `cache-hit` is set to indicate if an exact match was found for the key [as actions/cache does](https://github.com/actions/cache/tree/main#outputs). | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -102,7 +102,7 @@ describe('dependency cache', () => { | |||||||
|         await expect(restore('gradle')).rejects.toThrow( |         await expect(restore('gradle')).rejects.toThrow( | ||||||
|           `No file in ${projectRoot( |           `No file in ${projectRoot( | ||||||
|             workspace |             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` |           )} matched to [**/*.gradle*,**/gradle-wrapper.properties,buildSrc/**/Versions.kt,buildSrc/**/Dependencies.kt,gradle/*.versions.toml,**/versions.properties], make sure you have checked out the target repository` | ||||||
|         ); |         ); | ||||||
|       }); |       }); | ||||||
|       it('downloads cache based on build.gradle', async () => { |       it('downloads cache based on build.gradle', async () => { | ||||||
| @ -145,7 +145,7 @@ describe('dependency cache', () => { | |||||||
|         await expect(restore('sbt')).rejects.toThrow( |         await expect(restore('sbt')).rejects.toThrow( | ||||||
|           `No file in ${projectRoot( |           `No file in ${projectRoot( | ||||||
|             workspace |             workspace | ||||||
|           )} matched to [**/*.sbt,**/project/build.properties,**/project/**.{scala,sbt}], make sure you have checked out the target repository` |           )} matched to [**/*.sbt,**/project/build.properties,**/project/**.scala,**/project/**.sbt], make sure you have checked out the target repository` | ||||||
|         ); |         ); | ||||||
|       }); |       }); | ||||||
|       it('downloads cache', async () => { |       it('downloads cache', async () => { | ||||||
| @ -156,6 +156,36 @@ describe('dependency cache', () => { | |||||||
|         expect(spyWarning).not.toHaveBeenCalled(); |         expect(spyWarning).not.toHaveBeenCalled(); | ||||||
|         expect(spyInfo).toHaveBeenCalledWith('sbt cache is not found'); |         expect(spyInfo).toHaveBeenCalledWith('sbt cache is not found'); | ||||||
|       }); |       }); | ||||||
|  |       it('detects scala and sbt changes under **/project/ folder', async () => { | ||||||
|  |         createFile(join(workspace, 'build.sbt')); | ||||||
|  |         createDirectory(join(workspace, 'project')); | ||||||
|  |         createFile(join(workspace, 'project/DependenciesV1.scala')); | ||||||
|  | 
 | ||||||
|  |         await restore('sbt'); | ||||||
|  |         const firstCall = spySaveState.mock.calls.toString(); | ||||||
|  | 
 | ||||||
|  |         spySaveState.mockClear(); | ||||||
|  |         await restore('sbt'); | ||||||
|  |         const secondCall = spySaveState.mock.calls.toString(); | ||||||
|  | 
 | ||||||
|  |         // Make sure multiple restores produce the same cache
 | ||||||
|  |         expect(firstCall).toBe(secondCall); | ||||||
|  | 
 | ||||||
|  |         spySaveState.mockClear(); | ||||||
|  |         createFile(join(workspace, 'project/DependenciesV2.scala')); | ||||||
|  |         await restore('sbt'); | ||||||
|  |         const thirdCall = spySaveState.mock.calls.toString(); | ||||||
|  | 
 | ||||||
|  |         expect(firstCall).not.toBe(thirdCall); | ||||||
|  |       }); | ||||||
|  |     }); | ||||||
|  |     it('downloads cache based on versions.properties', async () => { | ||||||
|  |       createFile(join(workspace, 'versions.properties')); | ||||||
|  | 
 | ||||||
|  |       await restore('gradle'); | ||||||
|  |       expect(spyCacheRestore).toHaveBeenCalled(); | ||||||
|  |       expect(spyWarning).not.toHaveBeenCalled(); | ||||||
|  |       expect(spyInfo).toHaveBeenCalledWith('gradle cache is not found'); | ||||||
|     }); |     }); | ||||||
|   }); |   }); | ||||||
|   describe('save', () => { |   describe('save', () => { | ||||||
| @ -311,6 +341,17 @@ describe('dependency cache', () => { | |||||||
|           expect.stringMatching(/^Cache saved with the key:.*/) |           expect.stringMatching(/^Cache saved with the key:.*/) | ||||||
|         ); |         ); | ||||||
|       }); |       }); | ||||||
|  |       it('uploads cache based on versions.properties', async () => { | ||||||
|  |         createFile(join(workspace, 'versions.properties')); | ||||||
|  |         createStateForSuccessfulRestore(); | ||||||
|  | 
 | ||||||
|  |         await save('gradle'); | ||||||
|  |         expect(spyCacheSave).toHaveBeenCalled(); | ||||||
|  |         expect(spyWarning).not.toHaveBeenCalled(); | ||||||
|  |         expect(spyInfo).toHaveBeenCalledWith( | ||||||
|  |           expect.stringMatching(/^Cache saved with the key:.*/) | ||||||
|  |         ); | ||||||
|  |       }); | ||||||
|     }); |     }); | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
|  | |||||||
							
								
								
									
										218
									
								
								__tests__/data/microsoft.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										218
									
								
								__tests__/data/microsoft.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,218 @@ | |||||||
|  | [ | ||||||
|  |     { | ||||||
|  |         "version": "17.0.7", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.7-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.7-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.7-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.7-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.7-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         "version": "17.0.1+12.1", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.1.12.1-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.1.12.1-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.1.12.1-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.1.12.1-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.1.12.1-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         "version": "16.0.2+7.1", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-16.0.2.7.1-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-16.0.2.7.1-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-16.0.2.7.1-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-16.0.2.7.1-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-16.0.2.7.1-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-16.0.2.7.1-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         "version": "11.0.19", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.19-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.19-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.19-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.19-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.19-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         "version": "11.0.15", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.15-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.15-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.15-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.15-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.15-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.15-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.15-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.15-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.15-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.15-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         "version": "11.0.13+8.1", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.13.8.1-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.13.8.1-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.13.8.1-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.13.8.1-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     } | ||||||
|  | ] | ||||||
| @ -214,6 +214,93 @@ describe('setupJava', () => { | |||||||
|     ); |     ); | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|  |   it('java is resolved from toolcache including Contents/Home on MacOS', async () => { | ||||||
|  |     const inputs = { | ||||||
|  |       version: actualJavaVersion, | ||||||
|  |       architecture: 'x86', | ||||||
|  |       packageType: 'jdk', | ||||||
|  |       checkLatest: false | ||||||
|  |     }; | ||||||
|  |     const jdkFile = 'not_existing_one'; | ||||||
|  |     const expected = { | ||||||
|  |       version: actualJavaVersion, | ||||||
|  |       path: path.join( | ||||||
|  |         'Java_jdkfile_jdk', | ||||||
|  |         inputs.version, | ||||||
|  |         inputs.architecture, | ||||||
|  |         'Contents', | ||||||
|  |         'Home' | ||||||
|  |       ) | ||||||
|  |     }; | ||||||
|  |     const originalPlatform = process.platform; | ||||||
|  |     Object.defineProperty(process, 'platform', { | ||||||
|  |       value: 'darwin' | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     spyFsStat = jest.spyOn(fs, 'existsSync'); | ||||||
|  |     spyFsStat.mockImplementation((file: string) => { | ||||||
|  |       return file.endsWith('Home'); | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     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).not.toHaveBeenCalledWith( | ||||||
|  |       `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` | ||||||
|  |     ); | ||||||
|  | 
 | ||||||
|  |     Object.defineProperty(process, 'platform', { | ||||||
|  |       value: originalPlatform | ||||||
|  |     }); | ||||||
|  |   }); | ||||||
|  | 
 | ||||||
|  |   it('java is unpacked from jdkfile including Contents/Home on MacOS', async () => { | ||||||
|  |     const inputs = { | ||||||
|  |       version: '11.0.289', | ||||||
|  |       architecture: 'x86', | ||||||
|  |       packageType: 'jdk', | ||||||
|  |       checkLatest: false | ||||||
|  |     }; | ||||||
|  |     const jdkFile = expectedJdkFile; | ||||||
|  |     const expected = { | ||||||
|  |       version: '11.0.289', | ||||||
|  |       path: path.join( | ||||||
|  |         'Java_jdkfile_jdk', | ||||||
|  |         inputs.version, | ||||||
|  |         inputs.architecture, | ||||||
|  |         'Contents', | ||||||
|  |         'Home' | ||||||
|  |       ) | ||||||
|  |     }; | ||||||
|  |     const originalPlatform = process.platform; | ||||||
|  |     Object.defineProperty(process, 'platform', { | ||||||
|  |       value: 'darwin' | ||||||
|  |     }); | ||||||
|  |     spyFsStat = jest.spyOn(fs, 'existsSync'); | ||||||
|  |     spyFsStat.mockImplementation((file: string) => { | ||||||
|  |       return file.endsWith('Home'); | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     mockJavaBase = new LocalDistribution(inputs, jdkFile); | ||||||
|  |     await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); | ||||||
|  |     expect(spyTcFindAllVersions).toHaveBeenCalled(); | ||||||
|  |     expect(spyCoreInfo).not.toHaveBeenCalledWith( | ||||||
|  |       `Resolved Java ${actualJavaVersion} from tool-cache` | ||||||
|  |     ); | ||||||
|  |     expect(spyCoreInfo).toHaveBeenCalledWith( | ||||||
|  |       `Extracting Java from '${jdkFile}'` | ||||||
|  |     ); | ||||||
|  |     expect(spyCoreInfo).toHaveBeenCalledWith( | ||||||
|  |       `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` | ||||||
|  |     ); | ||||||
|  |     Object.defineProperty(process, 'platform', { | ||||||
|  |       value: originalPlatform | ||||||
|  |     }); | ||||||
|  |   }); | ||||||
|  | 
 | ||||||
|   it.each([ |   it.each([ | ||||||
|     [ |     [ | ||||||
|       { |       { | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| import {MicrosoftDistributions} from '../../src/distributions/microsoft/installer'; | import {MicrosoftDistributions} from '../../src/distributions/microsoft/installer'; | ||||||
| import os from 'os'; | import os from 'os'; | ||||||
| import data from '../../src/distributions/microsoft/microsoft-openjdk-versions.json'; | import data from '../data/microsoft.json'; | ||||||
| import * as httpm from '@actions/http-client'; | import * as httpm from '@actions/http-client'; | ||||||
| import * as core from '@actions/core'; | import * as core from '@actions/core'; | ||||||
| 
 | 
 | ||||||
| @ -36,8 +36,8 @@ describe('findPackageForDownload', () => { | |||||||
|     ], |     ], | ||||||
|     [ |     [ | ||||||
|       '17.x', |       '17.x', | ||||||
|       '17.0.3', |       '17.0.7', | ||||||
|       'https://aka.ms/download-jdk/microsoft-jdk-17.0.3-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}' |       'https://aka.ms/download-jdk/microsoft-jdk-17.0.7-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}' | ||||||
|     ], |     ], | ||||||
|     [ |     [ | ||||||
|       '16.0.x', |       '16.0.x', | ||||||
| @ -53,6 +53,11 @@ describe('findPackageForDownload', () => { | |||||||
|       '11.0.15', |       '11.0.15', | ||||||
|       '11.0.15', |       '11.0.15', | ||||||
|       'https://aka.ms/download-jdk/microsoft-jdk-11.0.15-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}' |       'https://aka.ms/download-jdk/microsoft-jdk-11.0.15-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}' | ||||||
|  |     ], | ||||||
|  |     [ | ||||||
|  |       '11.x', | ||||||
|  |       '11.0.19', | ||||||
|  |       'https://aka.ms/download-jdk/microsoft-jdk-11.0.19-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}' | ||||||
|     ] |     ] | ||||||
|   ])('version is %s -> %s', async (input, expectedVersion, expectedUrl) => { |   ])('version is %s -> %s', async (input, expectedVersion, expectedUrl) => { | ||||||
|     const result = await distribution['findPackageForDownload'](input); |     const result = await distribution['findPackageForDownload'](input); | ||||||
| @ -97,7 +102,7 @@ describe('findPackageForDownload', () => { | |||||||
|       }); |       }); | ||||||
| 
 | 
 | ||||||
|       const result = await distro['findPackageForDownload'](version); |       const result = await distro['findPackageForDownload'](version); | ||||||
|       const expectedUrl = `https://aka.ms/download-jdk/microsoft-jdk-17.0.3-linux-${distroArch}.tar.gz`; |       const expectedUrl = `https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-${distroArch}.tar.gz`; | ||||||
| 
 | 
 | ||||||
|       expect(result.url).toBe(expectedUrl); |       expect(result.url).toBe(expectedUrl); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -2,10 +2,12 @@ import {OracleDistribution} from '../../src/distributions/oracle/installer'; | |||||||
| import os from 'os'; | import os from 'os'; | ||||||
| import * as core from '@actions/core'; | import * as core from '@actions/core'; | ||||||
| import {getDownloadArchiveExtension} from '../../src/util'; | import {getDownloadArchiveExtension} from '../../src/util'; | ||||||
|  | import {HttpClient} from '@actions/http-client'; | ||||||
| 
 | 
 | ||||||
| describe('findPackageForDownload', () => { | describe('findPackageForDownload', () => { | ||||||
|   let distribution: OracleDistribution; |   let distribution: OracleDistribution; | ||||||
|   let spyDebug: jest.SpyInstance; |   let spyDebug: jest.SpyInstance; | ||||||
|  |   let spyHttpClient: jest.SpyInstance; | ||||||
| 
 | 
 | ||||||
|   beforeEach(() => { |   beforeEach(() => { | ||||||
|     distribution = new OracleDistribution({ |     distribution = new OracleDistribution({ | ||||||
| @ -21,19 +23,19 @@ describe('findPackageForDownload', () => { | |||||||
| 
 | 
 | ||||||
|   it.each([ |   it.each([ | ||||||
|     [ |     [ | ||||||
|       '19', |       '20', | ||||||
|       '19', |       '20', | ||||||
|       'https://download.oracle.com/java/19/latest/jdk-19_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' |       'https://download.oracle.com/java/20/latest/jdk-20_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' | ||||||
|     ], |     ], | ||||||
|     [ |     [ | ||||||
|       '19.0.1', |       '18', | ||||||
|       '19.0.1', |       '18', | ||||||
|       'https://download.oracle.com/java/19/archive/jdk-19.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' |       'https://download.oracle.com/java/18/archive/jdk-18_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' | ||||||
|     ], |     ], | ||||||
|     [ |     [ | ||||||
|       '18.0.2.1', |       '20.0.1', | ||||||
|       '18.0.2.1', |       '20.0.1', | ||||||
|       'https://download.oracle.com/java/18/archive/jdk-18.0.2.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' |       'https://download.oracle.com/java/20/archive/jdk-20.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' | ||||||
|     ], |     ], | ||||||
|     [ |     [ | ||||||
|       '17', |       '17', | ||||||
| @ -46,7 +48,33 @@ describe('findPackageForDownload', () => { | |||||||
|       'https://download.oracle.com/java/17/archive/jdk-17.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}' |       '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) => { |   ])('version is %s -> %s', async (input, expectedVersion, expectedUrl) => { | ||||||
|  |     /* Needed only for this particular test because some urls might change */ | ||||||
|  |     spyHttpClient = jest.spyOn(HttpClient.prototype, 'head'); | ||||||
|  |     spyHttpClient.mockReturnValue( | ||||||
|  |       Promise.resolve({ | ||||||
|  |         message: { | ||||||
|  |           statusCode: 200 | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     ); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * NOTE - Should fail to retrieve 18 from latest and check archive instead | ||||||
|  |      */ | ||||||
|  |     if (input === '18') { | ||||||
|  |       spyHttpClient.mockReturnValueOnce( | ||||||
|  |         Promise.resolve({ | ||||||
|  |           message: { | ||||||
|  |             statusCode: 404 | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |       ); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     const result = await distribution['findPackageForDownload'](input); |     const result = await distribution['findPackageForDownload'](input); | ||||||
|  | 
 | ||||||
|  |     jest.restoreAllMocks(); | ||||||
|  | 
 | ||||||
|     expect(result.version).toBe(expectedVersion); |     expect(result.version).toBe(expectedVersion); | ||||||
|     const osType = distribution.getPlatform(); |     const osType = distribution.getPlatform(); | ||||||
|     const archiveType = getDownloadArchiveExtension(); |     const archiveType = getDownloadArchiveExtension(); | ||||||
| @ -65,7 +93,7 @@ describe('findPackageForDownload', () => { | |||||||
|       jest.spyOn(os, 'arch').mockReturnValue(osArch); |       jest.spyOn(os, 'arch').mockReturnValue(osArch); | ||||||
|       jest.spyOn(os, 'platform').mockReturnValue('linux'); |       jest.spyOn(os, 'platform').mockReturnValue('linux'); | ||||||
| 
 | 
 | ||||||
|       const version = '17'; |       const version = '18'; | ||||||
|       const distro = new OracleDistribution({ |       const distro = new OracleDistribution({ | ||||||
|         version, |         version, | ||||||
|         architecture: '', // to get default value
 |         architecture: '', // to get default value
 | ||||||
| @ -79,7 +107,7 @@ describe('findPackageForDownload', () => { | |||||||
|       } |       } | ||||||
|       const archiveType = getDownloadArchiveExtension(); |       const archiveType = getDownloadArchiveExtension(); | ||||||
|       const result = await distro['findPackageForDownload'](version); |       const result = await distro['findPackageForDownload'](version); | ||||||
|       const expectedUrl = `https://download.oracle.com/java/17/latest/jdk-17_${osType}-${distroArch}_bin.${archiveType}`; |       const expectedUrl = `https://download.oracle.com/java/18/archive/jdk-18_${osType}-${distroArch}_bin.${archiveType}`; | ||||||
| 
 | 
 | ||||||
|       expect(result.url).toBe(expectedUrl); |       expect(result.url).toBe(expectedUrl); | ||||||
|     } |     } | ||||||
| @ -92,8 +120,5 @@ describe('findPackageForDownload', () => { | |||||||
|     await expect(distribution['findPackageForDownload']('11')).rejects.toThrow( |     await expect(distribution['findPackageForDownload']('11')).rejects.toThrow( | ||||||
|       /Oracle JDK is only supported for JDK 17 and later/ |       /Oracle JDK is only supported for JDK 17 and later/ | ||||||
|     ); |     ); | ||||||
|     await expect(distribution['findPackageForDownload']('18')).rejects.toThrow( |  | ||||||
|       /Could not find Oracle JDK for SemVer */ |  | ||||||
|     ); |  | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
|  | |||||||
| @ -227,22 +227,3 @@ describe('findPackageForDownload', () => { | |||||||
|     ).rejects.toThrow(/Could not find satisfied version for semver */); |     ).rejects.toThrow(/Could not find satisfied version for semver */); | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
| 
 |  | ||||||
| describe('convertVersionToSemver', () => { |  | ||||||
|   it.each([ |  | ||||||
|     [[12], '12'], |  | ||||||
|     [[12, 0], '12.0'], |  | ||||||
|     [[12, 0, 2], '12.0.2'], |  | ||||||
|     [[12, 0, 2, 1], '12.0.2+1'], |  | ||||||
|     [[12, 0, 2, 1, 3], '12.0.2+1'] |  | ||||||
|   ])('%s -> %s', (input: number[], expected: string) => { |  | ||||||
|     const distribution = new ZuluDistribution({ |  | ||||||
|       version: '18', |  | ||||||
|       architecture: 'x86', |  | ||||||
|       packageType: 'jdk', |  | ||||||
|       checkLatest: false |  | ||||||
|     }); |  | ||||||
|     const actual = distribution['convertVersionToSemver'](input); |  | ||||||
|     expect(actual).toBe(expected); |  | ||||||
|   }); |  | ||||||
| }); |  | ||||||
|  | |||||||
| @ -77,9 +77,9 @@ describe('toolchains tests', () => { | |||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     const result = `<?xml version="1.0"?>
 |     const result = `<?xml version="1.0"?>
 | ||||||
| <toolchains xmlns="https://maven.apache.org/TOOLCHAINS/1.1.0" | <toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" | ||||||
|   xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" |   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||||||
|   xsi:schemaLocation="https://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd"> |   xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd"> | ||||||
|   <toolchain> |   <toolchain> | ||||||
|     <type>jdk</type> |     <type>jdk</type> | ||||||
|     <provides> |     <provides> | ||||||
| @ -248,9 +248,9 @@ describe('toolchains tests', () => { | |||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     const expectedToolchains = `<?xml version="1.0"?>
 |     const expectedToolchains = `<?xml version="1.0"?>
 | ||||||
| <toolchains xmlns="https://maven.apache.org/TOOLCHAINS/1.1.0" | <toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" | ||||||
|   xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" |   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||||||
|   xsi:schemaLocation="https://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd"> |   xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd"> | ||||||
|   <toolchain> |   <toolchain> | ||||||
|     <type>jdk</type> |     <type>jdk</type> | ||||||
|     <provides> |     <provides> | ||||||
|  | |||||||
| @ -1,6 +1,10 @@ | |||||||
| import * as cache from '@actions/cache'; | import * as cache from '@actions/cache'; | ||||||
| import * as core from '@actions/core'; | import * as core from '@actions/core'; | ||||||
| import {isVersionSatisfies, isCacheFeatureAvailable} from '../src/util'; | import { | ||||||
|  |   convertVersionToSemver, | ||||||
|  |   isVersionSatisfies, | ||||||
|  |   isCacheFeatureAvailable | ||||||
|  | } from '../src/util'; | ||||||
| 
 | 
 | ||||||
| jest.mock('@actions/cache'); | jest.mock('@actions/cache'); | ||||||
| jest.mock('@actions/core'); | jest.mock('@actions/core'); | ||||||
| @ -63,3 +67,16 @@ describe('isCacheFeatureAvailable', () => { | |||||||
|     expect(isCacheFeatureAvailable()).toBe(true); |     expect(isCacheFeatureAvailable()).toBe(true); | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
|  | 
 | ||||||
|  | describe('convertVersionToSemver', () => { | ||||||
|  |   it.each([ | ||||||
|  |     ['12', '12'], | ||||||
|  |     ['12.0', '12.0'], | ||||||
|  |     ['12.0.2', '12.0.2'], | ||||||
|  |     ['12.0.2.1', '12.0.2+1'], | ||||||
|  |     ['12.0.2.1.0', '12.0.2+1.0'] | ||||||
|  |   ])('%s -> %s', (input: string, expected: string) => { | ||||||
|  |     const actual = convertVersionToSemver(input); | ||||||
|  |     expect(actual).toBe(expected); | ||||||
|  |   }); | ||||||
|  | }); | ||||||
|  | |||||||
							
								
								
									
										4213
									
								
								dist/cleanup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4213
									
								
								dist/cleanup/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										4280
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4280
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -181,6 +181,31 @@ steps: | |||||||
| - run: java -cp java HelloWorldApp | - run: java -cp java HelloWorldApp | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | If your use-case requires a custom distribution (in the example, alpine-linux is used) or a version that is not provided by setup-java and you want to always install the latest version during runtime, then you can use the following code to auto-download the latest JDK, determine the semver needed for setup-java, and setup-java will take care of the installation and caching on the VM: | ||||||
|  | 
 | ||||||
|  | ```yaml | ||||||
|  |    steps: | ||||||
|  |       - name: fetch latest temurin JDK | ||||||
|  |         id: fetch_latest_jdk | ||||||
|  |         run: | | ||||||
|  |           major_version={{ env.JAVA_VERSION }} # Example 8 or 11 or 17 | ||||||
|  |           cd $RUNNER_TEMP | ||||||
|  |           response=$(curl -s "https://api.github.com/repos/adoptium/temurin${major_version}-binaries/releases") | ||||||
|  |           latest_jdk_download_url=$(echo "$response" | jq -r '.[0].assets[] | select(.name | contains("jdk_x64_alpine-linux") and endswith(".tar.gz")) | .browser_download_url') | ||||||
|  |           curl -Ls "$latest_jdk_download_url" -o java_package.tar.gz | ||||||
|  |           latest_jdk_json_url=$(jdk_download_url "$response" | jq -r '.[0].assets[] | select(.name | contains("jdk_x64_alpine-linux") and endswith(".tar.gz.json")) | .browser_download_url') | ||||||
|  |           latest_semver_version=$(curl -sL $latest_jdk_json_url | jq -r 'version.semver') | ||||||
|  |           echo "java_version=$latest_semver_version" >> "$GITHUB_OUTPUT" | ||||||
|  | 
 | ||||||
|  |       - uses: actions/setup-java@v3 | ||||||
|  |         with: | ||||||
|  |           distribution: 'jdkfile' | ||||||
|  |           jdkFile: ${{ runner.temp }}/java_package.tar.gz | ||||||
|  |           java-version: {{ steps.fetch_latest_jdk.outputs.java_version }} | ||||||
|  |           architecture: x64 | ||||||
|  |        - run: java -cp java HelloWorldApp | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
| ## Testing against different Java distributions | ## Testing against different Java distributions | ||||||
| **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:** 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. | ||||||
| ```yaml | ```yaml | ||||||
|  | |||||||
							
								
								
									
										463
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										463
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -29,6 +29,7 @@ | |||||||
|         "eslint": "^8.35.0", |         "eslint": "^8.35.0", | ||||||
|         "eslint-config-prettier": "^8.6.0", |         "eslint-config-prettier": "^8.6.0", | ||||||
|         "eslint-plugin-jest": "^27.2.1", |         "eslint-plugin-jest": "^27.2.1", | ||||||
|  |         "eslint-plugin-node": "^11.1.0", | ||||||
|         "jest": "^27.2.5", |         "jest": "^27.2.5", | ||||||
|         "jest-circus": "^27.2.5", |         "jest-circus": "^27.2.5", | ||||||
|         "prettier": "^2.8.4", |         "prettier": "^2.8.4", | ||||||
| @ -195,28 +196,27 @@ | |||||||
|       "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" |       "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" | ||||||
|     }, |     }, | ||||||
|     "node_modules/@azure/core-http": { |     "node_modules/@azure/core-http": { | ||||||
|       "version": "2.2.4", |       "version": "3.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.4.tgz", |       "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.1.tgz", | ||||||
|       "integrity": "sha512-QmmJmexXKtPyc3/rsZR/YTLDvMatzbzAypJmLzvlfxgz/SkgnqV/D4f6F2LsK6tBj1qhyp8BoXiOebiej0zz3A==", |       "integrity": "sha512-A3x+um3cAPgQe42Lu7Iv/x8/fNjhL/nIoEfqFxfn30EyxK6zC13n+OUxzZBRC0IzQqssqIbt4INf5YG7lYYFtw==", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@azure/abort-controller": "^1.0.0", |         "@azure/abort-controller": "^1.0.0", | ||||||
|         "@azure/core-asynciterator-polyfill": "^1.0.0", |  | ||||||
|         "@azure/core-auth": "^1.3.0", |         "@azure/core-auth": "^1.3.0", | ||||||
|         "@azure/core-tracing": "1.0.0-preview.13", |         "@azure/core-tracing": "1.0.0-preview.13", | ||||||
|  |         "@azure/core-util": "^1.1.1", | ||||||
|         "@azure/logger": "^1.0.0", |         "@azure/logger": "^1.0.0", | ||||||
|         "@types/node-fetch": "^2.5.0", |         "@types/node-fetch": "^2.5.0", | ||||||
|         "@types/tunnel": "^0.0.3", |         "@types/tunnel": "^0.0.3", | ||||||
|         "form-data": "^4.0.0", |         "form-data": "^4.0.0", | ||||||
|         "node-fetch": "^2.6.7", |         "node-fetch": "^2.6.7", | ||||||
|         "process": "^0.11.10", |         "process": "^0.11.10", | ||||||
|         "tough-cookie": "^4.0.0", |  | ||||||
|         "tslib": "^2.2.0", |         "tslib": "^2.2.0", | ||||||
|         "tunnel": "^0.0.6", |         "tunnel": "^0.0.6", | ||||||
|         "uuid": "^8.3.0", |         "uuid": "^8.3.0", | ||||||
|         "xml2js": "^0.4.19" |         "xml2js": "^0.5.0" | ||||||
|       }, |       }, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=12.0.0" |         "node": ">=14.0.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@azure/core-http/node_modules/form-data": { |     "node_modules/@azure/core-http/node_modules/form-data": { | ||||||
| @ -232,23 +232,10 @@ | |||||||
|         "node": ">= 6" |         "node": ">= 6" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@azure/core-http/node_modules/tough-cookie": { |  | ||||||
|       "version": "4.0.0", |  | ||||||
|       "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", |  | ||||||
|       "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", |  | ||||||
|       "dependencies": { |  | ||||||
|         "psl": "^1.1.33", |  | ||||||
|         "punycode": "^2.1.1", |  | ||||||
|         "universalify": "^0.1.2" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=6" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/@azure/core-http/node_modules/tslib": { |     "node_modules/@azure/core-http/node_modules/tslib": { | ||||||
|       "version": "2.3.1", |       "version": "2.5.0", | ||||||
|       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", |       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", | ||||||
|       "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" |       "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" | ||||||
|     }, |     }, | ||||||
|     "node_modules/@azure/core-http/node_modules/uuid": { |     "node_modules/@azure/core-http/node_modules/uuid": { | ||||||
|       "version": "8.3.2", |       "version": "8.3.2", | ||||||
| @ -311,6 +298,23 @@ | |||||||
|       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", |       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", | ||||||
|       "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" |       "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/@azure/core-util": { | ||||||
|  |       "version": "1.3.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.3.0.tgz", | ||||||
|  |       "integrity": "sha512-ANP0Er7R2KHHHjwmKzPF9wbd0gXvOX7yRRHeYL1eNd/OaNrMLyfZH/FQasHRVAf6rMXX+EAUpvYwLMFDHDI5Gw==", | ||||||
|  |       "dependencies": { | ||||||
|  |         "@azure/abort-controller": "^1.0.0", | ||||||
|  |         "tslib": "^2.2.0" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=14.0.0" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@azure/core-util/node_modules/tslib": { | ||||||
|  |       "version": "2.5.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", | ||||||
|  |       "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" | ||||||
|  |     }, | ||||||
|     "node_modules/@azure/logger": { |     "node_modules/@azure/logger": { | ||||||
|       "version": "1.0.3", |       "version": "1.0.3", | ||||||
|       "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", |       "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", | ||||||
| @ -328,19 +332,18 @@ | |||||||
|       "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" |       "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" | ||||||
|     }, |     }, | ||||||
|     "node_modules/@azure/ms-rest-js": { |     "node_modules/@azure/ms-rest-js": { | ||||||
|       "version": "2.6.1", |       "version": "2.7.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.6.1.tgz", |       "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.7.0.tgz", | ||||||
|       "integrity": "sha512-LLi4jRe/qy5IM8U2CkoDgSZp2OH+MgDe2wePmhz8uY84Svc53EhHaamVyoU6BjjHBxvCRh1vcD1urJDccrxqIw==", |       "integrity": "sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@azure/core-auth": "^1.1.4", |         "@azure/core-auth": "^1.1.4", | ||||||
|         "abort-controller": "^3.0.0", |         "abort-controller": "^3.0.0", | ||||||
|         "form-data": "^2.5.0", |         "form-data": "^2.5.0", | ||||||
|         "node-fetch": "^2.6.7", |         "node-fetch": "^2.6.7", | ||||||
|         "tough-cookie": "^3.0.1", |  | ||||||
|         "tslib": "^1.10.0", |         "tslib": "^1.10.0", | ||||||
|         "tunnel": "0.0.6", |         "tunnel": "0.0.6", | ||||||
|         "uuid": "^8.3.2", |         "uuid": "^8.3.2", | ||||||
|         "xml2js": "^0.4.19" |         "xml2js": "^0.5.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@azure/ms-rest-js/node_modules/form-data": { |     "node_modules/@azure/ms-rest-js/node_modules/form-data": { | ||||||
| @ -365,12 +368,12 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@azure/storage-blob": { |     "node_modules/@azure/storage-blob": { | ||||||
|       "version": "12.9.0", |       "version": "12.14.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.9.0.tgz", |       "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.14.0.tgz", | ||||||
|       "integrity": "sha512-ank38FdCLfJ+EoeMzCz3hkYJuZAd63ARvDKkxZYRDb+beBYf+/+gx8jNTqkq/hfyUl4dJQ/a7tECU0Y0F98CHg==", |       "integrity": "sha512-g8GNUDpMisGXzBeD+sKphhH5yLwesB4JkHr1U6be/X3F+cAMcyGLPD1P89g2M7wbEtUJWoikry1rlr83nNRBzg==", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@azure/abort-controller": "^1.0.0", |         "@azure/abort-controller": "^1.0.0", | ||||||
|         "@azure/core-http": "^2.0.0", |         "@azure/core-http": "^3.0.0", | ||||||
|         "@azure/core-lro": "^2.2.0", |         "@azure/core-lro": "^2.2.0", | ||||||
|         "@azure/core-paging": "^1.1.1", |         "@azure/core-paging": "^1.1.1", | ||||||
|         "@azure/core-tracing": "1.0.0-preview.13", |         "@azure/core-tracing": "1.0.0-preview.13", | ||||||
| @ -379,7 +382,7 @@ | |||||||
|         "tslib": "^2.2.0" |         "tslib": "^2.2.0" | ||||||
|       }, |       }, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=12.0.0" |         "node": ">=14.0.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@azure/storage-blob/node_modules/tslib": { |     "node_modules/@azure/storage-blob/node_modules/tslib": { | ||||||
| @ -1567,9 +1570,9 @@ | |||||||
|       "integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==" |       "integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==" | ||||||
|     }, |     }, | ||||||
|     "node_modules/@types/node-fetch": { |     "node_modules/@types/node-fetch": { | ||||||
|       "version": "2.6.1", |       "version": "2.6.3", | ||||||
|       "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", |       "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz", | ||||||
|       "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", |       "integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@types/node": "*", |         "@types/node": "*", | ||||||
|         "form-data": "^3.0.0" |         "form-data": "^3.0.0" | ||||||
| @ -2593,6 +2596,49 @@ | |||||||
|         "eslint": ">=7.0.0" |         "eslint": ">=7.0.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/eslint-plugin-es": { | ||||||
|  |       "version": "3.0.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", | ||||||
|  |       "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "eslint-utils": "^2.0.0", | ||||||
|  |         "regexpp": "^3.0.0" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=8.10.0" | ||||||
|  |       }, | ||||||
|  |       "funding": { | ||||||
|  |         "url": "https://github.com/sponsors/mysticatea" | ||||||
|  |       }, | ||||||
|  |       "peerDependencies": { | ||||||
|  |         "eslint": ">=4.19.1" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/eslint-plugin-es/node_modules/eslint-utils": { | ||||||
|  |       "version": "2.1.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", | ||||||
|  |       "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "eslint-visitor-keys": "^1.1.0" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=6" | ||||||
|  |       }, | ||||||
|  |       "funding": { | ||||||
|  |         "url": "https://github.com/sponsors/mysticatea" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/eslint-plugin-es/node_modules/eslint-visitor-keys": { | ||||||
|  |       "version": "1.3.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", | ||||||
|  |       "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", | ||||||
|  |       "dev": true, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=4" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "node_modules/eslint-plugin-jest": { |     "node_modules/eslint-plugin-jest": { | ||||||
|       "version": "27.2.1", |       "version": "27.2.1", | ||||||
|       "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz", |       "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz", | ||||||
| @ -2617,6 +2663,59 @@ | |||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/eslint-plugin-node": { | ||||||
|  |       "version": "11.1.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", | ||||||
|  |       "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "eslint-plugin-es": "^3.0.0", | ||||||
|  |         "eslint-utils": "^2.0.0", | ||||||
|  |         "ignore": "^5.1.1", | ||||||
|  |         "minimatch": "^3.0.4", | ||||||
|  |         "resolve": "^1.10.1", | ||||||
|  |         "semver": "^6.1.0" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=8.10.0" | ||||||
|  |       }, | ||||||
|  |       "peerDependencies": { | ||||||
|  |         "eslint": ">=5.16.0" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/eslint-plugin-node/node_modules/eslint-utils": { | ||||||
|  |       "version": "2.1.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", | ||||||
|  |       "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "eslint-visitor-keys": "^1.1.0" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=6" | ||||||
|  |       }, | ||||||
|  |       "funding": { | ||||||
|  |         "url": "https://github.com/sponsors/mysticatea" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/eslint-plugin-node/node_modules/eslint-visitor-keys": { | ||||||
|  |       "version": "1.3.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", | ||||||
|  |       "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", | ||||||
|  |       "dev": true, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=4" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/eslint-plugin-node/node_modules/semver": { | ||||||
|  |       "version": "6.3.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", | ||||||
|  |       "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", | ||||||
|  |       "dev": true, | ||||||
|  |       "bin": { | ||||||
|  |         "semver": "bin/semver.js" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "node_modules/eslint-scope": { |     "node_modules/eslint-scope": { | ||||||
|       "version": "5.1.1", |       "version": "5.1.1", | ||||||
|       "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", |       "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", | ||||||
| @ -3438,14 +3537,6 @@ | |||||||
|       "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", |       "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", | ||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "node_modules/ip-regex": { |  | ||||||
|       "version": "2.1.0", |  | ||||||
|       "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", |  | ||||||
|       "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=4" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/is-ci": { |     "node_modules/is-ci": { | ||||||
|       "version": "3.0.0", |       "version": "3.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", |       "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", | ||||||
| @ -4325,14 +4416,15 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/jsdom/node_modules/tough-cookie": { |     "node_modules/jsdom/node_modules/tough-cookie": { | ||||||
|       "version": "4.0.0", |       "version": "4.1.3", | ||||||
|       "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", |       "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", | ||||||
|       "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", |       "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "psl": "^1.1.33", |         "psl": "^1.1.33", | ||||||
|         "punycode": "^2.1.1", |         "punycode": "^2.1.1", | ||||||
|         "universalify": "^0.1.2" |         "universalify": "^0.2.0", | ||||||
|  |         "url-parse": "^1.5.3" | ||||||
|       }, |       }, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=6" |         "node": ">=6" | ||||||
| @ -4883,7 +4975,7 @@ | |||||||
|     "node_modules/process": { |     "node_modules/process": { | ||||||
|       "version": "0.11.10", |       "version": "0.11.10", | ||||||
|       "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", |       "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", | ||||||
|       "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", |       "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">= 0.6.0" |         "node": ">= 0.6.0" | ||||||
|       } |       } | ||||||
| @ -4904,16 +4996,24 @@ | |||||||
|     "node_modules/psl": { |     "node_modules/psl": { | ||||||
|       "version": "1.8.0", |       "version": "1.8.0", | ||||||
|       "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", |       "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", | ||||||
|       "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" |       "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", | ||||||
|  |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "node_modules/punycode": { |     "node_modules/punycode": { | ||||||
|       "version": "2.1.1", |       "version": "2.1.1", | ||||||
|       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", |       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", | ||||||
|       "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", |       "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", | ||||||
|  |       "dev": true, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=6" |         "node": ">=6" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/querystringify": { | ||||||
|  |       "version": "2.2.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", | ||||||
|  |       "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", | ||||||
|  |       "dev": true | ||||||
|  |     }, | ||||||
|     "node_modules/queue-microtask": { |     "node_modules/queue-microtask": { | ||||||
|       "version": "1.2.3", |       "version": "1.2.3", | ||||||
|       "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", |       "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", | ||||||
| @ -4961,6 +5061,12 @@ | |||||||
|         "node": ">=0.10.0" |         "node": ">=0.10.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/requires-port": { | ||||||
|  |       "version": "1.0.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", | ||||||
|  |       "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", | ||||||
|  |       "dev": true | ||||||
|  |     }, | ||||||
|     "node_modules/resolve": { |     "node_modules/resolve": { | ||||||
|       "version": "1.20.0", |       "version": "1.20.0", | ||||||
|       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", |       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", | ||||||
| @ -5073,9 +5179,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/semver": { |     "node_modules/semver": { | ||||||
|       "version": "7.3.8", |       "version": "7.5.4", | ||||||
|       "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", |       "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", | ||||||
|       "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", |       "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "lru-cache": "^6.0.0" |         "lru-cache": "^6.0.0" | ||||||
|       }, |       }, | ||||||
| @ -5342,19 +5448,6 @@ | |||||||
|         "node": ">=8.0" |         "node": ">=8.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/tough-cookie": { |  | ||||||
|       "version": "3.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", |  | ||||||
|       "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", |  | ||||||
|       "dependencies": { |  | ||||||
|         "ip-regex": "^2.1.0", |  | ||||||
|         "psl": "^1.1.28", |  | ||||||
|         "punycode": "^2.1.1" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=6" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/tr46": { |     "node_modules/tr46": { | ||||||
|       "version": "2.1.0", |       "version": "2.1.0", | ||||||
|       "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", |       "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", | ||||||
| @ -5491,9 +5584,10 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/universalify": { |     "node_modules/universalify": { | ||||||
|       "version": "0.1.2", |       "version": "0.2.0", | ||||||
|       "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", |       "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", | ||||||
|       "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", |       "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", | ||||||
|  |       "dev": true, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">= 4.0.0" |         "node": ">= 4.0.0" | ||||||
|       } |       } | ||||||
| @ -5507,6 +5601,16 @@ | |||||||
|         "punycode": "^2.1.0" |         "punycode": "^2.1.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/url-parse": { | ||||||
|  |       "version": "1.5.10", | ||||||
|  |       "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", | ||||||
|  |       "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "querystringify": "^2.1.1", | ||||||
|  |         "requires-port": "^1.0.0" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "node_modules/uuid": { |     "node_modules/uuid": { | ||||||
|       "version": "3.4.0", |       "version": "3.4.0", | ||||||
|       "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", |       "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", | ||||||
| @ -5623,9 +5727,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/word-wrap": { |     "node_modules/word-wrap": { | ||||||
|       "version": "1.2.3", |       "version": "1.2.4", | ||||||
|       "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", |       "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", | ||||||
|       "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", |       "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "engines": { |       "engines": { | ||||||
|         "node": ">=0.10.0" |         "node": ">=0.10.0" | ||||||
| @ -5694,9 +5798,9 @@ | |||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "node_modules/xml2js": { |     "node_modules/xml2js": { | ||||||
|       "version": "0.4.23", |       "version": "0.5.0", | ||||||
|       "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", |       "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", | ||||||
|       "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", |       "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "sax": ">=0.6.0", |         "sax": ">=0.6.0", | ||||||
|         "xmlbuilder": "~11.0.0" |         "xmlbuilder": "~11.0.0" | ||||||
| @ -5945,25 +6049,24 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "@azure/core-http": { |     "@azure/core-http": { | ||||||
|       "version": "2.2.4", |       "version": "3.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.4.tgz", |       "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.1.tgz", | ||||||
|       "integrity": "sha512-QmmJmexXKtPyc3/rsZR/YTLDvMatzbzAypJmLzvlfxgz/SkgnqV/D4f6F2LsK6tBj1qhyp8BoXiOebiej0zz3A==", |       "integrity": "sha512-A3x+um3cAPgQe42Lu7Iv/x8/fNjhL/nIoEfqFxfn30EyxK6zC13n+OUxzZBRC0IzQqssqIbt4INf5YG7lYYFtw==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@azure/abort-controller": "^1.0.0", |         "@azure/abort-controller": "^1.0.0", | ||||||
|         "@azure/core-asynciterator-polyfill": "^1.0.0", |  | ||||||
|         "@azure/core-auth": "^1.3.0", |         "@azure/core-auth": "^1.3.0", | ||||||
|         "@azure/core-tracing": "1.0.0-preview.13", |         "@azure/core-tracing": "1.0.0-preview.13", | ||||||
|  |         "@azure/core-util": "^1.1.1", | ||||||
|         "@azure/logger": "^1.0.0", |         "@azure/logger": "^1.0.0", | ||||||
|         "@types/node-fetch": "^2.5.0", |         "@types/node-fetch": "^2.5.0", | ||||||
|         "@types/tunnel": "^0.0.3", |         "@types/tunnel": "^0.0.3", | ||||||
|         "form-data": "^4.0.0", |         "form-data": "^4.0.0", | ||||||
|         "node-fetch": "^2.6.7", |         "node-fetch": "^2.6.7", | ||||||
|         "process": "^0.11.10", |         "process": "^0.11.10", | ||||||
|         "tough-cookie": "^4.0.0", |  | ||||||
|         "tslib": "^2.2.0", |         "tslib": "^2.2.0", | ||||||
|         "tunnel": "^0.0.6", |         "tunnel": "^0.0.6", | ||||||
|         "uuid": "^8.3.0", |         "uuid": "^8.3.0", | ||||||
|         "xml2js": "^0.4.19" |         "xml2js": "^0.5.0" | ||||||
|       }, |       }, | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "form-data": { |         "form-data": { | ||||||
| @ -5976,20 +6079,10 @@ | |||||||
|             "mime-types": "^2.1.12" |             "mime-types": "^2.1.12" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         "tough-cookie": { |  | ||||||
|           "version": "4.0.0", |  | ||||||
|           "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", |  | ||||||
|           "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", |  | ||||||
|           "requires": { |  | ||||||
|             "psl": "^1.1.33", |  | ||||||
|             "punycode": "^2.1.1", |  | ||||||
|             "universalify": "^0.1.2" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "tslib": { |         "tslib": { | ||||||
|           "version": "2.3.1", |           "version": "2.5.0", | ||||||
|           "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", |           "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", | ||||||
|           "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" |           "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" | ||||||
|         }, |         }, | ||||||
|         "uuid": { |         "uuid": { | ||||||
|           "version": "8.3.2", |           "version": "8.3.2", | ||||||
| @ -6048,6 +6141,22 @@ | |||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "@azure/core-util": { | ||||||
|  |       "version": "1.3.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.3.0.tgz", | ||||||
|  |       "integrity": "sha512-ANP0Er7R2KHHHjwmKzPF9wbd0gXvOX7yRRHeYL1eNd/OaNrMLyfZH/FQasHRVAf6rMXX+EAUpvYwLMFDHDI5Gw==", | ||||||
|  |       "requires": { | ||||||
|  |         "@azure/abort-controller": "^1.0.0", | ||||||
|  |         "tslib": "^2.2.0" | ||||||
|  |       }, | ||||||
|  |       "dependencies": { | ||||||
|  |         "tslib": { | ||||||
|  |           "version": "2.5.0", | ||||||
|  |           "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", | ||||||
|  |           "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "@azure/logger": { |     "@azure/logger": { | ||||||
|       "version": "1.0.3", |       "version": "1.0.3", | ||||||
|       "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", |       "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", | ||||||
| @ -6064,19 +6173,18 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "@azure/ms-rest-js": { |     "@azure/ms-rest-js": { | ||||||
|       "version": "2.6.1", |       "version": "2.7.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.6.1.tgz", |       "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.7.0.tgz", | ||||||
|       "integrity": "sha512-LLi4jRe/qy5IM8U2CkoDgSZp2OH+MgDe2wePmhz8uY84Svc53EhHaamVyoU6BjjHBxvCRh1vcD1urJDccrxqIw==", |       "integrity": "sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@azure/core-auth": "^1.1.4", |         "@azure/core-auth": "^1.1.4", | ||||||
|         "abort-controller": "^3.0.0", |         "abort-controller": "^3.0.0", | ||||||
|         "form-data": "^2.5.0", |         "form-data": "^2.5.0", | ||||||
|         "node-fetch": "^2.6.7", |         "node-fetch": "^2.6.7", | ||||||
|         "tough-cookie": "^3.0.1", |  | ||||||
|         "tslib": "^1.10.0", |         "tslib": "^1.10.0", | ||||||
|         "tunnel": "0.0.6", |         "tunnel": "0.0.6", | ||||||
|         "uuid": "^8.3.2", |         "uuid": "^8.3.2", | ||||||
|         "xml2js": "^0.4.19" |         "xml2js": "^0.5.0" | ||||||
|       }, |       }, | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "form-data": { |         "form-data": { | ||||||
| @ -6097,12 +6205,12 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "@azure/storage-blob": { |     "@azure/storage-blob": { | ||||||
|       "version": "12.9.0", |       "version": "12.14.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.9.0.tgz", |       "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.14.0.tgz", | ||||||
|       "integrity": "sha512-ank38FdCLfJ+EoeMzCz3hkYJuZAd63ARvDKkxZYRDb+beBYf+/+gx8jNTqkq/hfyUl4dJQ/a7tECU0Y0F98CHg==", |       "integrity": "sha512-g8GNUDpMisGXzBeD+sKphhH5yLwesB4JkHr1U6be/X3F+cAMcyGLPD1P89g2M7wbEtUJWoikry1rlr83nNRBzg==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@azure/abort-controller": "^1.0.0", |         "@azure/abort-controller": "^1.0.0", | ||||||
|         "@azure/core-http": "^2.0.0", |         "@azure/core-http": "^3.0.0", | ||||||
|         "@azure/core-lro": "^2.2.0", |         "@azure/core-lro": "^2.2.0", | ||||||
|         "@azure/core-paging": "^1.1.1", |         "@azure/core-paging": "^1.1.1", | ||||||
|         "@azure/core-tracing": "1.0.0-preview.13", |         "@azure/core-tracing": "1.0.0-preview.13", | ||||||
| @ -7041,9 +7149,9 @@ | |||||||
|       "integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==" |       "integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==" | ||||||
|     }, |     }, | ||||||
|     "@types/node-fetch": { |     "@types/node-fetch": { | ||||||
|       "version": "2.6.1", |       "version": "2.6.3", | ||||||
|       "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", |       "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz", | ||||||
|       "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", |       "integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@types/node": "*", |         "@types/node": "*", | ||||||
|         "form-data": "^3.0.0" |         "form-data": "^3.0.0" | ||||||
| @ -7915,6 +8023,33 @@ | |||||||
|       "dev": true, |       "dev": true, | ||||||
|       "requires": {} |       "requires": {} | ||||||
|     }, |     }, | ||||||
|  |     "eslint-plugin-es": { | ||||||
|  |       "version": "3.0.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", | ||||||
|  |       "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", | ||||||
|  |       "dev": true, | ||||||
|  |       "requires": { | ||||||
|  |         "eslint-utils": "^2.0.0", | ||||||
|  |         "regexpp": "^3.0.0" | ||||||
|  |       }, | ||||||
|  |       "dependencies": { | ||||||
|  |         "eslint-utils": { | ||||||
|  |           "version": "2.1.0", | ||||||
|  |           "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", | ||||||
|  |           "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", | ||||||
|  |           "dev": true, | ||||||
|  |           "requires": { | ||||||
|  |             "eslint-visitor-keys": "^1.1.0" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         "eslint-visitor-keys": { | ||||||
|  |           "version": "1.3.0", | ||||||
|  |           "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", | ||||||
|  |           "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", | ||||||
|  |           "dev": true | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "eslint-plugin-jest": { |     "eslint-plugin-jest": { | ||||||
|       "version": "27.2.1", |       "version": "27.2.1", | ||||||
|       "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz", |       "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz", | ||||||
| @ -7924,6 +8059,43 @@ | |||||||
|         "@typescript-eslint/utils": "^5.10.0" |         "@typescript-eslint/utils": "^5.10.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "eslint-plugin-node": { | ||||||
|  |       "version": "11.1.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", | ||||||
|  |       "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", | ||||||
|  |       "dev": true, | ||||||
|  |       "requires": { | ||||||
|  |         "eslint-plugin-es": "^3.0.0", | ||||||
|  |         "eslint-utils": "^2.0.0", | ||||||
|  |         "ignore": "^5.1.1", | ||||||
|  |         "minimatch": "^3.0.4", | ||||||
|  |         "resolve": "^1.10.1", | ||||||
|  |         "semver": "^6.1.0" | ||||||
|  |       }, | ||||||
|  |       "dependencies": { | ||||||
|  |         "eslint-utils": { | ||||||
|  |           "version": "2.1.0", | ||||||
|  |           "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", | ||||||
|  |           "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", | ||||||
|  |           "dev": true, | ||||||
|  |           "requires": { | ||||||
|  |             "eslint-visitor-keys": "^1.1.0" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         "eslint-visitor-keys": { | ||||||
|  |           "version": "1.3.0", | ||||||
|  |           "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", | ||||||
|  |           "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", | ||||||
|  |           "dev": true | ||||||
|  |         }, | ||||||
|  |         "semver": { | ||||||
|  |           "version": "6.3.0", | ||||||
|  |           "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", | ||||||
|  |           "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", | ||||||
|  |           "dev": true | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "eslint-scope": { |     "eslint-scope": { | ||||||
|       "version": "5.1.1", |       "version": "5.1.1", | ||||||
|       "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", |       "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", | ||||||
| @ -8400,11 +8572,6 @@ | |||||||
|       "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", |       "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", | ||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "ip-regex": { |  | ||||||
|       "version": "2.1.0", |  | ||||||
|       "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", |  | ||||||
|       "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" |  | ||||||
|     }, |  | ||||||
|     "is-ci": { |     "is-ci": { | ||||||
|       "version": "3.0.0", |       "version": "3.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", |       "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", | ||||||
| @ -9088,14 +9255,15 @@ | |||||||
|       }, |       }, | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "tough-cookie": { |         "tough-cookie": { | ||||||
|           "version": "4.0.0", |           "version": "4.1.3", | ||||||
|           "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", |           "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", | ||||||
|           "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", |           "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", | ||||||
|           "dev": true, |           "dev": true, | ||||||
|           "requires": { |           "requires": { | ||||||
|             "psl": "^1.1.33", |             "psl": "^1.1.33", | ||||||
|             "punycode": "^2.1.1", |             "punycode": "^2.1.1", | ||||||
|             "universalify": "^0.1.2" |             "universalify": "^0.2.0", | ||||||
|  |             "url-parse": "^1.5.3" | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| @ -9508,7 +9676,7 @@ | |||||||
|     "process": { |     "process": { | ||||||
|       "version": "0.11.10", |       "version": "0.11.10", | ||||||
|       "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", |       "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", | ||||||
|       "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" |       "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" | ||||||
|     }, |     }, | ||||||
|     "prompts": { |     "prompts": { | ||||||
|       "version": "2.4.2", |       "version": "2.4.2", | ||||||
| @ -9523,12 +9691,20 @@ | |||||||
|     "psl": { |     "psl": { | ||||||
|       "version": "1.8.0", |       "version": "1.8.0", | ||||||
|       "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", |       "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", | ||||||
|       "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" |       "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", | ||||||
|  |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "punycode": { |     "punycode": { | ||||||
|       "version": "2.1.1", |       "version": "2.1.1", | ||||||
|       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", |       "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", | ||||||
|       "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" |       "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", | ||||||
|  |       "dev": true | ||||||
|  |     }, | ||||||
|  |     "querystringify": { | ||||||
|  |       "version": "2.2.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", | ||||||
|  |       "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", | ||||||
|  |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "queue-microtask": { |     "queue-microtask": { | ||||||
|       "version": "1.2.3", |       "version": "1.2.3", | ||||||
| @ -9554,6 +9730,12 @@ | |||||||
|       "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", |       "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", | ||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|  |     "requires-port": { | ||||||
|  |       "version": "1.0.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", | ||||||
|  |       "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", | ||||||
|  |       "dev": true | ||||||
|  |     }, | ||||||
|     "resolve": { |     "resolve": { | ||||||
|       "version": "1.20.0", |       "version": "1.20.0", | ||||||
|       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", |       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", | ||||||
| @ -9630,9 +9812,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "semver": { |     "semver": { | ||||||
|       "version": "7.3.8", |       "version": "7.5.4", | ||||||
|       "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", |       "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", | ||||||
|       "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", |       "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "lru-cache": "^6.0.0" |         "lru-cache": "^6.0.0" | ||||||
|       } |       } | ||||||
| @ -9835,16 +10017,6 @@ | |||||||
|         "is-number": "^7.0.0" |         "is-number": "^7.0.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "tough-cookie": { |  | ||||||
|       "version": "3.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", |  | ||||||
|       "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", |  | ||||||
|       "requires": { |  | ||||||
|         "ip-regex": "^2.1.0", |  | ||||||
|         "psl": "^1.1.28", |  | ||||||
|         "punycode": "^2.1.1" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "tr46": { |     "tr46": { | ||||||
|       "version": "2.1.0", |       "version": "2.1.0", | ||||||
|       "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", |       "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", | ||||||
| @ -9926,9 +10098,10 @@ | |||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "universalify": { |     "universalify": { | ||||||
|       "version": "0.1.2", |       "version": "0.2.0", | ||||||
|       "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", |       "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", | ||||||
|       "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" |       "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", | ||||||
|  |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "uri-js": { |     "uri-js": { | ||||||
|       "version": "4.4.1", |       "version": "4.4.1", | ||||||
| @ -9939,6 +10112,16 @@ | |||||||
|         "punycode": "^2.1.0" |         "punycode": "^2.1.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "url-parse": { | ||||||
|  |       "version": "1.5.10", | ||||||
|  |       "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", | ||||||
|  |       "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", | ||||||
|  |       "dev": true, | ||||||
|  |       "requires": { | ||||||
|  |         "querystringify": "^2.1.1", | ||||||
|  |         "requires-port": "^1.0.0" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "uuid": { |     "uuid": { | ||||||
|       "version": "3.4.0", |       "version": "3.4.0", | ||||||
|       "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", |       "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", | ||||||
| @ -10032,9 +10215,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "word-wrap": { |     "word-wrap": { | ||||||
|       "version": "1.2.3", |       "version": "1.2.4", | ||||||
|       "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", |       "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", | ||||||
|       "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", |       "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", | ||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "wrap-ansi": { |     "wrap-ansi": { | ||||||
| @ -10080,9 +10263,9 @@ | |||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "xml2js": { |     "xml2js": { | ||||||
|       "version": "0.4.23", |       "version": "0.5.0", | ||||||
|       "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", |       "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", | ||||||
|       "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", |       "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", | ||||||
|       "requires": { |       "requires": { | ||||||
|         "sax": ">=0.6.0", |         "sax": ">=0.6.0", | ||||||
|         "xmlbuilder": "~11.0.0" |         "xmlbuilder": "~11.0.0" | ||||||
|  | |||||||
| @ -6,10 +6,10 @@ | |||||||
|   "main": "dist/setup/index.js", |   "main": "dist/setup/index.js", | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts", |     "build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts", | ||||||
|     "format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write **/*.{ts,yml,yaml}", |     "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}", |     "format-check": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --check \"**/*.{ts,yml,yaml}\"", | ||||||
|     "lint": "eslint --config ./.eslintrc.js **/*.ts", |     "lint": "eslint --config ./.eslintrc.js \"**/*.ts\"", | ||||||
|     "lint:fix": "eslint --config ./.eslintrc.js **/*.ts --fix", |     "lint:fix": "eslint --config ./.eslintrc.js \"**/*.ts\" --fix", | ||||||
|     "prerelease": "npm run-script build", |     "prerelease": "npm run-script build", | ||||||
|     "release": "git add -f dist/setup/index.js dist/cleanup/index.js", |     "release": "git add -f dist/setup/index.js dist/cleanup/index.js", | ||||||
|     "test": "jest" |     "test": "jest" | ||||||
| @ -46,6 +46,7 @@ | |||||||
|     "eslint": "^8.35.0", |     "eslint": "^8.35.0", | ||||||
|     "eslint-config-prettier": "^8.6.0", |     "eslint-config-prettier": "^8.6.0", | ||||||
|     "eslint-plugin-jest": "^27.2.1", |     "eslint-plugin-jest": "^27.2.1", | ||||||
|  |     "eslint-plugin-node": "^11.1.0", | ||||||
|     "jest": "^27.2.5", |     "jest": "^27.2.5", | ||||||
|     "jest-circus": "^27.2.5", |     "jest-circus": "^27.2.5", | ||||||
|     "prettier": "^2.8.4", |     "prettier": "^2.8.4", | ||||||
|  | |||||||
| @ -39,7 +39,8 @@ const supportedPackageManager: PackageManager[] = [ | |||||||
|       '**/gradle-wrapper.properties', |       '**/gradle-wrapper.properties', | ||||||
|       'buildSrc/**/Versions.kt', |       'buildSrc/**/Versions.kt', | ||||||
|       'buildSrc/**/Dependencies.kt', |       'buildSrc/**/Dependencies.kt', | ||||||
|       'gradle/*.versions.toml' |       'gradle/*.versions.toml', | ||||||
|  |       '**/versions.properties' | ||||||
|     ] |     ] | ||||||
|   }, |   }, | ||||||
|   { |   { | ||||||
| @ -56,7 +57,8 @@ const supportedPackageManager: PackageManager[] = [ | |||||||
|     pattern: [ |     pattern: [ | ||||||
|       '**/*.sbt', |       '**/*.sbt', | ||||||
|       '**/project/build.properties', |       '**/project/build.properties', | ||||||
|       '**/project/**.{scala,sbt}' |       '**/project/**.scala', | ||||||
|  |       '**/project/**.sbt' | ||||||
|     ] |     ] | ||||||
|   } |   } | ||||||
| ]; | ]; | ||||||
|  | |||||||
| @ -2,7 +2,11 @@ import * as core from '@actions/core'; | |||||||
| import * as tc from '@actions/tool-cache'; | import * as tc from '@actions/tool-cache'; | ||||||
| import fs from 'fs'; | import fs from 'fs'; | ||||||
| import path from 'path'; | import path from 'path'; | ||||||
| import {extractJdkFile, getDownloadArchiveExtension} from '../../util'; | import { | ||||||
|  |   extractJdkFile, | ||||||
|  |   getDownloadArchiveExtension, | ||||||
|  |   convertVersionToSemver | ||||||
|  | } from '../../util'; | ||||||
| import {JavaBase} from '../base-installer'; | import {JavaBase} from '../base-installer'; | ||||||
| import { | import { | ||||||
|   JavaDownloadRelease, |   JavaDownloadRelease, | ||||||
| @ -62,7 +66,7 @@ export class CorrettoDistribution extends JavaBase { | |||||||
|       .filter(item => item.version == version) |       .filter(item => item.version == version) | ||||||
|       .map(item => { |       .map(item => { | ||||||
|         return { |         return { | ||||||
|           version: item.correttoVersion, |           version: convertVersionToSemver(item.correttoVersion), | ||||||
|           url: item.downloadLink |           url: item.downloadLink | ||||||
|         } as JavaDownloadRelease; |         } as JavaDownloadRelease; | ||||||
|       }); |       }); | ||||||
|  | |||||||
| @ -47,27 +47,28 @@ export class LocalDistribution extends JavaBase { | |||||||
|       const archivePath = path.join(extractedJavaPath, archiveName); |       const archivePath = path.join(extractedJavaPath, archiveName); | ||||||
|       const javaVersion = this.version; |       const javaVersion = this.version; | ||||||
| 
 | 
 | ||||||
|       let javaPath = await tc.cacheDir( |       const javaPath = await tc.cacheDir( | ||||||
|         archivePath, |         archivePath, | ||||||
|         this.toolcacheFolderName, |         this.toolcacheFolderName, | ||||||
|         this.getToolcacheVersionName(javaVersion), |         this.getToolcacheVersionName(javaVersion), | ||||||
|         this.architecture |         this.architecture | ||||||
|       ); |       ); | ||||||
| 
 | 
 | ||||||
|       // for different Java distributions, postfix can exist or not so need to check both cases
 |  | ||||||
|       if ( |  | ||||||
|         process.platform === 'darwin' && |  | ||||||
|         fs.existsSync(path.join(javaPath, MACOS_JAVA_CONTENT_POSTFIX)) |  | ||||||
|       ) { |  | ||||||
|         javaPath = path.join(javaPath, MACOS_JAVA_CONTENT_POSTFIX); |  | ||||||
|       } |  | ||||||
| 
 |  | ||||||
|       foundJava = { |       foundJava = { | ||||||
|         version: javaVersion, |         version: javaVersion, | ||||||
|         path: javaPath |         path: javaPath | ||||||
|       }; |       }; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     // JDK folder may contain postfix "Contents/Home" on macOS
 | ||||||
|  |     const macOSPostfixPath = path.join( | ||||||
|  |       foundJava.path, | ||||||
|  |       MACOS_JAVA_CONTENT_POSTFIX | ||||||
|  |     ); | ||||||
|  |     if (process.platform === 'darwin' && fs.existsSync(macOSPostfixPath)) { | ||||||
|  |       foundJava.path = macOSPostfixPath; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     core.info(`Setting Java ${foundJava.version} as default`); |     core.info(`Setting Java ${foundJava.version} as default`); | ||||||
| 
 | 
 | ||||||
|     this.setJavaDefault(foundJava.version, foundJava.path); |     this.setJavaDefault(foundJava.version, foundJava.path); | ||||||
|  | |||||||
| @ -1,4 +1,152 @@ | |||||||
| [ | [ | ||||||
|  |     { | ||||||
|  |         "version": "17.0.7", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.7-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.7-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.7-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.7-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.7-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     },  | ||||||
|  |     { | ||||||
|  |         "version": "17.0.6", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.6-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.6-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.6-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.6-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.6-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.6-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.6-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.6-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.6-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.6-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         "version": "17.0.5", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.5-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.5-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.5-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.5-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.5-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.5-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.5-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.5-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.5-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.5-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         "version": "17.0.4", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.4-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.4-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.4-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.4-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.4-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.4-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.4-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.4-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-17.0.4-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.4-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     },  | ||||||
|     { |     { | ||||||
|         "version": "17.0.3", |         "version": "17.0.3", | ||||||
|         "stable": true, |         "stable": true, | ||||||
| @ -110,6 +258,154 @@ | |||||||
|           } |           } | ||||||
|         ] |         ] | ||||||
|     }, |     }, | ||||||
|  |     { | ||||||
|  |         "version": "11.0.19", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.19-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.19-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.19-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.19-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.19-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         "version": "11.0.18", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.18-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.18-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.18-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.18-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.18-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.18-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.18-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.18-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.18-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.18-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         "version": "11.0.17", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.17-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.17-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.17-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.17-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.17-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.17-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.17-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.17-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.17-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.17-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |         "version": "11.0.16", | ||||||
|  |         "stable": true, | ||||||
|  |         "release_url": "https://aka.ms/download-jdk", | ||||||
|  |         "files": [ | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.16-macos-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.16-macos-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.16-linux-x64.tar.gz", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.16-linux-x64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.16-windows-x64.zip", | ||||||
|  |             "arch": "x64", | ||||||
|  |             "platform": "win32", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.16-windows-x64.zip" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.16-macos-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "darwin", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.16-macos-aarch64.tar.gz" | ||||||
|  |           }, | ||||||
|  |           { | ||||||
|  |             "filename": "microsoft-jdk-11.0.16-linux-aarch64.tar.gz", | ||||||
|  |             "arch": "aarch64", | ||||||
|  |             "platform": "linux", | ||||||
|  |             "download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.16-linux-aarch64.tar.gz" | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |     }, | ||||||
|     { |     { | ||||||
|         "version": "11.0.15", |         "version": "11.0.15", | ||||||
|         "stable": true, |         "stable": true, | ||||||
|  | |||||||
| @ -65,33 +65,48 @@ export class OracleDistribution extends JavaBase { | |||||||
| 
 | 
 | ||||||
|     const platform = this.getPlatform(); |     const platform = this.getPlatform(); | ||||||
|     const extension = getDownloadArchiveExtension(); |     const extension = getDownloadArchiveExtension(); | ||||||
|     let major; | 
 | ||||||
|     let fileUrl; |     const isOnlyMajorProvided = !range.includes('.'); | ||||||
|     if (range.includes('.')) { |     const major = isOnlyMajorProvided ? range : range.split('.')[0]; | ||||||
|       major = range.split('.')[0]; | 
 | ||||||
|       fileUrl = `${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}`; |     const possibleUrls: string[] = []; | ||||||
|     } else { | 
 | ||||||
|       major = range; |     /** | ||||||
|       fileUrl = `${ORACLE_DL_BASE}/${range}/latest/jdk-${range}_${platform}-${arch}_bin.${extension}`; |      * NOTE | ||||||
|  |      * If only major version was provided we will check it under /latest first | ||||||
|  |      * in order to retrieve the latest possible version if possible, | ||||||
|  |      * otherwise we will fall back to /archive where we are guaranteed to | ||||||
|  |      * find any version if it exists | ||||||
|  |      */ | ||||||
|  |     if (isOnlyMajorProvided) { | ||||||
|  |       possibleUrls.push( | ||||||
|  |         `${ORACLE_DL_BASE}/${major}/latest/jdk-${major}_${platform}-${arch}_bin.${extension}` | ||||||
|  |       ); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     possibleUrls.push( | ||||||
|  |       `${ORACLE_DL_BASE}/${major}/archive/jdk-${range}_${platform}-${arch}_bin.${extension}` | ||||||
|  |     ); | ||||||
|  | 
 | ||||||
|     if (parseInt(major) < 17) { |     if (parseInt(major) < 17) { | ||||||
|       throw new Error('Oracle JDK is only supported for JDK 17 and later'); |       throw new Error('Oracle JDK is only supported for JDK 17 and later'); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const response = await this.http.head(fileUrl); |     for (const url of possibleUrls) { | ||||||
|  |       const response = await this.http.head(url); | ||||||
| 
 | 
 | ||||||
|     if (response.message.statusCode === HttpCodes.NotFound) { |       if (response.message.statusCode === HttpCodes.OK) { | ||||||
|       throw new Error(`Could not find Oracle JDK for SemVer ${range}`); |         return {url, version: range}; | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|     if (response.message.statusCode !== HttpCodes.OK) { |       if (response.message.statusCode !== HttpCodes.NotFound) { | ||||||
|         throw new Error( |         throw new Error( | ||||||
|           `Http request for Oracle JDK failed with status code: ${response.message.statusCode}` |           `Http request for Oracle JDK failed with status code: ${response.message.statusCode}` | ||||||
|         ); |         ); | ||||||
|       } |       } | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     return {url: fileUrl, version: range}; |     throw new Error(`Could not find Oracle JDK for SemVer ${range}`); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   public getPlatform(platform: NodeJS.Platform = process.platform): OsVersions { |   public getPlatform(platform: NodeJS.Platform = process.platform): OsVersions { | ||||||
|  | |||||||
| @ -10,6 +10,7 @@ import {IZuluVersions} from './models'; | |||||||
| import { | import { | ||||||
|   extractJdkFile, |   extractJdkFile, | ||||||
|   getDownloadArchiveExtension, |   getDownloadArchiveExtension, | ||||||
|  |   convertVersionToSemver, | ||||||
|   isVersionSatisfies |   isVersionSatisfies | ||||||
| } from '../../util'; | } from '../../util'; | ||||||
| import { | import { | ||||||
| @ -29,9 +30,9 @@ export class ZuluDistribution extends JavaBase { | |||||||
|     const availableVersionsRaw = await this.getAvailableVersions(); |     const availableVersionsRaw = await this.getAvailableVersions(); | ||||||
|     const availableVersions = availableVersionsRaw.map(item => { |     const availableVersions = availableVersionsRaw.map(item => { | ||||||
|       return { |       return { | ||||||
|         version: this.convertVersionToSemver(item.jdk_version), |         version: convertVersionToSemver(item.jdk_version), | ||||||
|         url: item.url, |         url: item.url, | ||||||
|         zuluVersion: this.convertVersionToSemver(item.zulu_version) |         zuluVersion: convertVersionToSemver(item.zulu_version) | ||||||
|       }; |       }; | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
| @ -172,15 +173,4 @@ export class ZuluDistribution extends JavaBase { | |||||||
|         return process.platform; |         return process.platform; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 |  | ||||||
|   // Azul API returns jdk_version as array of digits like [11, 0, 2, 1]
 |  | ||||||
|   private convertVersionToSemver(version_array: number[]) { |  | ||||||
|     const mainVersion = version_array.slice(0, 3).join('.'); |  | ||||||
|     if (version_array.length > 3) { |  | ||||||
|       // intentionally ignore more than 4 numbers because it is invalid semver
 |  | ||||||
|       return `${mainVersion}+${version_array[3]}`; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     return mainVersion; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -104,10 +104,10 @@ export function generateToolchainDefinition( | |||||||
|   } else |   } else | ||||||
|     xmlObj = xmlCreate({ |     xmlObj = xmlCreate({ | ||||||
|       toolchains: { |       toolchains: { | ||||||
|         '@xmlns': 'https://maven.apache.org/TOOLCHAINS/1.1.0', |         '@xmlns': 'http://maven.apache.org/TOOLCHAINS/1.1.0', | ||||||
|         '@xmlns:xsi': 'https://www.w3.org/2001/XMLSchema-instance', |         '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance', | ||||||
|         '@xsi:schemaLocation': |         '@xsi:schemaLocation': | ||||||
|           'https://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd', |           'http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd', | ||||||
|         toolchain: [ |         toolchain: [ | ||||||
|           { |           { | ||||||
|             type: 'jdk', |             type: 'jdk', | ||||||
|  | |||||||
							
								
								
									
										10
									
								
								src/util.ts
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/util.ts
									
									
									
									
									
								
							| @ -151,3 +151,13 @@ export function getVersionFromFileContent( | |||||||
| function avoidOldNotation(content: string): string { | function avoidOldNotation(content: string): string { | ||||||
|   return content.startsWith('1.') ? content.substring(2) : content; |   return content.startsWith('1.') ? content.substring(2) : content; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | export function convertVersionToSemver(version: number[] | string) { | ||||||
|  |   // Some distributions may use semver-like notation (12.10.2.1, 12.10.2.1.1)
 | ||||||
|  |   const versionArray = Array.isArray(version) ? version : version.split('.'); | ||||||
|  |   const mainVersion = versionArray.slice(0, 3).join('.'); | ||||||
|  |   if (versionArray.length > 3) { | ||||||
|  |     return `${mainVersion}+${versionArray.slice(3).join('.')}`; | ||||||
|  |   } | ||||||
|  |   return mainVersion; | ||||||
|  | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user