@simoonfish/df-cli 1.0.2 → 1.0.4

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from "commander";
3
+ import { readFileSync } from "node:fs";
4
+ import { createRequire } from "node:module";
5
+ const require = createRequire(import.meta.url);
6
+ const { version: VERSION } = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
3
7
  import { initCommand } from "./commands/init.js";
4
8
  import { syncCommand } from "./commands/sync.js";
5
9
  import { installCommand } from "./commands/install.js";
@@ -10,7 +14,7 @@ const program = new Command();
10
14
  program
11
15
  .name("devforge")
12
16
  .description("DevForge CLI — 将平台工作区、Skill 和知识库同步到本地开发工程")
13
- .version("1.0.0")
17
+ .version(VERSION)
14
18
  .option("--api-url <url>", "平台 API 地址")
15
19
  .option("--api-key <key>", "平台 API Key")
16
20
  .option("--config <path>", "配置文件路径")
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.2",
6
+ "version": "1.0.4",
7
7
  "description": "DevForge CLI — 将平台工作区、Skill 和知识库同步到本地开发工程",
8
8
  "bin": {
9
9
  "devforge": "./dist/index.js"