chrome-devtools-mcp-for-extension 0.6.1 → 0.6.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/build/src/cli.js +1 -22
- package/package.json +1 -1
package/build/src/cli.js
CHANGED
|
@@ -3,19 +3,8 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import os from 'node:os';
|
|
7
|
-
import path from 'node:path';
|
|
8
6
|
import yargs from 'yargs';
|
|
9
7
|
import { hideBin } from 'yargs/helpers';
|
|
10
|
-
// Auto-detection functions for zero-config setup
|
|
11
|
-
function getDefaultUserDataDir() {
|
|
12
|
-
return path.join(os.homedir(), '.cache', 'chrome-devtools-mcp', 'chrome-profile');
|
|
13
|
-
}
|
|
14
|
-
function getDefaultExtensionsDir() {
|
|
15
|
-
// Disabled automatic detection of ./extensions folder
|
|
16
|
-
// Users should explicitly use --loadExtension or --loadExtensionsDir flags
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
8
|
export const cliOptions = {
|
|
20
9
|
browserUrl: {
|
|
21
10
|
type: 'string',
|
|
@@ -90,22 +79,12 @@ export function parseArguments(version, argv = process.argv) {
|
|
|
90
79
|
if (!args.channel && !args.browserUrl && !args.executablePath) {
|
|
91
80
|
args.channel = 'stable';
|
|
92
81
|
}
|
|
93
|
-
// Don't set userDataDir here - let browser.ts handle auto-detection
|
|
94
|
-
// This allows browser.ts to detect and use the system Chrome profile
|
|
95
|
-
// Auto-detect extensions directory if not specified
|
|
96
|
-
if (!args.loadExtensionsDir && !args.browserUrl) {
|
|
97
|
-
const autoExtensionsDir = getDefaultExtensionsDir();
|
|
98
|
-
if (autoExtensionsDir) {
|
|
99
|
-
args.loadExtensionsDir = autoExtensionsDir;
|
|
100
|
-
console.error(`🔧 Auto-detected extensions directory: ${autoExtensionsDir}`);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
82
|
return true;
|
|
104
83
|
})
|
|
105
84
|
.example([
|
|
106
85
|
[
|
|
107
86
|
'$0',
|
|
108
|
-
'Zero-config startup: auto-detects
|
|
87
|
+
'Zero-config startup: auto-detects profile and bookmarks',
|
|
109
88
|
],
|
|
110
89
|
[
|
|
111
90
|
'$0 --browserUrl http://127.0.0.1:9222',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-devtools-mcp-for-extension",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "MCP server for Chrome extension development with Web Store automation. Fork of chrome-devtools-mcp with extension-specific tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./build/src/index.js",
|