2026-07-29 17:53:33 -04:00
export const id = 939 ;
export const ids = [ 939 ] ;
export const modules = {
/***/ 9939 :
/***/ ( ( _ _unused _webpack _module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) => {
/* harmony export */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
/* harmony export */ SemeruDistribution : ( ) => ( /* binding */ SemeruDistribution )
/* harmony export */ } ) ;
/* harmony import */ var _base _installer _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 6242 ) ;
/* harmony import */ var semver _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 2088 ) ;
/* harmony import */ var semver _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( semver _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/* harmony import */ var _util _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 4527 ) ;
/* harmony import */ var _actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 3838 ) ;
2026-08-04 23:05:06 -04:00
/* harmony import */ var fs _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( 9896 ) ;
/* harmony import */ var fs _ _WEBPACK _IMPORTED _MODULE _4 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( fs _ _WEBPACK _IMPORTED _MODULE _4 _ _ ) ;
/* harmony import */ var path _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( 6928 ) ;
/* harmony import */ var path _ _WEBPACK _IMPORTED _MODULE _5 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( path _ _WEBPACK _IMPORTED _MODULE _5 _ _ ) ;
2026-07-29 17:53:33 -04:00
const supportedArchitectures = [
'x64' ,
'x86' ,
'ppc64le' ,
'ppc64' ,
's390x' ,
'aarch64'
] ;
class SemeruDistribution extends _base _installer _js _ _WEBPACK _IMPORTED _MODULE _0 _ _ /* .JavaBase */ . O {
constructor ( installerOptions ) {
super ( 'IBM_Semeru' , installerOptions ) ;
}
async findPackageForDownload ( version ) {
const arch = this . distributionArchitecture ( ) ;
if ( ! supportedArchitectures . includes ( arch ) ) {
throw new Error ( ` Unsupported architecture for IBM Semeru: ${ this . architecture } for your current OS version, the following are supported: ${ supportedArchitectures . join ( ', ' ) } ` ) ;
}
if ( ! this . stable ) {
throw new Error ( 'IBM Semeru does not provide builds for early access versions' ) ;
}
if ( this . packageType !== 'jdk' && this . packageType !== 'jre' ) {
throw new Error ( 'IBM Semeru only provide `jdk` and `jre` package types' ) ;
}
const availableVersionsRaw = await this . getAvailableVersions ( ) ;
const availableVersionsWithBinaries = availableVersionsRaw
. filter ( item => item . binaries . length > 0 )
. map ( item => {
// normalize 17.0.0-beta+33.0.202107301459 to 17.0.0+33.0.202107301459 for earlier access versions
const formattedVersion = this . stable
? item . version _data . semver
: item . version _data . semver . replace ( '-beta+' , '+' ) ;
return {
version : formattedVersion ,
url : item . binaries [ 0 ] . package . link ,
checksum : {
algorithm : 'sha256' ,
value : item . binaries [ 0 ] . package . checksum ,
source : item . binaries [ 0 ] . package . checksum _link
}
} ;
} ) ;
const satisfiedVersions = availableVersionsWithBinaries
. filter ( item => ( 0 , _util _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* .isVersionSatisfies */ . y ) ( version , item . version ) )
. sort ( ( a , b ) => {
return - semver _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default ( ) . compareBuild ( a . version , b . version ) ;
} ) ;
const resolvedFullVersion = satisfiedVersions . length > 0 ? satisfiedVersions [ 0 ] : null ;
if ( ! resolvedFullVersion ) {
const availableVersionStrings = availableVersionsWithBinaries . map ( item => item . version ) ;
// Include platform context to help users understand OS-specific version availability
// IBM Semeru builds are OS-specific, so platform info aids in troubleshooting
const platformContext = ` Platform: ${ process . platform } ` ;
throw this . createVersionNotFoundError ( version , availableVersionStrings , platformContext ) ;
}
return resolvedFullVersion ;
}
async downloadTool ( javaRelease ) {
_actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .info */ . pq ( ` Downloading Java ${ javaRelease . version } ( ${ this . distribution } ) from ${ javaRelease . url } ... ` ) ;
let javaArchivePath = await this . downloadAndVerify ( javaRelease ) ;
_actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .info */ . pq ( ` Extracting Java archive... ` ) ;
const extension = ( 0 , _util _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* .getDownloadArchiveExtension */ . ag ) ( ) ;
if ( process . platform === 'win32' ) {
javaArchivePath = ( 0 , _util _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* .renameWinArchive */ . n2 ) ( javaArchivePath ) ;
}
const extractedJavaPath = await ( 0 , _util _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* .extractJdkFile */ . PE ) ( javaArchivePath , extension ) ;
2026-08-04 23:05:06 -04:00
const archiveName = fs _ _WEBPACK _IMPORTED _MODULE _4 _ _ _default ( ) . readdirSync ( extractedJavaPath ) [ 0 ] ;
const archivePath = path _ _WEBPACK _IMPORTED _MODULE _5 _ _ _default ( ) . join ( extractedJavaPath , archiveName ) ;
2026-07-29 17:53:33 -04:00
const version = this . getToolcacheVersionName ( javaRelease . version ) ;
2026-08-04 23:05:06 -04:00
const javaPath = await ( 0 , _util _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* .cacheJdkDir */ . Vj ) ( archivePath , this . toolcacheFolderName , version , this . architecture ) ;
2026-07-29 17:53:33 -04:00
return { version : javaRelease . version , path : javaPath } ;
}
get toolcacheFolderName ( ) {
return super . toolcacheFolderName ;
}
async getAvailableVersions ( ) {
const platform = this . getPlatformOption ( ) ;
const arch = this . distributionArchitecture ( ) ;
const imageType = this . packageType ;
const versionRange = encodeURI ( '[1.0,100.0]' ) ; // retrieve all available versions
const releaseType = this . stable ? 'ga' : 'ea' ;
if ( _actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .isDebug */ . _o ( ) ) {
console . time ( 'Retrieving available versions for Semeru took' ) ; // eslint-disable-line no-console
}
const baseRequestArguments = [
` project=jdk ` ,
'vendor=ibm' ,
` heap_size=normal ` ,
'sort_method=DEFAULT' ,
'sort_order=DESC' ,
` os= ${ platform } ` ,
` architecture= ${ arch } ` ,
` image_type= ${ imageType } ` ,
` release_type= ${ releaseType } ` ,
` jvm_impl=openj9 `
] . join ( '&' ) ;
const requestArguments = ` ${ baseRequestArguments } &page_size=20&page=0 ` ;
let availableVersionsUrl = ` https://api.adoptopenjdk.net/v3/assets/version/ ${ versionRange } ? ${ requestArguments } ` ;
const availableVersions = [ ] ;
let pageCount = 0 ;
if ( _actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .isDebug */ . _o ( ) ) {
_actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .debug */ . Yz ( ` Gathering available versions from ' ${ availableVersionsUrl } ' ` ) ;
}
while ( availableVersionsUrl ) {
pageCount ++ ;
const response = await this . http . getJson ( availableVersionsUrl ) ;
const paginationPage = response . result ;
const nextUrl = ( 0 , _util _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* .getNextPageUrlFromLinkHeader */ . rC ) ( response . headers ) ;
if ( nextUrl &&
! ( 0 , _util _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* .validatePaginationUrl */ . SA ) ( nextUrl , 'https://api.adoptopenjdk.net' ) ) {
_actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .warning */ . $e ( ` Ignoring pagination link with unexpected origin: ${ nextUrl } ` ) ;
availableVersionsUrl = null ;
}
else {
availableVersionsUrl = nextUrl ;
}
if ( paginationPage === null || paginationPage . length === 0 ) {
break ;
}
availableVersions . push ( ... paginationPage ) ;
if ( pageCount >= _util _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* .MAX_PAGINATION_PAGES */ . Tp ) {
_actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .warning */ . $e ( ` Reached pagination safeguard limit ( ${ _util _js _ _WEBPACK _IMPORTED _MODULE _2 _ _ /* .MAX_PAGINATION_PAGES */ . Tp } pages) while listing Semeru releases. ` ) ;
break ;
}
}
if ( _actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .isDebug */ . _o ( ) ) {
_actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .startGroup */ . Oh ( 'Print information about available versions' ) ;
console . timeEnd ( 'Retrieving available versions for Semeru took' ) ; // eslint-disable-line no-console
_actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .debug */ . Yz ( ` Available versions: [ ${ availableVersions . length } ] ` ) ;
_actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .debug */ . Yz ( availableVersions . map ( item => item . version _data . semver ) . join ( ', ' ) ) ;
_actions _core _ _WEBPACK _IMPORTED _MODULE _3 _ _ /* .endGroup */ . N4 ( ) ;
}
return availableVersions ;
}
getPlatformOption ( ) {
// Adopt has own platform names so need to map them
switch ( process . platform ) {
case 'darwin' :
return 'mac' ;
case 'win32' :
return 'windows' ;
default :
return process . platform ;
}
}
}
/***/ } )
} ;