mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 07:47:23 +01:00
Add --skip-welcome flag to web server and serve script
The serve script now opens with ?skip-sessions-welcome to bypass the sign-in overlay during manual testing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -15,7 +15,7 @@ const APP_ROOT = path.join(__dirname, '..');
|
|||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const args = minimist(process.argv.slice(2), {
|
const args = minimist(process.argv.slice(2), {
|
||||||
boolean: ['help', 'no-open'],
|
boolean: ['help', 'no-open', 'skip-welcome'],
|
||||||
string: ['host', 'port'],
|
string: ['host', 'port'],
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -86,7 +86,8 @@ async function main() {
|
|||||||
server.listen(PORT, HOST, () => {
|
server.listen(PORT, HOST, () => {
|
||||||
console.log(`\n Sessions Web running at: http://${HOST}:${PORT}/\n`);
|
console.log(`\n Sessions Web running at: http://${HOST}:${PORT}/\n`);
|
||||||
if (!args['no-open'] && args.open !== false) {
|
if (!args['no-open'] && args.open !== false) {
|
||||||
open.default(`http://${HOST}:${PORT}/`);
|
const query = args['skip-welcome'] ? '?skip-sessions-welcome' : '';
|
||||||
|
open.default(`http://${HOST}:${PORT}/${query}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"description": "Automated E2E tests for the Agent Sessions window using playwright-cli",
|
"description": "Automated E2E tests for the Agent Sessions window using playwright-cli",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"serve": "node ../../../../../scripts/code-sessions-web.js --port 9222 --skip-welcome",
|
||||||
"generate": "node generate.cjs",
|
"generate": "node generate.cjs",
|
||||||
"test": "node test.cjs"
|
"test": "node test.cjs"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user