@leviyuan/lodestar 0.3.8 → 0.3.9
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/lodestar-version.js +2 -0
- package/dist/lodestar.js +25 -25
- package/package.json +5 -3
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{execSync as z}from"node:child_process";import{readFileSync as B}from"node:fs";import{dirname as D,join as G}from"node:path";import{fileURLToPath as H}from"node:url";var b={reset:"\x1B[0m",bold:"\x1B[1m",cyan:"\x1B[36m",green:"\x1B[32m",dim:"\x1B[2m"};function J(){try{let q=D(H(import.meta.url)),v=JSON.parse(B(G(q,"..","package.json"),"utf8"));return typeof v.version==="string"?v.version:"(unknown)"}catch{return"(unknown)"}}function K(){try{return z("claude --version",{timeout:1e4,stdio:["ignore","pipe","ignore"]}).toString().trim()||"(unknown)"}catch{return"(未找到 / 未安装)"}}console.log(`${b.bold}Lodestar${b.reset} ${b.green}v${J()}${b.reset}`);console.log(`${b.dim}Claude Code:${b.reset} ${K()}`);console.log(`${b.dim}Runtime:${b.reset} ${process.version} (${process.platform}-${process.arch})`);
|