@zhongqian97-code/ecode 0.0.1 → 0.0.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/dist/index.js +3 -5
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -141,14 +141,12 @@ import { exec } from "child_process";
141
141
  var DEFAULT_TIMEOUT_MS = 3e4;
142
142
  function executeBash(cmd, timeoutMs = DEFAULT_TIMEOUT_MS) {
143
143
  return new Promise((resolve) => {
144
- exec(cmd, { timeout: timeoutMs }, (err, result) => {
145
- const stdout = result?.stdout ?? "";
146
- const stderr = result?.stderr ?? "";
144
+ exec(cmd, { timeout: timeoutMs }, (err, stdout, stderr) => {
147
145
  if (err) {
148
146
  const exitCode = err.code ?? 1;
149
- resolve({ stdout, stderr, exitCode });
147
+ resolve({ stdout: stdout ?? "", stderr: stderr ?? "", exitCode });
150
148
  } else {
151
- resolve({ stdout, stderr, exitCode: 0 });
149
+ resolve({ stdout: stdout ?? "", stderr: stderr ?? "", exitCode: 0 });
152
150
  }
153
151
  });
154
152
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhongqian97-code/ecode",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "A minimal Claude Code clone with REPL interface and bash tool calling",
5
5
  "type": "module",
6
6
  "author": "zhongqian97-code",
@@ -35,6 +35,7 @@
35
35
  "build": "tsup",
36
36
  "dev": "tsx src/index.ts",
37
37
  "test": "vitest run",
38
+ "test:integration": "vitest run --config vitest.integration.config.ts",
38
39
  "test:watch": "vitest"
39
40
  },
40
41
  "dependencies": {