diff --git a/.vscode/launch.json b/.vscode/launch.json index 5cc1c9a526d..08cf41ccf2b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -119,16 +119,16 @@ ] }, { - "name": "Launch Playwright on Codespaces VS Code Extension", + "name": "Launch Playwright Local Browser Server VS Code Extension", "type": "extensionHost", "request": "launch", - "cwd": "${workspaceFolder}/vscode-extensions/playwright-on-codespaces-vscode-extension/dist/vsix/unpacked", + "cwd": "${workspaceFolder}/vscode-extensions/playwright-local-browser-server-vscode-extension/dist/vsix/unpacked", "args": [ - "--extensionDevelopmentPath=${workspaceFolder}/vscode-extensions/playwright-on-codespaces-vscode-extension/dist/vsix/unpacked" + "--extensionDevelopmentPath=${workspaceFolder}/vscode-extensions/playwright-local-browser-server-vscode-extension/dist/vsix/unpacked" ], "sourceMaps": true, "outFiles": [ - "${workspaceFolder}/vscode-extensions/playwright-on-codespaces-vscode-extension/**/*.js" + "${workspaceFolder}/vscode-extensions/playwright-local-browser-server-vscode-extension/**/*.js" ] } ] diff --git a/README.md b/README.md index dbd56229562..f02752f9405 100644 --- a/README.md +++ b/README.md @@ -234,7 +234,7 @@ These GitHub repositories provide supplementary resources for Rush Stack: | [/rigs/local-web-rig](./rigs/local-web-rig/) | A rig package for Web projects that build using Heft inside the RushStack repository. | | [/rush-plugins/rush-litewatch-plugin](./rush-plugins/rush-litewatch-plugin/) | An experimental alternative approach for multi-project watch mode | | [/vscode-extensions/debug-certificate-manager-vscode-extension](./vscode-extensions/debug-certificate-manager-vscode-extension/) | VS Code extension to manage debug TLS certificates and sync them to the VS Code workspace. Works with VS Code remote development (Codespaces, SSH, Dev Containers, WSL, VS Code Tunnels). | -| [/vscode-extensions/playwright-on-codespaces-vscode-extension](./vscode-extensions/playwright-on-codespaces-vscode-extension/) | VS Code extension to enable Playwright testing in GitHub Codespaces. | +| [/vscode-extensions/playwright-local-browser-server-vscode-extension](./vscode-extensions/playwright-local-browser-server-vscode-extension/) | VS Code extension to enable Playwright testing in remote VS Code environments (such as Codespaces, Dev Containers, VS Code Tunnels) while launching and driving the actual browser process on your local machine. | | [/vscode-extensions/rush-vscode-command-webview](./vscode-extensions/rush-vscode-command-webview/) | Part of the Rush Stack VSCode extension, provides a UI for invoking Rush commands | | [/vscode-extensions/rush-vscode-extension](./vscode-extensions/rush-vscode-extension/) | Enhanced experience for monorepos that use the Rush Stack toolchain | | [/vscode-extensions/vscode-shared](./vscode-extensions/vscode-shared/) | | diff --git a/apps/playwright-browser-tunnel/README.md b/apps/playwright-browser-tunnel/README.md index a06c0b31923..5bbcc9ded3c 100644 --- a/apps/playwright-browser-tunnel/README.md +++ b/apps/playwright-browser-tunnel/README.md @@ -5,25 +5,25 @@ Run a Playwright browser server in one environment and drive it from another env This package is intended for remote development / CI scenarios (for example: Codespaces, devcontainers, or a separate “browser host” machine) where you want tests to run “here” but the actual browser process to run “there”. -## Relationship to the Playwright on Codespaces VS Code extension +## Relationship to the Playwright Local Browser Server VS Code extension -This package is the core tunneling/runtime layer used by the **Playwright on Codespaces** VS Code extension (located at [vscode-extensions/playwright-on-codespaces-vscode-extension](../../vscode-extensions/playwright-on-codespaces-vscode-extension)). +This package is the core tunneling/runtime layer used by the **Playwright Local Browser Server** VS Code extension (located at [vscode-extensions/playwright-local-browser-server-vscode-extension](../../vscode-extensions/playwright-local-browser-server-vscode-extension)). In a typical Codespaces workflow: - Your **tests** run inside the Codespace and call `tunneledBrowserConnection()`. -- `tunneledBrowserConnection()` starts a WebSocket server (by default on port `3000`) that a browser host can attach to. -- The VS Code extension runs on the **UI side** and starts a `PlaywrightTunnel` which connects to `ws://127.0.0.1:3000`. - - In Codespaces, this works when port `3000` is forwarded to your local machine (VS Code port forwarding makes the remote port reachable as `localhost:3000`). +- `tunneledBrowserConnection()` starts a WebSocket server (by default on port `56767`) that a browser host can attach to. +- The VS Code extension runs on the **UI side** and starts a `PlaywrightTunnel` which connects to `ws://127.0.0.1:56767`. + - In Codespaces, this works when port `56767` is forwarded to your local machine (VS Code port forwarding makes the remote port reachable as `localhost:56767`). - Once connected, the extension hosts the actual Playwright browser process locally, while your tests continue to run remotely. The extension provides a UI wrapper around this library (start/stop commands, status bar state, and logs), while `@rushstack/playwright-browser-tunnel` provides the underlying protocol forwarding and browser lifecycle management. ### Detecting whether the VS Code extension is present -Some remote test fixtures want to detect whether the **Playwright on Codespaces** extension is installed/active (for example, to skip local-browser-only scenarios when the extension isn’t available). +Some remote test fixtures want to detect whether the **Playwright Local Browser Server** extension is installed/active (for example, to skip local-browser-only scenarios when the extension isn’t available). -The extension writes a marker file named `.playwright-codespaces-extension-installed.txt` into the remote environment’s `os.tmpdir()` using VS Code’s remote filesystem APIs. +The extension writes a marker file named `.playwright-local-browser-server-extension-installed.txt` into the remote environment’s `os.tmpdir()` using VS Code’s remote filesystem APIs. On the remote side, `isExtensionInstalledAsync()` checks for that marker file and returns `true` if it exists: @@ -31,7 +31,7 @@ On the remote side, `isExtensionInstalledAsync()` checks for that marker file an import { isExtensionInstalledAsync } from '@rushstack/playwright-browser-tunnel'; if (!(await isExtensionInstalledAsync())) { - throw new Error('Playwright on Codespaces extension is not installed/active in this environment'); + throw new Error('Playwright Local Browser Server extension is not installed/active in this environment'); } ``` @@ -76,7 +76,7 @@ const terminal = new Terminal(terminalProvider); const tunnel = new PlaywrightTunnel({ mode: 'wait-for-incoming-connection', - listenPort: 3000, + listenPort: 56767, tmpPath: path.join(os.tmpdir(), 'playwright-browser-tunnel'), terminal, onStatusChange: (status) => terminal.writeLine(`status: ${status}`) @@ -97,7 +97,7 @@ Use `tunneledBrowserConnection()` in the environment where your tests run. It starts: -- a **remote** WebSocket server (port `3000`) that the browser host connects to +- a **remote** WebSocket server (port `56767`) that the browser host connects to - a **local** WebSocket endpoint (random port) that your Playwright client connects to ```ts diff --git a/apps/playwright-browser-tunnel/playwright.config.ts b/apps/playwright-browser-tunnel/playwright.config.ts index 2b1968dd3d7..5d826145aa7 100644 --- a/apps/playwright-browser-tunnel/playwright.config.ts +++ b/apps/playwright-browser-tunnel/playwright.config.ts @@ -13,7 +13,7 @@ export default defineConfig({ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ - // baseURL: 'http://localhost:3000', + // baseURL: 'http://localhost:56767', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on' diff --git a/apps/playwright-browser-tunnel/src/tunneledBrowserConnection.ts b/apps/playwright-browser-tunnel/src/tunneledBrowserConnection.ts index 6eec884e5bd..a08b6eeff72 100644 --- a/apps/playwright-browser-tunnel/src/tunneledBrowserConnection.ts +++ b/apps/playwright-browser-tunnel/src/tunneledBrowserConnection.ts @@ -26,7 +26,7 @@ interface IHandshakeAck { action: 'handshakeAck'; } -const DEFAULT_LISTEN_PORT: number = 3000; +const DEFAULT_LISTEN_PORT: number = 56767; /** * Disposable handle returned by {@link tunneledBrowserConnection}. diff --git a/apps/playwright-browser-tunnel/src/utilities.ts b/apps/playwright-browser-tunnel/src/utilities.ts index a53ec043fce..f186a6ffe65 100644 --- a/apps/playwright-browser-tunnel/src/utilities.ts +++ b/apps/playwright-browser-tunnel/src/utilities.ts @@ -6,18 +6,19 @@ import { tmpdir } from 'node:os'; import { FileSystem } from '@rushstack/node-core-library'; /** - * The filename used to indicate that the Playwright on Codespaces extension is installed. + * The filename used to indicate that the Playwright Local Browser Server extension is installed. * @beta */ -export const EXTENSION_INSTALLED_FILENAME: string = '.playwright-codespaces-extension-installed.txt'; +export const EXTENSION_INSTALLED_FILENAME: string = + '.playwright-local-browser-server-extension-installed.txt'; /** - * Helper to determine if the Playwright on Codespaces extension is installed. This check's for the + * Helper to determine if the Playwright Local Browser Server extension is installed. This checks for the * existence of a well-known file in the OS temp directory. * @beta */ export async function isExtensionInstalledAsync(): Promise { - // Read file from os.tempdir() + '/.playwright-codespaces-extension-installed' + // Read file from os.tempdir() + '/.playwright-local-browser-server-extension-installed' const tempDir: string = tmpdir(); const extensionInstalledFilePath: string = `${tempDir}/${EXTENSION_INSTALLED_FILENAME}`; diff --git a/common/changes/@rushstack/playwright-browser-tunnel/copilot-rebrand-playwright-codespaces_2026-01-30-20-19.json b/common/changes/@rushstack/playwright-browser-tunnel/copilot-rebrand-playwright-codespaces_2026-01-30-20-19.json new file mode 100644 index 00000000000..8cc2dd09d48 --- /dev/null +++ b/common/changes/@rushstack/playwright-browser-tunnel/copilot-rebrand-playwright-codespaces_2026-01-30-20-19.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/playwright-browser-tunnel", + "comment": "Update marker file names to reflect Copilot rebranding", + "type": "minor" + } + ], + "packageName": "@rushstack/playwright-browser-tunnel" +} \ No newline at end of file diff --git a/common/config/azure-pipelines/vscode-extension-publish.yaml b/common/config/azure-pipelines/vscode-extension-publish.yaml index 365d0e75020..eb86e742ae9 100644 --- a/common/config/azure-pipelines/vscode-extension-publish.yaml +++ b/common/config/azure-pipelines/vscode-extension-publish.yaml @@ -17,6 +17,11 @@ parameters: vsixPath: 'extension.vsix' manifestPath: 'extension.signature.manifest' projectPath: '$(Build.SourcesDirectory)/vscode-extensions/debug-certificate-manager-vscode-extension' + - key: 'playwright-local-browser-server-vscode-extension' + projectRelativeAssetsDir: dist/vsix + vsixPath: 'extension.vsix' + manifestPath: 'extension.signature.manifest' + projectPath: '$(Build.SourcesDirectory)/vscode-extensions/playwright-local-browser-server-vscode-extension' - key: 'rush-vscode-extension' projectRelativeAssetsDir: dist/vsix vsixPath: 'extension.vsix' diff --git a/common/config/subspaces/default/pnpm-lock.yaml b/common/config/subspaces/default/pnpm-lock.yaml index 1f548223a28..4fbb53f153d 100644 --- a/common/config/subspaces/default/pnpm-lock.yaml +++ b/common/config/subspaces/default/pnpm-lock.yaml @@ -5189,7 +5189,7 @@ importers: specifier: 1.18.8 version: 1.18.8 - ../../../vscode-extensions/playwright-on-codespaces-vscode-extension: + ../../../vscode-extensions/playwright-local-browser-server-vscode-extension: dependencies: '@rushstack/node-core-library': specifier: workspace:* diff --git a/rush.json b/rush.json index 12aee249709..ab816fc21f5 100644 --- a/rush.json +++ b/rush.json @@ -1478,8 +1478,8 @@ "tags": ["vsix"] }, { - "packageName": "playwright-on-codespaces", - "projectFolder": "vscode-extensions/playwright-on-codespaces-vscode-extension", + "packageName": "playwright-local-browser-server", + "projectFolder": "vscode-extensions/playwright-local-browser-server-vscode-extension", "reviewCategory": "vscode-extensions", "tags": ["vsix"] }, diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/.npmignore b/vscode-extensions/playwright-local-browser-server-vscode-extension/.npmignore similarity index 100% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/.npmignore rename to vscode-extensions/playwright-local-browser-server-vscode-extension/.npmignore diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/.vscodeignore b/vscode-extensions/playwright-local-browser-server-vscode-extension/.vscodeignore similarity index 100% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/.vscodeignore rename to vscode-extensions/playwright-local-browser-server-vscode-extension/.vscodeignore diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/LICENSE b/vscode-extensions/playwright-local-browser-server-vscode-extension/LICENSE similarity index 97% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/LICENSE rename to vscode-extensions/playwright-local-browser-server-vscode-extension/LICENSE index 71e4fb5cb8d..abe0b832913 100644 --- a/vscode-extensions/playwright-on-codespaces-vscode-extension/LICENSE +++ b/vscode-extensions/playwright-local-browser-server-vscode-extension/LICENSE @@ -1,4 +1,4 @@ -playwright-on-codespaces +playwright-local-browser-server Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/README.md b/vscode-extensions/playwright-local-browser-server-vscode-extension/README.md similarity index 70% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/README.md rename to vscode-extensions/playwright-local-browser-server-vscode-extension/README.md index 2869e1fc8b6..a6c8e029918 100644 --- a/vscode-extensions/playwright-on-codespaces-vscode-extension/README.md +++ b/vscode-extensions/playwright-local-browser-server-vscode-extension/README.md @@ -1,4 +1,4 @@ -# Playwright on Codespaces VS Code Extension +# Playwright Local Browser Server VS Code Extension Enables running Playwright tests in a remote VS Code environment (such as GitHub Codespaces) while launching and driving the actual browser process on your local machine. @@ -6,7 +6,7 @@ This extension is a UI wrapper around the tunneling/runtime library [`@rushstack ## How it works -- Remote side (Codespace): your Playwright test fixture starts a WebSocket **tunnel server** on a well-known port (default `3000`) and a small local HTTP endpoint used by the Playwright client. +- Remote side (Codespace): your Playwright test fixture starts a WebSocket **tunnel server** on a well-known port (default `56767`) and a small local HTTP endpoint used by the Playwright client. - Local side (your VS Code UI machine): this extension starts a `PlaywrightTunnel` in `poll-connection` mode and connects to the forwarded tunnel port. - After a handshake (browser type, launch options, Playwright version), the extension installs the requested Playwright/browser as needed, launches a local `browserServer`, and begins bidirectional forwarding. @@ -42,7 +42,7 @@ export const test = base.extend({ ## How `extensionIsInstalled()` works with this extension -To help remote test code detect whether this extension is installed/active, the extension writes a marker file named `.playwright-codespaces-extension-installed.txt` into the remote environment’s `os.tmpdir()` when VS Code is connected to a remote workspace. +To help remote test code detect whether this extension is installed/active, the extension writes a marker file named `.playwright-local-browser-server-extension-installed.txt` into the remote environment’s `os.tmpdir()` when VS Code is connected to a remote workspace. On the test (remote) side, you can call `extensionIsInstalled()` from `@rushstack/playwright-browser-tunnel`, which simply checks for that marker file: @@ -51,7 +51,7 @@ import { extensionIsInstalled } from '@rushstack/playwright-browser-tunnel'; if (!(await extensionIsInstalled())) { throw new Error( - 'Playwright on Codespaces VS Code extension not detected. Install/enable it and ensure VS Code is connected to the remote workspace.' + 'Playwright Local Browser Server VS Code extension not detected. Install/enable it and ensure VS Code is connected to the remote workspace.' ); } ``` @@ -125,18 +125,20 @@ sequenceDiagram This extension contributes the following commands: -- **Playwright: Start Playwright Browser Tunnel** (`playwright-tunnel.start`) -- **Playwright: Stop Playwright Browser Tunnel** (`playwright-tunnel.stop`) -- **Playwright on Codespaces: Show Log** (`playwright-tunnel.showLog`) -- **Playwright on Codespaces: Show Settings** (`playwright-tunnel.showSettings`) -- **Playwright on Codespaces: Show Tunnel Menu** (`playwright-tunnel.showMenu`) — status bar menu +- **Playwright: Start Playwright Browser Tunnel** (`playwright-local-browser-server.start`) +- **Playwright: Stop Playwright Browser Tunnel** (`playwright-local-browser-server.stop`) +- **Playwright Local Browser Server: Manage Launch Options Allowlist** (`playwright-local-browser-server.manageAllowlist`) +- **Playwright Local Browser Server: Show Log** (`playwright-local-browser-server.showLog`) +- **Playwright Local Browser Server: Show Settings** (`playwright-local-browser-server.showSettings`) +- **Playwright Local Browser Server: Show Tunnel Menu** (`playwright-local-browser-server.showMenu`) — status bar menu ## Settings -- `playwright-tunnel.autoStart` (default: `true`) — automatically starts the tunnel when the extension activates. -- `playwright-tunnel.tunnelPort` (default: `3000`) — port used by the remote tunnel server. +- `playwright-local-browser-server.autoStart` (default: `false`) — automatically starts the tunnel when the extension activates. +- `playwright-local-browser-server.promptBeforeLaunch` (default: `true`) — show a confirmation prompt before launching the browser server with the requested launch options. This helps protect against potentially malicious launch options from compromised environments. +- `playwright-local-browser-server.tunnelPort` (default: `56767`) — port used by the remote tunnel server. ## Notes -- The extension currently connects to `ws://127.0.0.1:3000` on the local machine. In Codespaces, make sure the remote port is forwarded so it is reachable as `localhost` from your VS Code UI environment. +- The extension currently connects to `ws://127.0.0.1:56767` on the local machine. In Codespaces, make sure the remote port is forwarded so it is reachable as `localhost` from your VS Code UI environment. - For the underlying API and examples, see [`@rushstack/playwright-browser-tunnel`](../../apps/playwright-browser-tunnel). diff --git a/vscode-extensions/playwright-local-browser-server-vscode-extension/assets/extension-icon.png b/vscode-extensions/playwright-local-browser-server-vscode-extension/assets/extension-icon.png new file mode 100644 index 00000000000..a8ed5069792 Binary files /dev/null and b/vscode-extensions/playwright-local-browser-server-vscode-extension/assets/extension-icon.png differ diff --git a/vscode-extensions/playwright-local-browser-server-vscode-extension/assets/extension-icon.svg b/vscode-extensions/playwright-local-browser-server-vscode-extension/assets/extension-icon.svg new file mode 100644 index 00000000000..f18448e3f2b --- /dev/null +++ b/vscode-extensions/playwright-local-browser-server-vscode-extension/assets/extension-icon.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/config/heft.json b/vscode-extensions/playwright-local-browser-server-vscode-extension/config/heft.json similarity index 100% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/config/heft.json rename to vscode-extensions/playwright-local-browser-server-vscode-extension/config/heft.json diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/config/rig.json b/vscode-extensions/playwright-local-browser-server-vscode-extension/config/rig.json similarity index 100% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/config/rig.json rename to vscode-extensions/playwright-local-browser-server-vscode-extension/config/rig.json diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/config/rush-project.json b/vscode-extensions/playwright-local-browser-server-vscode-extension/config/rush-project.json similarity index 100% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/config/rush-project.json rename to vscode-extensions/playwright-local-browser-server-vscode-extension/config/rush-project.json diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/eslint.config.js b/vscode-extensions/playwright-local-browser-server-vscode-extension/eslint.config.js similarity index 100% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/eslint.config.js rename to vscode-extensions/playwright-local-browser-server-vscode-extension/eslint.config.js diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/package.json b/vscode-extensions/playwright-local-browser-server-vscode-extension/package.json similarity index 68% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/package.json rename to vscode-extensions/playwright-local-browser-server-vscode-extension/package.json index a16ecaaa74e..93655a27441 100644 --- a/vscode-extensions/playwright-on-codespaces-vscode-extension/package.json +++ b/vscode-extensions/playwright-local-browser-server-vscode-extension/package.json @@ -1,17 +1,17 @@ { - "name": "playwright-on-codespaces", + "name": "playwright-local-browser-server", "version": "0.0.1", "repository": { "type": "git", "url": "https://github.com/microsoft/rushstack.git", - "directory": "vscode-extensions/playwright-on-codespaces-vscode-extension" + "directory": "vscode-extensions/playwright-local-browser-server-vscode-extension" }, "license": "MIT", "publisher": "ms-RushStack", "preview": true, - "displayName": "Playwright on Codespaces", - "description": "VS Code extension to enable Playwright testing in GitHub Codespaces.", - "homepage": "https://github.com/microsoft/rushstack/tree/main/vscode-extensions/playwright-on-codespaces-vscode-extension", + "displayName": "Playwright Local Browser Server", + "description": "VS Code extension to enable Playwright testing in remote VS Code environments (such as Codespaces, Dev Containers, VS Code Tunnels) while launching and driving the actual browser process on your local machine.", + "homepage": "https://github.com/microsoft/rushstack/tree/main/vscode-extensions/playwright-local-browser-server-vscode-extension", "icon": "assets/extension-icon.png", "extensionKind": [ "ui" @@ -40,52 +40,52 @@ "contributes": { "commands": [ { - "command": "playwright-tunnel.start", + "command": "playwright-local-browser-server.start", "title": "Start Playwright Browser Tunnel", "category": "Playwright" }, { - "command": "playwright-tunnel.stop", + "command": "playwright-local-browser-server.stop", "title": "Stop Playwright Browser Tunnel", "category": "Playwright" }, { - "command": "playwright-tunnel.manageAllowlist", + "command": "playwright-local-browser-server.manageAllowlist", "title": "Manage Launch Options Allowlist", - "category": "Playwright on Codespaces" + "category": "Playwright Local Browser Server" }, { - "command": "playwright-tunnel.showLog", + "command": "playwright-local-browser-server.showLog", "title": "Show Log", - "category": "Playwright on Codespaces" + "category": "Playwright Local Browser Server" }, { - "command": "playwright-tunnel.showSettings", + "command": "playwright-local-browser-server.showSettings", "title": "Show Settings", - "category": "Playwright on Codespaces" + "category": "Playwright Local Browser Server" }, { - "command": "playwright-tunnel.showMenu", + "command": "playwright-local-browser-server.showMenu", "title": "Show Tunnel Menu", - "category": "Playwright on Codespaces" + "category": "Playwright Local Browser Server" } ], "configuration": { "title": "Playwright Browser Tunnel", "properties": { - "playwright-tunnel.autoStart": { + "playwright-local-browser-server.autoStart": { "type": "boolean", "default": false, "description": "Automatically start the Playwright browser tunnel when the extension activates. For security, this is disabled by default." }, - "playwright-tunnel.promptBeforeLaunch": { + "playwright-local-browser-server.promptBeforeLaunch": { "type": "boolean", "default": true, "description": "Show a confirmation prompt before launching the browser server with the requested launch options. This helps protect against potentially malicious launch options from compromised environments." }, - "playwright-tunnel.tunnelPort": { + "playwright-local-browser-server.tunnelPort": { "type": "number", - "default": 3000, + "default": 56767, "description": "Port for the browser tunnel server" } } diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/src/extension.ts b/vscode-extensions/playwright-local-browser-server-vscode-extension/src/extension.ts similarity index 95% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/src/extension.ts rename to vscode-extensions/playwright-local-browser-server-vscode-extension/src/extension.ts index fcadde1b218..1b776e7fe77 100644 --- a/vscode-extensions/playwright-on-codespaces-vscode-extension/src/extension.ts +++ b/vscode-extensions/playwright-local-browser-server-vscode-extension/src/extension.ts @@ -26,13 +26,13 @@ import { runWorkspaceCommandAsync } from '@rushstack/vscode-shared/lib/runWorksp import { VScodeOutputChannelTerminalProvider } from '@rushstack/vscode-shared/lib/VScodeOutputChannelTerminalProvider'; import packageJson from '../package.json'; -const EXTENSION_DISPLAY_NAME: string = 'Playwright on Codespaces'; -const COMMAND_SHOW_LOG: string = 'playwright-tunnel.showLog'; -const COMMAND_SHOW_SETTINGS: string = 'playwright-tunnel.showSettings'; -const COMMAND_START_TUNNEL: string = 'playwright-tunnel.start'; -const COMMAND_STOP_TUNNEL: string = 'playwright-tunnel.stop'; -const COMMAND_SHOW_MENU: string = 'playwright-tunnel.showMenu'; -const COMMAND_MANAGE_ALLOWLIST: string = 'playwright-tunnel.manageAllowlist'; +const EXTENSION_DISPLAY_NAME: string = 'Playwright Local Browser Server'; +const COMMAND_SHOW_LOG: string = 'playwright-local-browser-server.showLog'; +const COMMAND_SHOW_SETTINGS: string = 'playwright-local-browser-server.showSettings'; +const COMMAND_START_TUNNEL: string = 'playwright-local-browser-server.start'; +const COMMAND_STOP_TUNNEL: string = 'playwright-local-browser-server.stop'; +const COMMAND_SHOW_MENU: string = 'playwright-local-browser-server.showMenu'; +const COMMAND_MANAGE_ALLOWLIST: string = 'playwright-local-browser-server.manageAllowlist'; const VSCODE_COMMAND_WORKSPACE_OPEN_SETTINGS: string = 'workbench.action.openSettings'; const EXTENSION_ID: string = `${packageJson.publisher}.${packageJson.name}`; const VSCODE_SETTINGS_EXTENSION_FILTER: string = `@ext:${EXTENSION_ID}`; @@ -45,7 +45,7 @@ async function writeExtensionInstalledFileAsync(terminal: ITerminal): Promise return; } - const config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration('playwright-tunnel'); + const config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration( + 'playwright-local-browser-server' + ); const shouldAutoStart: boolean = config.get('autoStart', false); - const tunnelPort: number = config.get('tunnelPort', 3000); + const tunnelPort: number = config.get('tunnelPort', 56767); // If this is a manual start and autoStart is not enabled, prompt the user if (!isAutoStart && !shouldAutoStart) { @@ -523,7 +525,9 @@ export async function activate(context: vscode.ExtensionContext): Promise ); // Auto-start the tunnel on activation if configured - const config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration('playwright-tunnel'); + const config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration( + 'playwright-local-browser-server' + ); const autoStart: boolean = config.get('autoStart', false); if (autoStart) { void handleStartTunnelAsync(true); diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/src/utils/getNormalizedErrorString.ts b/vscode-extensions/playwright-local-browser-server-vscode-extension/src/utils/getNormalizedErrorString.ts similarity index 100% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/src/utils/getNormalizedErrorString.ts rename to vscode-extensions/playwright-local-browser-server-vscode-extension/src/utils/getNormalizedErrorString.ts diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/tsconfig.json b/vscode-extensions/playwright-local-browser-server-vscode-extension/tsconfig.json similarity index 100% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/tsconfig.json rename to vscode-extensions/playwright-local-browser-server-vscode-extension/tsconfig.json diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/webpack.config.js b/vscode-extensions/playwright-local-browser-server-vscode-extension/webpack.config.js similarity index 100% rename from vscode-extensions/playwright-on-codespaces-vscode-extension/webpack.config.js rename to vscode-extensions/playwright-local-browser-server-vscode-extension/webpack.config.js diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/assets/extension-icon.png b/vscode-extensions/playwright-on-codespaces-vscode-extension/assets/extension-icon.png deleted file mode 100644 index a5b08a53ff6..00000000000 Binary files a/vscode-extensions/playwright-on-codespaces-vscode-extension/assets/extension-icon.png and /dev/null differ diff --git a/vscode-extensions/playwright-on-codespaces-vscode-extension/assets/extension-icon.svg b/vscode-extensions/playwright-on-codespaces-vscode-extension/assets/extension-icon.svg deleted file mode 100644 index e47202b5fdb..00000000000 --- a/vscode-extensions/playwright-on-codespaces-vscode-extension/assets/extension-icon.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -