congmao-cli 1.0.1 → 1.0.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/README.md CHANGED
@@ -108,8 +108,6 @@ cm mcp
108
108
  }
109
109
  ```
110
110
 
111
- 详细配置指南请查看 [MCP 配置文档](./src/mcp/CURSOR_SETUP.md)
112
-
113
111
  ## 📝 许可证
114
112
 
115
113
  MPL
package/bin/index.js CHANGED
@@ -1,13 +1,21 @@
1
1
  #! /usr/bin/env node
2
2
 
3
3
  import { program } from "commander";
4
+ import { readFileSync } from "fs";
5
+ import { fileURLToPath } from "url";
6
+ import { dirname, join } from "path";
4
7
  import create from "../src/commands/create.js";
5
8
  import mcp from "../src/commands/mcp.js";
6
9
  import { showLogo } from "../src/utils/logo.js";
7
10
 
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = dirname(__filename);
13
+ const packageJsonPath = join(__dirname, "../package.json");
14
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
15
+
8
16
  showLogo();
9
17
 
10
- program.name("cm-cli").version("1.0.0");
18
+ program.name("cm-cli").version(packageJson.version);
11
19
 
12
20
  program.command("create").description("创建初始化项目").action(create);
13
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "congmao-cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "cli",
5
5
  "type": "module",
6
6
  "main": "index.js",