blade-code 0.0.8 → 0.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blade-code",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "private": false,
5
5
  "description": "🗡️ Blade Code - 智能代码助手命令行工具",
6
6
  "type": "module",
@@ -17,15 +17,22 @@
17
17
  "dev": "bun --watch src/blade.tsx",
18
18
  "build": "rm -rf dist && bun build src/blade.tsx --external react-devtools-core --external react --external react-dom --external ink --external ink-* --external yargs --external chalk --external inquirer --minify --outfile dist/blade.js --target=node",
19
19
  "start": "bun run dist/blade.js",
20
- "test": "vitest",
21
- "test:watch": "vitest --watch",
22
- "test:coverage": "vitest --coverage",
23
- "test:unit": "vitest --testNamePattern=\"(unit|__tests__)\"",
24
- "test:integration": "vitest --testNamePattern=\"integration\"",
25
- "test:e2e": "vitest --testNamePattern=\"e2e\"",
26
- "test:ci": "vitest run --coverage",
20
+ "test": "node scripts/test.js",
21
+ "test:all": "vitest run --config vitest.config.ts",
22
+ "test:unit": "node scripts/test.js unit",
23
+ "test:integration": "node scripts/test.js integration",
24
+ "test:e2e": "node scripts/test.js e2e",
25
+ "test:security": "node scripts/test.js security",
26
+ "test:coverage": "node scripts/test.js all --coverage",
27
+ "test:unit:coverage": "node scripts/test.js unit --coverage",
28
+ "test:integration:coverage": "node scripts/test.js integration --coverage",
29
+ "test:watch": "vitest --watch --config vitest.config.ts",
30
+ "test:unit:watch": "vitest --watch --config vitest.workspace.ts --project unit",
31
+ "test:integration:watch": "vitest --watch --config vitest.workspace.ts --project integration",
32
+ "test:debug": "node scripts/test.js all --debug",
33
+ "test:verbose": "node scripts/test.js all --verbose",
34
+ "test:ci": "vitest run --config vitest.config.ts --coverage --reporter=verbose",
27
35
  "test:performance": "vitest --testNamePattern=\"performance\" --verbose",
28
- "test:debug": "vitest --no-cache --verbose",
29
36
  "lint": "biome lint src tests",
30
37
  "lint:fix": "biome lint --write src tests",
31
38
  "format": "biome format --write src tests",
@@ -33,7 +40,7 @@
33
40
  "check": "biome check src tests",
34
41
  "check:fix": "biome check --write src tests",
35
42
  "type-check": "tsc --noEmit",
36
- "check:full": "npm run type-check && npm run lint && npm run format:check && npm run test",
43
+ "check:full": "npm run type-check && npm run lint && npm run format:check && npm run test:ci",
37
44
  "security:audit": "pnpm audit",
38
45
  "security:test": "bash scripts/run-security-tests.sh",
39
46
  "release": "node scripts/release.js",
@@ -41,7 +48,7 @@
41
48
  "release:major": "node scripts/release.js --major",
42
49
  "release:minor": "node scripts/release.js --minor",
43
50
  "release:patch": "node scripts/release.js --patch",
44
- "clean": "rm -rf dist node_modules/.cache",
51
+ "clean": "rm -rf dist node_modules/.cache coverage",
45
52
  "prepare": "bun run build",
46
53
  "preflight": "npm run clean && pnpm install && npm run format && npm run lint && npm run build && npm run type-check && npm run test:ci"
47
54
  },
@@ -88,6 +95,7 @@
88
95
  "@types/ws": "^8.5.12",
89
96
  "@types/yargs": "^17.0.33",
90
97
  "@vitest/coverage-v8": "^3.0.0",
98
+ "execa": "^9.6.0",
91
99
  "jsdom": "^26.0.0",
92
100
  "ts-node": "^10.9.2",
93
101
  "typescript": "^5.9.2",
@@ -1,26 +0,0 @@
1
- # 配置文件示例
2
- # 复制此文件为 config.env 并填入真实的API密钥
3
-
4
- # 千问 (Qwen) 配置
5
- # 获取地址: https://dashscope.console.aliyun.com/apiKey
6
- QWEN_API_KEY=your-qwen-api-key-here
7
- QWEN_DEFAULT_MODEL=qwen3-235b-a22b
8
-
9
- # 豆包/火山方舟 (VolcEngine) 配置
10
- # 获取地址: https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey
11
- VOLCENGINE_API_KEY=your-volcengine-api-key-here
12
- VOLCENGINE_DEFAULT_MODEL=ep-20250417144747-rgffm
13
-
14
- # 火山引擎可用模型:
15
- # - ep-20250417144747-rgffm (Doubao-1.5-thinking-pro)
16
- # - ep-20250530171307-rrcc5 (DeepSeek R1 250528)
17
- # - ep-20250530171222-q42h8 (DeepSeek V3)
18
- # - ep-20250612135125-br9k7 (Doubao-Seed-1.6-thinking)
19
-
20
- # 可选配置
21
- DEBUG=true
22
-
23
- # 安全提示:
24
- # 1. 请勿将真实API密钥提交到代码仓库
25
- # 2. 使用 .env 文件存储敏感信息 (已加入 .gitignore)
26
- # 3. 也可以通过命令行 --api-key 参数提供密钥