cc-team-viewer 1.5.0 → 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 +10 -1
  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
 
@@ -346,6 +346,15 @@ if (isCliMode || isDangerousMode) {
346
346
  console.error('CLI mode error:', err);
347
347
  process.exit(1);
348
348
  });
349
+ } else if (args[0] === 'update' || args[0] === 'upgrade') {
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}`);
356
+ process.exit(1);
357
+ });
349
358
  } else if (args[0] === 'run') {
350
359
  runProxyCommand(args);
351
360
  } else if (isUninstall) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-team-viewer",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Claude Code Logger visualization management tool",
5
5
  "license": "MIT",
6
6
  "main": "server/server.js",