ai-worktool 1.0.9 → 1.0.11

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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 1.0.9 (2025-08-03)
1
+ ## 1.0.11 (2025-08-03)
2
2
 
3
3
 
4
4
  ### Bug Fixes
Binary file
package/dist/program.js CHANGED
@@ -8,11 +8,11 @@ const commander_1 = require("commander");
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const testAgent_1 = require("./testAgent");
10
10
  const tools_1 = require("./tools");
11
- const view_1 = require("./view");
11
+ // import { showCoverageView } from './view';
12
12
  const program = new commander_1.Command();
13
- program.name('aicoder').description('你的AI编程搭子').version('1.0.0');
13
+ program.name('testAgent').description('吃豆豆:单测智能体').version('1.0.1');
14
14
  program
15
- .command('startTestAgent')
15
+ .command('start [projectRoot]')
16
16
  .description('启动单测智能体,根据源代码文件开始补全单测代码,直到覆盖率100%')
17
17
  .option('-p, --platform <string>', '智能体平台', 'jianguoke')
18
18
  .option('-r, --projectRoot <directory>', '源代码文件夹', (txt) => path_1.default.resolve(txt), process.cwd())
@@ -21,15 +21,18 @@ program
21
21
  .option('-c, --coverageDir <string>', '覆盖率报告文件夹', 'coverage')
22
22
  .option('--autoCommit <boolean>', '覆盖率报告文件夹', (txt) => txt === 'true', true)
23
23
  .option('--fullCoverageEnd <boolean>', '是否在达到100%覆盖率后结束', (txt) => txt === 'true', true)
24
- .action((options) => (0, testAgent_1.startTestAgent)(options));
24
+ .action((projectRoot, options) => (0, testAgent_1.startTestAgent)({
25
+ ...options,
26
+ projectRoot: projectRoot || options.projectRoot
27
+ }));
25
28
  program
26
- .command('showCoverage')
29
+ .command('showCoverage [projectRoot]')
27
30
  .description('监控代码覆盖率报告')
28
31
  .option('-r, --projectRoot <directory>', '源代码文件夹', (txt) => path_1.default.resolve(txt), process.cwd())
29
32
  .option('-c, --coverageDir <string>', '覆盖率报告文件夹', 'coverage')
30
- .action(async (options) => {
31
- await (0, tools_1.runJestTests)(options.projectRoot);
32
- await (0, view_1.showCoverageView)(path_1.default.join(options.projectRoot, options.coverageDir));
33
+ .action(async (projectRoot, options) => {
34
+ await (0, tools_1.runJestTests)(projectRoot || options.projectRoot);
35
+ // await showCoverageView(path.join(options.projectRoot, options.coverageDir));
33
36
  });
34
37
  exports.default = program;
35
38
  //# sourceMappingURL=program.js.map
package/dist/testAgent.js CHANGED
@@ -13,6 +13,7 @@ async function startTestAgent(options) {
13
13
  const log = options.onMessage || console.log;
14
14
  let isErrorEnd = false;
15
15
  log(`开始干活... 😎`);
16
+ console.log(options.projectRoot);
16
17
  try {
17
18
  // 工作流程:
18
19
  // 1、检查当前项目单元测试工具是否安装好,否则安装测试工具搭建测试环境
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "ai-worktool",
3
3
  "displayName": "吃豆豆:单测智能体",
4
- "version": "1.0.9",
4
+ "version": "1.0.11",
5
5
  "description": "单元测试智能体,帮你开发单元测试用例代码直到100%单测覆盖通过。",
6
6
  "author": "jianguoke.cn",
7
7
  "license": "MIT",
8
8
  "repository": "https://codeup.aliyun.com/666cf9ed29ecbe23053513a3/JianGuoKe/ai-worktools",
9
9
  "bin": {
10
- "aicoder": "dist/cli.js"
10
+ "testAgent": "dist/cli.js"
11
11
  },
12
12
  "scripts": {
13
13
  "watch": "tsc -w",
14
14
  "build": "tsc",
15
- "test": "jest --passWithNoTests test/tools/*.test.ts",
15
+ "test": "jest test/tools",
16
16
  "plugin": "ts-node ./tools.ts && dify plugin package plugins/dify-plugin",
17
17
  "package": "cross-env PKG_CACHE_PATH=./binaries pkg . --targets node20-win-x64 --out-path aicoder ",
18
18
  "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
@@ -280,6 +280,7 @@
280
280
  "ovsx": "^0.10.5",
281
281
  "ts-jest": "^29.4.0",
282
282
  "ts-node": "^10.9.2",
283
+ "typescript": "^5.9.2",
283
284
  "vsce": "^2.6.4"
284
285
  },
285
286
  "jest": {