feat(server): 사이트에서 권장 JDK 선택 + 설치기 권장 JDK 우선 탐색

- pack 에 recommendedJdk 추가(shared/types, store 정규화, 기본 25, 허용목록
  [8,11,17,21,25]). 사이트 편집기에 JDK 버전 드롭다운 추가(직접 입력 X).
- 설치기 JDK 탐색 순서 변경: ① 권장 JDK 자동설치 위치(temurin-<권장>) 우선 →
  ② 없으면 컴퓨터 JDK(JAVA_HOME/Program Files, 권장 버전 이상만 인정).
- 자동 설치/버전 검증도 pack 의 권장 버전을 사용(하드코딩 25 제거).
- 렌더러에 권장 JDK 표시, 관련 안내/문서 갱신. 버전 0.4.5→0.4.6.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 08:59:41 +09:00
parent a6118039a3
commit a1d8435b71
11 changed files with 115 additions and 51 deletions

View File

@@ -23,7 +23,8 @@ import {
savePackList,
setPackPublic,
setTermVisibility,
writeAccounts
writeAccounts,
SUPPORTED_JDK_MAJORS
} from '../../shared/store.js'
import { hashPassword, isHashed, verifyPassword } from '../password.js'
import { fetchReleaseVersions } from '../../shared/mojang.js'
@@ -187,7 +188,8 @@ opRouter.get('/op/dashboard/:packName', requireAuth, async (req, res, next) => {
packKey,
pack: definition,
releases,
isPublic
isPublic,
jdkOptions: SUPPORTED_JDK_MAJORS
})
} catch (error) {
next(error)
@@ -570,6 +572,7 @@ opRouter.post('/op/dashboard/:packName', requireAuth, async (req, res, next) =>
serverMaxRam: Number(pickFirstValue(req.body.serverMaxRam)),
clientMinRam: Number(pickFirstValue(req.body.clientMinRam)),
clientRecommendedRam: Number(pickFirstValue(req.body.clientRecommendedRam)),
recommendedJdk: Number(pickFirstValue(req.body.recommendedJdk)),
mapPath: pickFirstValue(req.body.mapPath),
serverPath: pickFirstValue(req.body.serverPath)
}