@yezack/chrome-devtools-mcp-108 1.10.3 → 1.10.4
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/FORK-NOTICE.md +12 -1
- package/build/src/utils/check-for-updates.js +15 -2
- package/build/src/version.js +1 -1
- package/package.json +1 -1
package/FORK-NOTICE.md
CHANGED
|
@@ -13,7 +13,8 @@ Base: upstream tag `chrome-devtools-mcp-v1.10.1` (puppeteer-core 25.11.0),
|
|
|
13
13
|
taken from the published npm tarball.
|
|
14
14
|
|
|
15
15
|
Modified files: `build/src/third_party/index.js` (one code path, plus one
|
|
16
|
-
helper appended to the same module)
|
|
16
|
+
helper appended to the same module), `build/src/BrowserManager.js` and
|
|
17
|
+
`build/src/utils/check-for-updates.js`.
|
|
17
18
|
|
|
18
19
|
### 1. Page discovery on Chrome 108-110
|
|
19
20
|
|
|
@@ -51,6 +52,16 @@ applied as a destructuring default rather than a yargs default, so
|
|
|
51
52
|
`--user-data-dir <path>` still wins the conflict resolution. `--no-isolated`
|
|
52
53
|
restores the upstream behaviour.
|
|
53
54
|
|
|
55
|
+
### 3. Update-check cache location
|
|
56
|
+
|
|
57
|
+
The update check cached the latest version in a hardcoded
|
|
58
|
+
`$HOME/.cache/chrome-devtools-mcp/latest.json` (20 bytes), independent of the
|
|
59
|
+
profile setting, so a read-only home still received a write attempt on every
|
|
60
|
+
start. It now picks the first writable directory out of
|
|
61
|
+
`$HOME/.cache/chrome-devtools-mcp` and `$TMPDIR/chrome-devtools-mcp`: normal
|
|
62
|
+
hosts keep the upstream location, read-only homes fall back to the OS temp
|
|
63
|
+
directory. `CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1` skips the check entirely.
|
|
64
|
+
|
|
54
65
|
Verified against Chromium 108.0.5351.0 (snapshot r1056772) and
|
|
55
66
|
Chrome 154.0.8037.99.
|
|
56
67
|
|
|
@@ -24,7 +24,7 @@ export async function checkForUpdates(message) {
|
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
isChecking = true;
|
|
27
|
-
const cachePath = path.join(os.homedir(), '.cache', 'chrome-devtools-mcp', 'latest.json');
|
|
27
|
+
const cachePath = path.join(await __dshWritableDir([path.join(os.homedir(), '.cache', 'chrome-devtools-mcp'), path.join(os.tmpdir(), 'chrome-devtools-mcp')]), 'latest.json');
|
|
28
28
|
let cachedVersion;
|
|
29
29
|
let stats;
|
|
30
30
|
try {
|
|
@@ -72,4 +72,17 @@ export async function checkForUpdates(message) {
|
|
|
72
72
|
// Fail silently in case of any errors.
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
//# sourceMappingURL=check-for-updates.js.map
|
|
75
|
+
//# sourceMappingURL=check-for-updates.js.map
|
|
76
|
+
|
|
77
|
+
async function __dshWritableDir(candidates) {
|
|
78
|
+
for (const dir of candidates) {
|
|
79
|
+
try {
|
|
80
|
+
await fs.mkdir(dir, {recursive: true});
|
|
81
|
+
return dir;
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// Not writable (for example a read-only home directory).
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return candidates[candidates.length - 1];
|
|
88
|
+
}
|
package/build/src/version.js
CHANGED
package/package.json
CHANGED