@curdx/flow 7.1.0 → 7.1.1
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 +7 -1
- package/dist/index.mjs +28 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@curdx/flow` are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/) and the project follows [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
-
## 7.1.
|
|
5
|
+
## 7.1.1 — 2026-05-04
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **Windows Chrome detection in the installer's `chrome-devtools-mcp` pre-req check.** `src/registry/plugins/chrome-devtools-mcp.ts`'s `checkChrome()` previously ran `test -x /Applications/...` plus `which google-chrome` / `which chromium` on every platform — none of which work on Windows (`test` is a Unix builtin, `which` isn't on `cmd`/PowerShell PATH by default, and the macOS app-bundle path doesn't exist). Result: the installer rejected Windows machines with Chrome installed, reporting "需要本机已安装 Chrome / Requires Chrome installed locally". Detection is now per-platform, mirroring `GoogleChrome/chrome-launcher`'s `chrome-finder` strategy: on `win32`, scan `LOCALAPPDATA` / `PROGRAMFILES` / `PROGRAMFILES(X86)` for `Google\Chrome\Application\chrome.exe` and `Google\Chrome SxS\Application\chrome.exe` (Canary) via `fs.existsSync`; on `darwin`, check the canonical app-bundle path; on Linux, the existing `which` lookup. A `CHROME_PATH` env var now overrides on all platforms (matches chrome-launcher / Lighthouse convention).
|
|
10
|
+
|
|
11
|
+
|
|
6
12
|
|
|
7
13
|
### Added
|
|
8
14
|
|
package/dist/index.mjs
CHANGED
|
@@ -522,17 +522,38 @@ var claudeMem = {
|
|
|
522
522
|
var claude_mem_default = claudeMem;
|
|
523
523
|
|
|
524
524
|
// src/registry/plugins/chrome-devtools-mcp.ts
|
|
525
|
+
import { existsSync } from "fs";
|
|
526
|
+
import path2 from "path";
|
|
525
527
|
var PLUGIN_ID3 = "chrome-devtools-mcp@chrome-devtools-plugins";
|
|
526
528
|
var MARKETPLACE_NAME3 = "chrome-devtools-plugins";
|
|
527
529
|
var MARKETPLACE_SOURCE3 = "ChromeDevTools/chrome-devtools-mcp";
|
|
528
530
|
async function checkChrome() {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
531
|
+
if (process.env.CHROME_PATH && existsSync(process.env.CHROME_PATH)) return true;
|
|
532
|
+
if (process.platform === "win32") {
|
|
533
|
+
const suffixes = [
|
|
534
|
+
path2.join("Google", "Chrome SxS", "Application", "chrome.exe"),
|
|
535
|
+
path2.join("Google", "Chrome", "Application", "chrome.exe")
|
|
536
|
+
];
|
|
537
|
+
const prefixes = [
|
|
538
|
+
process.env.LOCALAPPDATA,
|
|
539
|
+
process.env.PROGRAMFILES,
|
|
540
|
+
process.env["PROGRAMFILES(X86)"]
|
|
541
|
+
].filter((p10) => Boolean(p10));
|
|
542
|
+
for (const prefix of prefixes) {
|
|
543
|
+
for (const suffix of suffixes) {
|
|
544
|
+
if (existsSync(path2.join(prefix, suffix))) return true;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return false;
|
|
548
|
+
}
|
|
549
|
+
if (process.platform === "darwin") {
|
|
550
|
+
return existsSync("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome");
|
|
551
|
+
}
|
|
552
|
+
const [viaPath, viaPathChromium] = await Promise.all([
|
|
532
553
|
run("which", ["google-chrome"]),
|
|
533
554
|
run("which", ["chromium"])
|
|
534
555
|
]);
|
|
535
|
-
return
|
|
556
|
+
return viaPath.exitCode === 0 || viaPathChromium.exitCode === 0;
|
|
536
557
|
}
|
|
537
558
|
var chromeDevtoolsMcp = {
|
|
538
559
|
id: "chrome-devtools-mcp",
|
|
@@ -713,14 +734,14 @@ function findPkg(id) {
|
|
|
713
734
|
|
|
714
735
|
// src/runner/claudeMd.ts
|
|
715
736
|
import { promises as fs2 } from "fs";
|
|
716
|
-
import
|
|
737
|
+
import path3 from "path";
|
|
717
738
|
import os2 from "os";
|
|
718
739
|
import * as p3 from "@clack/prompts";
|
|
719
740
|
var BEGIN_MARKER = "<!-- BEGIN @curdx/flow v1 -->";
|
|
720
741
|
var END_MARKER = "<!-- END @curdx/flow v1 -->";
|
|
721
742
|
var BLOCK_RE = /<!-- BEGIN @curdx\/flow v\d+[^>]*-->[\s\S]*?<!-- END @curdx\/flow v\d+ -->/;
|
|
722
743
|
function claudeMdPath() {
|
|
723
|
-
return
|
|
744
|
+
return path3.join(os2.homedir(), ".claude", "CLAUDE.md");
|
|
724
745
|
}
|
|
725
746
|
function buildCombinationPatterns(ids) {
|
|
726
747
|
const has = (k) => ids.has(k);
|
|
@@ -896,7 +917,7 @@ async function syncClaudeMd(opts) {
|
|
|
896
917
|
if (next === existing) {
|
|
897
918
|
return { status: "unchanged", path: file };
|
|
898
919
|
}
|
|
899
|
-
await fs2.mkdir(
|
|
920
|
+
await fs2.mkdir(path3.dirname(file), { recursive: true });
|
|
900
921
|
const tmp = `${file}.tmp.${process.pid}`;
|
|
901
922
|
await fs2.writeFile(tmp, next, "utf8");
|
|
902
923
|
await fs2.rename(tmp, file);
|