@team-semicolon/semo-cli 3.0.20 → 3.0.21
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 +12 -1
- 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에서 최신 버전을 가져옴
|