chrome-devtools-mcp-for-extension 0.25.3 → 0.25.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/build/src/main.js +5 -0
- package/build/src/profile-resolver.js +14 -0
- package/package.json +1 -1
package/build/src/main.js
CHANGED
|
@@ -132,6 +132,11 @@ async function getContext() {
|
|
|
132
132
|
process.env.MCP_PROJECT_ROOT ||
|
|
133
133
|
rootFromRoots ||
|
|
134
134
|
process.cwd();
|
|
135
|
+
// Debug: Log the source of project root
|
|
136
|
+
logger(`[project-root] DEBUG: args.projectRoot=${args.projectRoot}`);
|
|
137
|
+
logger(`[project-root] DEBUG: env.MCP_PROJECT_ROOT=${process.env.MCP_PROJECT_ROOT}`);
|
|
138
|
+
logger(`[project-root] DEBUG: rootFromRoots=${rootFromRoots}`);
|
|
139
|
+
logger(`[project-root] DEBUG: process.cwd()=${process.cwd()}`);
|
|
135
140
|
setProjectRoot(projectRootToSet);
|
|
136
141
|
logger(`[project-root] Initialized: ${projectRootToSet}`);
|
|
137
142
|
const browserOptions = {
|
|
@@ -223,6 +223,20 @@ export function resolveUserDataDir(opts) {
|
|
|
223
223
|
if (initializedRoot) {
|
|
224
224
|
console.error(`[profiles] Using initialized project root: "${initializedRoot}"`);
|
|
225
225
|
try {
|
|
226
|
+
// Debug: Check package.json existence
|
|
227
|
+
const pjPath = path.join(initializedRoot, 'package.json');
|
|
228
|
+
const pjExists = fs.existsSync(pjPath);
|
|
229
|
+
console.error(`[profiles] DEBUG: package.json at ${pjPath} exists=${pjExists}`);
|
|
230
|
+
if (pjExists) {
|
|
231
|
+
try {
|
|
232
|
+
const pkg = JSON.parse(fs.readFileSync(pjPath, 'utf8'));
|
|
233
|
+
console.error(`[profiles] DEBUG: package.json name="${pkg?.name}"`);
|
|
234
|
+
}
|
|
235
|
+
catch (e) {
|
|
236
|
+
console.error(`[profiles] DEBUG: package.json parse error: ${e}`);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
console.error(`[profiles] DEBUG: basename="${path.basename(initializedRoot)}"`);
|
|
226
240
|
const name = detectProjectName(initializedRoot);
|
|
227
241
|
console.error(`[profiles] Initialized root name="${name}"`);
|
|
228
242
|
// v0.25.0: Check profiles in priority order
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-devtools-mcp-for-extension",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.4",
|
|
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": "./scripts/cli.mjs",
|