Skip to content

Commit 7782c7c

Browse files
committed
v1.5.0: bump version + dynamic sync dir detection in esbuild.js
1 parent ffffb4d commit 7782c7c

2 files changed

Lines changed: 19 additions & 9 deletions

File tree

extension/esbuild.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,25 @@ esbuild.build({
1515
}).then(() => {
1616
// 自动同步到所有已安装的 IDE 扩展目录(开发便利)
1717
const home = process.env.USERPROFILE || "";
18-
const extName = "wenzhouxinzao.testpilot-ai-1.4.0";
19-
const ideDirs = [
20-
path.join(home, ".vscode", "extensions", extName),
21-
path.join(home, ".trae-cn", "extensions", extName),
22-
path.join(home, ".cursor", "extensions", extName),
23-
path.join(home, ".windsurf", "extensions", extName),
24-
path.join(home, ".vscodium", "extensions", extName),
25-
path.join(home, ".vscode-insiders", "extensions", extName),
18+
const extPrefix = "wenzhouxinzao.testpilot-ai-";
19+
const ideRoots = [
20+
path.join(home, ".vscode", "extensions"),
21+
path.join(home, ".trae-cn", "extensions"),
22+
path.join(home, ".cursor", "extensions"),
23+
path.join(home, ".windsurf", "extensions"),
24+
path.join(home, ".vscodium", "extensions"),
25+
path.join(home, ".vscode-insiders", "extensions"),
2626
];
27+
// 动态扫描已安装目录(不写死版本号)
28+
const ideDirs = [];
29+
for (const root of ideRoots) {
30+
if (!fs.existsSync(root)) continue;
31+
for (const name of fs.readdirSync(root)) {
32+
if (name.startsWith(extPrefix)) {
33+
ideDirs.push(path.join(root, name));
34+
}
35+
}
36+
}
2737

2838
function syncToDir(installed) {
2939
// 同步 extension.js

extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "testpilot-ai",
33
"displayName": "TestPilot AI",
44
"description": "AI-powered automated testing robot — operates UI like a human, finds bugs, and auto-fixes them. Supports Web, Android, iOS, Mini Program & Desktop.",
5-
"version": "1.4.0",
5+
"version": "1.5.0",
66
"publisher": "wenzhouxinzao",
77
"engines": {
88
"vscode": "^1.85.0"

0 commit comments

Comments
 (0)