@lingerai/cli 0.3.2 → 0.3.3
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/package.json +1 -1
- package/src/index.js +7 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -82,7 +82,13 @@ function buildDeliverIdemKey(taskId, token, resultText, fileId) {
|
|
|
82
82
|
return `deliver-${taskId}-${callerSub}-${digest}`;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
// 真实 CLI 版本号读自 package.json(单一事实源·避免硬编码里程碑标签漂移误报·曾把 0.3.x 答成 v0.4.2)
|
|
86
|
+
let PKG_VERSION = '?';
|
|
87
|
+
try {
|
|
88
|
+
PKG_VERSION = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
|
|
89
|
+
} catch { /* 读不到版本不影响命令运行 */ }
|
|
90
|
+
|
|
91
|
+
const HELP = `Linger CLI v${PKG_VERSION}
|
|
86
92
|
|
|
87
93
|
用法:linger <命令> [参数] [--选项]
|
|
88
94
|
|