@dahawa/hawa-cli-analysis 1.0.4 → 1.0.6

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/package.json +3 -2
  2. package/uclaude.js +4 -2
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@dahawa/hawa-cli-analysis",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "main": "index",
5
5
  "bin": {
6
6
  "uclaude": "uclaude.js",
7
7
  "ucodex": "ucodex.js"
8
8
  },
9
9
  "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1"
10
+ "test": "echo \"Error: no test specified\" && exit 1",
11
+ "publish": "npm publish --access public"
11
12
  },
12
13
  "type": "module",
13
14
  "repository": {
package/uclaude.js CHANGED
@@ -121,13 +121,15 @@ function start(){
121
121
 
122
122
  logger.debug(`启动 Claude 进程: ${claudePath}`);
123
123
 
124
- const child = spawn(claudePath,[],{
124
+ const child = spawn(claudePath,process.argv.slice(2),{
125
125
  env:{
126
+ ...process.env, //包含原先环境变量
126
127
  ...anthropicEnv,
127
128
  PIPE_PATH_PRE: process.pid
128
129
  },
129
130
  stdio: 'inherit', // 继承父进程 stdio,方便交互,
130
- shell: true
131
+ shell: true,
132
+ cwd: process.cwd() // 设置工作目录为当前目录
131
133
  }
132
134
  );
133
135