msdevflow 0.7.0 → 0.7.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.
package/README.md CHANGED
@@ -13,12 +13,20 @@
13
13
  - GitCode 账号;
14
14
  - Chrome 或 Edge(推荐,用于 openLiBing OAuth)。
15
15
 
16
- 运行一步安装:
16
+ 首次安装:
17
17
 
18
18
  ```bash
19
19
  npx msdevflow setup
20
20
  ```
21
21
 
22
+ 后续升级无需卸载旧版本,显式使用 `@latest` 获取 npm 上的最新版:
23
+
24
+ ```bash
25
+ npx msdevflow@latest setup
26
+ ```
27
+
28
+ `setup` 是幂等的:内容一致时保持 `current`,内容不同时原子更新。
29
+
22
30
  `setup` 默认检测 PATH 中的 Claude Code、Codex 和 OpenCode,展示完整计划并在确认后:
23
31
 
24
32
  1. 把同一份 `msdevflow` skill 原子安装或更新到所需目标;
package/lib/bootstrap.js CHANGED
@@ -481,8 +481,8 @@ function validatePythonRequirements(file) {
481
481
  }
482
482
  }
483
483
 
484
- function firstOutputLine(output) {
485
- return output.split(/\r?\n/).map((line) => line.trim()).find(Boolean) || "";
484
+ function outputLines(output) {
485
+ return output.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
486
486
  }
487
487
 
488
488
  export function resolveExecutable(name, run, platform) {
@@ -490,7 +490,14 @@ export function resolveExecutable(name, run, platform) {
490
490
  ? { command: "where.exe", args: [name] }
491
491
  : { command: "sh", args: ["-c", "command -v -- \"$1\"", "sh", name] };
492
492
  const result = runOptional(run, invocation);
493
- return result.status === 0 ? firstOutputLine(result.stdout) : "";
493
+ if (result.status !== 0) {
494
+ return "";
495
+ }
496
+ const candidates = outputLines(result.stdout);
497
+ if (platform === "win32") {
498
+ return candidates.find((candidate) => /\.(?:com|exe|cmd|bat|ps1)$/i.test(candidate)) || "";
499
+ }
500
+ return candidates[0] || "";
494
501
  }
495
502
 
496
503
  export function detectClients(run, platform) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "msdevflow",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Install the msdevflow GitCode skill and its runtime dependencies",
5
5
  "type": "module",
6
6
  "bin": {
@@ -210,12 +210,20 @@ git --version
210
210
 
211
211
  ## 6. 安装
212
212
 
213
- npm 包同时携带 `msdevflow` skill 和 setup 程序。标准安装只需要:
213
+ npm 包同时携带 `msdevflow` skill 和 setup 程序。首次安装:
214
214
 
215
215
  ```bash
216
216
  npx msdevflow setup
217
217
  ```
218
218
 
219
+ 后续升级无需卸载旧版本,显式使用 `@latest` 获取 npm 上的最新版:
220
+
221
+ ```bash
222
+ npx msdevflow@latest setup
223
+ ```
224
+
225
+ `setup` 是幂等的:内容一致时保持 `current`,内容不同时原子更新。
226
+
219
227
  `setup` 默认检测 PATH 中的 Claude Code、Codex 和 OpenCode,先展示客户端、物理 skill 目标、安装或更新状态、GitCode CLI 归属、registry、安装模式、Python 依赖命令和认证方式;用户确认后,在同一次运行中:
220
228
 
221
229
  1. 从 npm 包内唯一源码 `skill/msdevflow` 原子安装或更新所需受管副本;