@team-semicolon/semo-cli 3.0.20 → 3.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +35 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -59,8 +59,19 @@ const child_process_1 = require("child_process");
|
|
|
59
59
|
const fs = __importStar(require("fs"));
|
|
60
60
|
const path = __importStar(require("path"));
|
|
61
61
|
const os = __importStar(require("os"));
|
|
62
|
-
const VERSION = "3.0.17";
|
|
63
62
|
const PACKAGE_NAME = "@team-semicolon/semo-cli";
|
|
63
|
+
// package.json에서 버전 동적 로드
|
|
64
|
+
function getCliVersion() {
|
|
65
|
+
try {
|
|
66
|
+
const pkgPath = path.join(__dirname, "..", "package.json");
|
|
67
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
68
|
+
return pkg.version || "unknown";
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return "unknown";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const VERSION = getCliVersion();
|
|
64
75
|
// === 버전 비교 유틸리티 ===
|
|
65
76
|
/**
|
|
66
77
|
* npm registry에서 최신 버전을 가져옴
|
|
@@ -364,16 +375,23 @@ const EXTENSION_PACKAGES = {
|
|
|
364
375
|
// Meta
|
|
365
376
|
meta: { name: "Meta", desc: "SEMO 프레임워크 자체 개발/관리", layer: "meta", detect: ["semo-core", "semo-skills"] },
|
|
366
377
|
};
|
|
367
|
-
//
|
|
368
|
-
const
|
|
369
|
-
|
|
370
|
-
|
|
378
|
+
// 단축명 → 전체 패키지 경로 매핑
|
|
379
|
+
const SHORTNAME_MAPPING = {
|
|
380
|
+
// 하위 패키지명 단축 (discovery → biz/discovery)
|
|
381
|
+
discovery: "biz/discovery",
|
|
382
|
+
design: "biz/design",
|
|
383
|
+
management: "biz/management",
|
|
384
|
+
poc: "biz/poc",
|
|
385
|
+
nextjs: "eng/nextjs",
|
|
386
|
+
spring: "eng/spring",
|
|
371
387
|
ms: "eng/ms",
|
|
372
388
|
infra: "eng/infra",
|
|
373
389
|
qa: "ops/qa",
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
390
|
+
monitor: "ops/monitor",
|
|
391
|
+
improve: "ops/improve",
|
|
392
|
+
// 추가 별칭
|
|
393
|
+
next: "eng/nextjs",
|
|
394
|
+
backend: "eng/spring",
|
|
377
395
|
mvp: "biz/poc",
|
|
378
396
|
};
|
|
379
397
|
// 그룹 이름 목록 (biz, eng, ops)
|
|
@@ -400,9 +418,9 @@ function resolvePackageInput(input) {
|
|
|
400
418
|
groupName = part;
|
|
401
419
|
continue;
|
|
402
420
|
}
|
|
403
|
-
// 2.
|
|
404
|
-
if (part in
|
|
405
|
-
resolvedPackages.push(
|
|
421
|
+
// 2. 단축명 매핑 확인 (discovery → biz/discovery 등)
|
|
422
|
+
if (part in SHORTNAME_MAPPING) {
|
|
423
|
+
resolvedPackages.push(SHORTNAME_MAPPING[part]);
|
|
406
424
|
continue;
|
|
407
425
|
}
|
|
408
426
|
// 3. 직접 패키지명 확인
|
|
@@ -2080,7 +2098,7 @@ program
|
|
|
2080
2098
|
console.log(chalk_1.default.red(`\n알 수 없는 패키지: ${packagesInput}`));
|
|
2081
2099
|
console.log(chalk_1.default.gray(`사용 가능한 그룹: ${PACKAGE_GROUPS.join(", ")}`));
|
|
2082
2100
|
console.log(chalk_1.default.gray(`사용 가능한 패키지: ${Object.keys(EXTENSION_PACKAGES).join(", ")}`));
|
|
2083
|
-
console.log(chalk_1.default.gray(
|
|
2101
|
+
console.log(chalk_1.default.gray(`단축명: ${Object.keys(SHORTNAME_MAPPING).join(", ")}\n`));
|
|
2084
2102
|
process.exit(1);
|
|
2085
2103
|
}
|
|
2086
2104
|
// 그룹 설치인 경우 안내
|
|
@@ -2194,12 +2212,12 @@ program
|
|
|
2194
2212
|
console.log(chalk_1.default.gray(" semo add eng → Engineering 전체 (nextjs, spring, ms, infra)"));
|
|
2195
2213
|
console.log(chalk_1.default.gray(" semo add ops → Operations 전체 (qa, monitor, improve)"));
|
|
2196
2214
|
console.log();
|
|
2197
|
-
//
|
|
2215
|
+
// 단축명 안내
|
|
2198
2216
|
console.log(chalk_1.default.gray("─".repeat(50)));
|
|
2199
|
-
console.log(chalk_1.default.
|
|
2200
|
-
console.log(chalk_1.default.gray(" semo add
|
|
2201
|
-
console.log(chalk_1.default.gray(" semo add
|
|
2202
|
-
console.log(chalk_1.default.gray(" semo add
|
|
2217
|
+
console.log(chalk_1.default.white.bold("⚡ 단축명 지원"));
|
|
2218
|
+
console.log(chalk_1.default.gray(" semo add discovery → biz/discovery"));
|
|
2219
|
+
console.log(chalk_1.default.gray(" semo add qa → ops/qa"));
|
|
2220
|
+
console.log(chalk_1.default.gray(" semo add nextjs → eng/nextjs\n"));
|
|
2203
2221
|
});
|
|
2204
2222
|
// === status 명령어 ===
|
|
2205
2223
|
program
|