Compare commits

...

2 Commits

Author SHA1 Message Date
Pavel Feldman
0fcb25d118 chore: mark v0.0.49 (#1232) 2025-11-30 11:28:12 -08:00
Simon Knott
f4df37ca71 chore: generate config section from config.d.ts (#1224) 2025-11-28 15:38:42 -08:00
8 changed files with 71 additions and 28 deletions

View File

@@ -8,12 +8,12 @@
"source": "github"
},
"websiteUrl": "https://github.com/microsoft/playwright-mcp",
"version": "0.0.48",
"version": "0.0.49",
"packages": [
{
"registryType": "npm",
"identifier": "@playwright/mcp",
"version": "0.0.48",
"version": "0.0.49",
"transport": {
"type": "stdio"
}

View File

@@ -451,6 +451,8 @@ npx @playwright/mcp@latest --config path/to/config.json
<details>
<summary>Configuration file schema</summary>
<!--- Config generated by update-readme.js -->
```typescript
{
/**
@@ -576,6 +578,18 @@ npx @playwright/mcp@latest --config path/to/config.json
*/
outputDir?: string;
network?: {
/**
* List of origins to allow the browser to request. Default is to allow all. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
*/
allowedOrigins?: string[];
/**
* List of origins to block the browser to request. Origins matching both `allowedOrigins` and `blockedOrigins` will be blocked.
*/
blockedOrigins?: string[];
};
/**
* Specify the attribute to use for test ids, defaults to "data-testid".
*/
@@ -597,8 +611,11 @@ npx @playwright/mcp@latest --config path/to/config.json
* Whether to send image responses to the client. Can be "allow", "omit", or "auto". Defaults to "auto", which sends images if the client can display them.
*/
imageResponses?: 'allow' | 'omit';
};
}
```
<!--- End of config generated section -->
</details>
### Standalone MCP server

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Playwright MCP Bridge",
"version": "0.0.48",
"version": "0.0.49",
"description": "Share browser tabs with Playwright MCP server",
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9nMS2b0WCohjVHPGb8D9qAdkbIngDqoAjTeSccHJijgcONejge+OJxOQOMLu7b0ovt1c9BiEJa5JcpM+EHFVGL1vluBxK71zmBy1m2f9vZF3HG0LSCp7YRkum9rAIEthDwbkxx6XTvpmAY5rjFa/NON6b9Hlbo+8peUSkoOK7HTwYnnI36asZ9eUTiveIf+DMPLojW2UX33vDWG2UKvMVDewzclb4+uLxAYshY7Mx8we/b44xu+Anb/EBLKjOPk9Yh541xJ5Ozc8EiP/5yxOp9c/lRiYUHaRW+4r0HKZyFt0eZ52ti2iM4Nfk7jRXR7an3JPsUIf5deC/1cVM/+1ZQIDAQAB",
"permissions": [

View File

@@ -1,12 +1,12 @@
{
"name": "@playwright/mcp-extension",
"version": "0.0.48",
"version": "0.0.49",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@playwright/mcp-extension",
"version": "0.0.48",
"version": "0.0.49",
"license": "Apache-2.0",
"devDependencies": {
"@types/chrome": "^0.0.315",

View File

@@ -1,6 +1,6 @@
{
"name": "@playwright/mcp-extension",
"version": "0.0.48",
"version": "0.0.49",
"description": "Playwright MCP Browser Extension",
"private": true,
"repository": {

32
package-lock.json generated
View File

@@ -1,23 +1,23 @@
{
"name": "@playwright/mcp",
"version": "0.0.48",
"version": "0.0.49",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@playwright/mcp",
"version": "0.0.48",
"version": "0.0.49",
"license": "Apache-2.0",
"dependencies": {
"playwright": "1.58.0-alpha-1763757971000",
"playwright-core": "1.58.0-alpha-1763757971000"
"playwright": "1.58.0-alpha-2025-11-30",
"playwright-core": "1.58.0-alpha-2025-11-30"
},
"bin": {
"mcp-server-playwright": "cli.js"
},
"devDependencies": {
"@modelcontextprotocol/sdk": "^1.17.5",
"@playwright/test": "1.58.0-alpha-1763757971000",
"@playwright/test": "1.58.0-alpha-2025-11-30",
"@types/node": "^24.3.0",
"zod-to-json-schema": "^3.24.6"
},
@@ -50,13 +50,13 @@
}
},
"node_modules/@playwright/test": {
"version": "1.58.0-alpha-1763757971000",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.58.0-alpha-1763757971000.tgz",
"integrity": "sha512-7qItUHqUH9dOaLvydEZuE3+pfXa/BHzAlrG0XlVWUL5xo//7xKNtj6qjyQKvR/bUySofT7PmFJGP6EUHKaV9UQ==",
"version": "1.58.0-alpha-2025-11-30",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.58.0-alpha-2025-11-30.tgz",
"integrity": "sha512-9E+WsHsV8x3Xw+m4Sw2k1+mR9umfJHb3AFl9gdouMyTB2UsS6Cavo/KLcugottf+lI0nxXC72n+U/R/8xKrsFw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"playwright": "1.58.0-alpha-1763757971000"
"playwright": "1.58.0-alpha-2025-11-30"
},
"bin": {
"playwright": "cli.js"
@@ -825,12 +825,12 @@
}
},
"node_modules/playwright": {
"version": "1.58.0-alpha-1763757971000",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.0-alpha-1763757971000.tgz",
"integrity": "sha512-Ck2UJWEaHULTN2hSjdcCpYF3wd5R8gde3IGRhms8Fb9YpqKHRiAzQqnlmouPlSh5pF+Mg9aZTtrtjq3NeIiXkQ==",
"version": "1.58.0-alpha-2025-11-30",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.58.0-alpha-2025-11-30.tgz",
"integrity": "sha512-dzAIbd9MED4dQsPM6leA9rhKEXBf8L7mf+/CgYTeOrDuGNCznEr4PYQSvGPviLfiVyLFPpnPur1N0bVu8ZgJww==",
"license": "Apache-2.0",
"dependencies": {
"playwright-core": "1.58.0-alpha-1763757971000"
"playwright-core": "1.58.0-alpha-2025-11-30"
},
"bin": {
"playwright": "cli.js"
@@ -843,9 +843,9 @@
}
},
"node_modules/playwright-core": {
"version": "1.58.0-alpha-1763757971000",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.0-alpha-1763757971000.tgz",
"integrity": "sha512-4nN53aSvtlz05uFtHn4+PABtZba8Z+jJKLRbPF0+mmoLfD2n9hAGZbvvrVy+iKmoUEvsHbKOBZCJ2NlKjIzZ9w==",
"version": "1.58.0-alpha-2025-11-30",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.58.0-alpha-2025-11-30.tgz",
"integrity": "sha512-Fp4yazc8jiZsMTMMfNIstrIEW3koKsQWjbvDlzir+r6TctZHV/ZGqaxBN+Bbaoqkd1EsR1+Q7wGdwMZh3aP7XQ==",
"license": "Apache-2.0",
"bin": {
"playwright-core": "cli.js"

View File

@@ -1,6 +1,6 @@
{
"name": "@playwright/mcp",
"version": "0.0.48",
"version": "0.0.49",
"description": "Playwright Tools for MCP",
"mcpName": "com.microsoft/playwright-mcp",
"repository": {
@@ -38,15 +38,15 @@
}
},
"dependencies": {
"playwright": "1.58.0-alpha-1763757971000",
"playwright-core": "1.58.0-alpha-1763757971000"
"playwright": "1.58.0-alpha-2025-11-30",
"playwright-core": "1.58.0-alpha-2025-11-30"
},
"bin": {
"mcp-server-playwright": "cli.js"
},
"devDependencies": {
"@modelcontextprotocol/sdk": "^1.17.5",
"@playwright/test": "1.58.0-alpha-1763757971000",
"@playwright/test": "1.58.0-alpha-2025-11-30",
"@types/node": "^24.3.0",
"zod-to-json-schema": "^3.24.6"
}

View File

@@ -135,12 +135,38 @@ async function updateOptions(content) {
]);
}
/**
* @param {string} content
* @returns {Promise<string>}
*/
async function updateConfig(content) {
console.log('Updating config schema from config.d.ts...');
const configPath = path.join(__dirname, 'config.d.ts');
const configContent = await fs.promises.readFile(configPath, 'utf-8');
// Extract the Config type definition
const configTypeMatch = configContent.match(/export type Config = (\{[\s\S]*?\n\});/);
if (!configTypeMatch)
throw new Error('Config type not found in config.d.ts');
const configType = configTypeMatch[1]; // Use capture group to get just the object definition
const startMarker = `<!--- Config generated by ${path.basename(__filename)} -->`;
const endMarker = `<!--- End of config generated section -->`;
return updateSection(content, startMarker, endMarker, [
'```typescript',
configType,
'```',
]);
}
async function updateReadme() {
const readmePath = path.join(__dirname, 'README.md');
const readmeContent = await fs.promises.readFile(readmePath, 'utf-8');
const withTools = await updateTools(readmeContent);
const withOptions = await updateOptions(withTools);
await fs.promises.writeFile(readmePath, withOptions, 'utf-8');
const withConfig = await updateConfig(withOptions);
await fs.promises.writeFile(readmePath, withConfig, 'utf-8');
console.log('README updated successfully');
}