Skip to content

Commit 3d5da8b

Browse files
committed
Run the npm run docs to up to date the documentation
1 parent 08f98e4 commit 3d5da8b

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ The Chrome DevTools MCP server supports the following configuration option:
448448
- **Default:** `true`
449449

450450
- **`--profileDirectory`/ `--profile-directory`, `-profile-dir`**
451-
Specify which Chrome profile to use by its directory name (e.g., "Profile 1", "Default"). Only works with --autoConnect or when launching Chrome.
451+
Specify which Chrome profile to use by specifying its directory name (e.g., "Profile 1", "Default") inside a chrome user data directory. Only works with --autoConnect or when launching Chrome via the Chrome DevTools MCP server.
452452
- **Type:** string
453453

454454
<!-- END AUTO GENERATED OPTIONS -->

src/browser.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function makeTargetFilter() {
4343
};
4444
}
4545

46-
//Extracts the profile directory name from a user data dir path.
46+
//Extracts the profile directory name from a user data dir path.
4747
function getProfileNameFromUserDataDir(userDataDir: string): string {
4848
const normalized = userDataDir.replace(/\\/g, '/');
4949
const parts = normalized.split('/');
@@ -139,7 +139,10 @@ export async function ensureBrowserConnected(options: {
139139
try {
140140
const portPath = path.join(options.userDataDir, 'DevToolsActivatePort');
141141
const fileContent = await fs.promises.readFile(portPath, 'utf8');
142-
const lines = fileContent.split('\n').map(line => line.trim()).filter(line => line);
142+
const lines = fileContent
143+
.split('\n')
144+
.map(line => line.trim())
145+
.filter(line => line);
143146

144147
if (lines.length >= 2) {
145148
const browserPath = lines[1];
@@ -150,7 +153,7 @@ export async function ensureBrowserConnected(options: {
150153
await browser.disconnect();
151154
throw new Error(
152155
`Profile mismatch: Requested profile "${requestedProfile}" but Chrome is running with profile "${actualProfile}". ` +
153-
`Please close Chrome and restart with the correct profile, or remove the --profile-directory flag.`
156+
`Please close Chrome and restart with the correct profile, or remove the --profile-directory flag.`,
154157
);
155158
}
156159

src/cli.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ export const cliOptions = {
200200
},
201201
profileDirectory: {
202202
type: 'string',
203-
description: 'Specify which Chrome profile to use by specifying its directory name (e.g., "Profile 1", "Default") inside a chrome user data directory. Only works with --autoConnect or when launching Chrome via the Chrome DevTools MCP server.',
203+
description:
204+
'Specify which Chrome profile to use by specifying its directory name (e.g., "Profile 1", "Default") inside a chrome user data directory. Only works with --autoConnect or when launching Chrome via the Chrome DevTools MCP server.',
204205
alias: 'profile-dir',
205206
conflicts: ['browserUrl', 'wsEndpoint'],
206207
},

0 commit comments

Comments
 (0)