cc-team-viewer 1.5.1 → 1.5.2

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/cli/cli.js +8 -13
  2. package/package.json +1 -1
package/cli/cli.js CHANGED
@@ -325,7 +325,7 @@ const isCliMode = args.includes('--c') || args.includes('-c');
325
325
  const isDangerousMode = args.includes('-d') || args.includes('--d');
326
326
 
327
327
  if (isHelp) {
328
- console.log(`CC Team Viewer CLI\n\n用法:\n cctv [options]\n cctv run -- <command> [args...]\n\n选项:\n -h, --help 显示帮助\n -v, --version 显示版本\n -c, --c CLI 模式:自动打开浏览器\n -d, --d Dangerous 模式:CLI 模式 + --dangerously-skip-permissions\n --uninstall 移除 CC Team Viewer 集成\n\n说明:\n 直接运行 cctv 将安装/修复 Claude Code 的集成 Hook。`);
328
+ console.log(`CC Team Viewer CLI\n\n用法:\n cctv [options]\n cctv run -- <command> [args...]\n cctv update 更新 cc-team-viewer 自身\n cctv upgrade update 的别名\n\n选项:\n -h, --help 显示帮助\n -v, --version 显示版本\n -c, --c CLI 模式:自动打开浏览器\n -d, --d Dangerous 模式:CLI 模式 + --dangerously-skip-permissions\n --uninstall 移除 CC Team Viewer 集成\n\n说明:\n 直接运行 cctv 将安装/修复 Claude Code 的集成 Hook。`);
329
329
  process.exit(0);
330
330
  }
331
331
 
@@ -347,19 +347,14 @@ if (isCliMode || isDangerousMode) {
347
347
  process.exit(1);
348
348
  });
349
349
  } else if (args[0] === 'update' || args[0] === 'upgrade') {
350
- // Pass through update/upgrade directly to claude, bypassing proxy
351
- const nativePath = resolveNativePath();
352
- if (nativePath) {
353
- const child = spawn(nativePath, args.slice(1), { stdio: 'inherit' });
354
- child.on('exit', (code) => process.exit(code));
355
- child.on('error', (err) => {
356
- console.error('claude update 启动失败:', err.message);
357
- process.exit(1);
358
- });
359
- } else {
360
- console.error('错误: 未找到 claude 命令,无法执行 update');
350
+ // Update cc-team-viewer itself
351
+ console.log('正在检查 cc-team-viewer 更新...');
352
+ const child = spawn('npm', ['install', '-g', 'cc-team-viewer@latest'], { stdio: 'inherit' });
353
+ child.on('exit', (code) => process.exit(code ?? 0));
354
+ child.on('error', (err) => {
355
+ console.error(`更新失败: ${err.message}`);
361
356
  process.exit(1);
362
- }
357
+ });
363
358
  } else if (args[0] === 'run') {
364
359
  runProxyCommand(args);
365
360
  } else if (isUninstall) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-team-viewer",
3
- "version": "1.5.01",
3
+ "version": "1.5.2",
4
4
  "description": "Claude Code Logger visualization management tool",
5
5
  "license": "MIT",
6
6
  "main": "server/server.js",