CH-J Server ManagerSSH를 통한 서버 관리
메뉴
공개된 소스

CH-J Server Manager

특정 애플리케이션 릴리스의 디렉터리와 파일을 살펴보세요.

소스 ZIP 다운로드
CH-J / Server Manager 193 개 파일
core-20261011T184039Z-4148710795d0 추가됨: 날짜 기록 없음 · 빌드됨:
version.js 추가됨: 날짜 기록 없음 1.7 KB · 56 줄
코드 파일 다운로드
1"use strict";
3const VERSION_PATTERN = /^v?(\d+)\.(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;
5function parseVersion(input) {
6 const raw = String(input || "").trim();
7 const match = VERSION_PATTERN.exec(raw);
8 if (!match) {
9 throw new Error(`Invalid version: ${raw || "<empty>"}`);
10 }
12 return {
13 raw: raw.replace(/^v/i, ""),
14 numbers: [match[1], match[2], match[3] || "0", match[4] || "0"].map(Number),
15 prerelease: match[5] ? match[5].split(".") : []
16 };
19function comparePrerelease(left, right) {
20 if (left.length === 0 && right.length === 0) return 0;
21 if (left.length === 0) return 1;
22 if (right.length === 0) return -1;
24 const length = Math.max(left.length, right.length);
25 for (let index = 0; index < length; index += 1) {
26 if (left[index] === undefined) return -1;
27 if (right[index] === undefined) return 1;
28 if (left[index] === right[index]) continue;
30 const leftNumeric = /^\d+$/.test(left[index]);
31 const rightNumeric = /^\d+$/.test(right[index]);
32 if (leftNumeric && rightNumeric) {
33 return Number(left[index]) > Number(right[index]) ? 1 : -1;
34 }
35 if (leftNumeric !== rightNumeric) return leftNumeric ? -1 : 1;
36 return left[index] > right[index] ? 1 : -1;
37 }
38 return 0;
41function compareVersions(leftInput, rightInput) {
42 const left = parseVersion(leftInput);
43 const right = parseVersion(rightInput);
45 for (let index = 0; index < left.numbers.length; index += 1) {
46 if (left.numbers[index] === right.numbers[index]) continue;
47 return left.numbers[index] > right.numbers[index] ? 1 : -1;
48 }
49 return comparePrerelease(left.prerelease, right.prerelease);
52module.exports = {
53 VERSION_PATTERN,
54 compareVersions,
55 parseVersion
56};
SHA-256f72255fe2089bfcd9cdd4727c5a47e9e563195db470dbe8073ebe311aa120804

CH-J Proprietary Software License 1.14 · 소스는 CH-J Proprietary Software License 1.14에 따라 제공됩니다. 소스를 공개한다고 해서 라이선스 조항이 바뀌거나 추가 권리가 부여되지는 않습니다.

압축 파일 SHA-2565a8ea02d06a5643cf2330fe9f54b8767a06c1c59d36527705e536fa9dbca7614
파일