mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2026-02-04 21:23:09 +00:00
chore: mark v0.0.63 (#1365)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Playwright MCP Bridge",
|
||||
"version": "0.0.61",
|
||||
"version": "0.0.63",
|
||||
"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": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@playwright/mcp-extension",
|
||||
"version": "0.0.62",
|
||||
"version": "0.0.63",
|
||||
"description": "Playwright MCP Browser Extension",
|
||||
"private": true,
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "playwright-cli",
|
||||
"version": "0.0.62",
|
||||
"version": "0.0.63",
|
||||
"description": "Playwright CLI",
|
||||
"repository": "github:Microsoft/playwright-cli",
|
||||
"homepage": "https://playwright.dev",
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@playwright/cli": "0.0.61"
|
||||
"@playwright/cli": "0.0.63"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@playwright/cli",
|
||||
"version": "0.0.62",
|
||||
"version": "0.0.63",
|
||||
"description": "Playwright CLI",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -17,12 +17,12 @@
|
||||
"scripts": {
|
||||
"lint": "echo OK",
|
||||
"build": "echo OK",
|
||||
"test": "echo OK"
|
||||
"test": "playwright test"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.5",
|
||||
"playwright": "1.59.0-alpha-1769819922000",
|
||||
"playwright-core": "1.59.0-alpha-1769819922000"
|
||||
"playwright": "1.59.0-alpha-1770157258000",
|
||||
"playwright-core": "1.59.0-alpha-1770157258000"
|
||||
},
|
||||
"bin": {
|
||||
"playwright-cli": "playwright-cli.js"
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
const { program } = require('playwright/lib/mcp/terminal/program');
|
||||
const packageJSON = require('./package.json');
|
||||
program({ version: packageJSON.version }).catch(e => {
|
||||
const packageLocation = require.resolve('./package.json');
|
||||
program(packageLocation).catch(e => {
|
||||
console.error(e.message);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
25
packages/playwright-cli/playwright.config.ts
Normal file
25
packages/playwright-cli/playwright.config.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { defineConfig } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './tests',
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
workers: process.env.CI ? 2 : undefined,
|
||||
reporter: 'list',
|
||||
});
|
||||
72
packages/playwright-cli/tests/integration.spec.ts
Normal file
72
packages/playwright-cli/tests/integration.spec.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import { spawn } from 'child_process';
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
type CliResult = {
|
||||
output: string;
|
||||
error: string;
|
||||
exitCode: number | null;
|
||||
};
|
||||
|
||||
async function runCli(...args: string[]): Promise<CliResult> {
|
||||
const cliPath = path.join(__dirname, '../playwright-cli.js');
|
||||
|
||||
return new Promise<CliResult>((resolve, reject) => {
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
|
||||
const childProcess = spawn(process.execPath, [cliPath, ...args], {
|
||||
env: {
|
||||
...process.env,
|
||||
PLAYWRIGHT_CLI_INSTALLATION_FOR_TEST: test.info().outputPath(),
|
||||
},
|
||||
cwd: test.info().outputPath(),
|
||||
});
|
||||
|
||||
childProcess.stdout?.on('data', (data) => {
|
||||
stdout += data.toString();
|
||||
});
|
||||
|
||||
childProcess.stderr?.on('data', (data) => {
|
||||
stderr += data.toString();
|
||||
});
|
||||
|
||||
childProcess.on('close', (code) => {
|
||||
resolve({
|
||||
output: stdout.trim(),
|
||||
error: stderr.trim(),
|
||||
exitCode: code,
|
||||
});
|
||||
});
|
||||
|
||||
childProcess.on('error', reject);
|
||||
});
|
||||
}
|
||||
|
||||
test('open data URL', async ({}) => {
|
||||
expect(await runCli('open', 'data:text/html,hello')).toEqual(expect.objectContaining({
|
||||
output: expect.stringContaining('hello'),
|
||||
exitCode: 0,
|
||||
}));
|
||||
|
||||
expect(await runCli('session-delete')).toEqual(expect.objectContaining({
|
||||
output: expect.stringContaining('Deleted user data for session'),
|
||||
exitCode: 0,
|
||||
}));
|
||||
});
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@playwright/mcp",
|
||||
"version": "0.0.62",
|
||||
"version": "0.0.63",
|
||||
"description": "Playwright Tools for MCP",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -34,8 +34,8 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright": "1.59.0-alpha-1769819922000",
|
||||
"playwright-core": "1.59.0-alpha-1769819922000"
|
||||
"playwright": "1.59.0-alpha-1770157258000",
|
||||
"playwright-core": "1.59.0-alpha-1770157258000"
|
||||
},
|
||||
"bin": {
|
||||
"playwright-mcp": "cli.js"
|
||||
|
||||
Reference in New Issue
Block a user