gemini-proxy-client 1.0.16 → 1.0.17

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/cli.js +7 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7,12 +7,18 @@ import fs from 'fs';
7
7
  import { startClient } from './commands/start.js';
8
8
  import { loginCommand } from './commands/login.js';
9
9
  import { statusCommand } from './commands/status.js';
10
+ import { fileURLToPath } from 'url';
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = path.dirname(__filename);
13
+ // 从 package.json 读取版本号
14
+ const packageJsonPath = path.join(__dirname, '..', 'package.json');
15
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
10
16
  const DEFAULT_DATA_DIR = path.join(os.homedir(), '.gemini-client');
11
17
  const program = new Command();
12
18
  program
13
19
  .name('gemini-client')
14
20
  .description('Gemini Proxy Build App 客户端 - 使用 Camoufox 自动保持连接')
15
- .version('1.0.15');
21
+ .version(packageJson.version);
16
22
  program
17
23
  .command('start')
18
24
  .description('启动客户端,连接到代理服务器')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemini-proxy-client",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Gemini Proxy Build App 客户端 - 使用 Camoufox 自动保持连接",
5
5
  "main": "dist/index.js",
6
6
  "bin": {