clawt 2.3.6 → 2.3.7

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.
@@ -1,7 +1,5 @@
1
1
  // scripts/postinstall.ts
2
2
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
3
- import { join as join2 } from "path";
4
- import { homedir as homedir2 } from "os";
5
3
 
6
4
  // src/constants/paths.ts
7
5
  import { homedir } from "os";
@@ -43,10 +41,6 @@ var DEFAULT_CONFIG = deriveDefaultConfig(CONFIG_DEFINITIONS);
43
41
  var CONFIG_DESCRIPTIONS = deriveConfigDescriptions(CONFIG_DEFINITIONS);
44
42
 
45
43
  // scripts/postinstall.ts
46
- var CLAWT_HOME2 = join2(homedir2(), ".clawt");
47
- var CONFIG_PATH2 = join2(CLAWT_HOME2, "config.json");
48
- var LOGS_DIR2 = join2(CLAWT_HOME2, "logs");
49
- var WORKTREES_DIR2 = join2(CLAWT_HOME2, "worktrees");
50
44
  function ensureDirectory(dirPath) {
51
45
  if (!existsSync(dirPath)) {
52
46
  mkdirSync(dirPath, { recursive: true });
@@ -86,10 +80,10 @@ function syncConfig(configPath, defaultConfig) {
86
80
  }
87
81
  }
88
82
  function init() {
89
- ensureDirectory(CLAWT_HOME2);
90
- ensureDirectory(LOGS_DIR2);
91
- ensureDirectory(WORKTREES_DIR2);
92
- syncConfig(CONFIG_PATH2, DEFAULT_CONFIG);
83
+ ensureDirectory(CLAWT_HOME);
84
+ ensureDirectory(LOGS_DIR);
85
+ ensureDirectory(WORKTREES_DIR);
86
+ syncConfig(CONFIG_PATH, DEFAULT_CONFIG);
93
87
  console.log("\u2713 clawt \u521D\u59CB\u5316\u5B8C\u6210");
94
88
  }
95
89
  init();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawt",
3
- "version": "2.3.6",
3
+ "version": "2.3.7",
4
4
  "description": "本地并行执行多个Claude Code Agent任务,融合 Git Worktree 与 Claude Code CLI 的命令行工具",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3,18 +3,7 @@
3
3
  */
4
4
 
5
5
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
6
- import { join } from 'node:path';
7
- import { homedir } from 'node:os';
8
- import { DEFAULT_CONFIG } from '../src/constants/index.js';
9
-
10
- /** clawt 主目录 */
11
- const CLAWT_HOME = join(homedir(), '.clawt');
12
- /** 配置文件路径 */
13
- const CONFIG_PATH = join(CLAWT_HOME, 'config.json');
14
- /** 日志目录 */
15
- const LOGS_DIR = join(CLAWT_HOME, 'logs');
16
- /** worktree 目录 */
17
- const WORKTREES_DIR = join(CLAWT_HOME, 'worktrees');
6
+ import { DEFAULT_CONFIG, CLAWT_HOME, CONFIG_PATH, LOGS_DIR, WORKTREES_DIR } from '../src/constants/index.js';
18
7
 
19
8
  /**
20
9
  * 确保目录存在,不存在则递归创建