Merge vscode source through 1.62 release (#19981)

* Build breaks 1

* Build breaks

* Build breaks

* Build breaks

* More build breaks

* Build breaks (#2512)

* Runtime breaks

* Build breaks

* Fix dialog location break

* Update typescript

* Fix ASAR break issue

* Unit test breaks

* Update distro

* Fix breaks in ADO builds (#2513)

* Bump to node 16

* Fix hygiene errors

* Bump distro

* Remove reference to node type

* Delete vscode specific extension

* Bump to node 16 in CI yaml

* Skip integration tests in CI builds (while fixing)

* yarn.lock update

* Bump moment dependency in remote yarn

* Fix drop-down chevron style

* Bump to node 16

* Remove playwrite from ci.yaml

* Skip building build scripts in hygine check
This commit is contained in:
Karl Burtram
2022-07-11 14:09:32 -07:00
committed by GitHub
parent fa0fcef303
commit 26455e9113
1876 changed files with 72050 additions and 37997 deletions

View File

@@ -0,0 +1,87 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// @ts-check
const cp = require('child_process');
const path = require('path');
const os = require('os');
const serverArgs = [];
// Server Config
let PORT = 9888;
let DRIVER = undefined;
let LOGS_PATH = undefined;
// Workspace Config
let FOLDER = undefined;
let WORKSPACE = undefined;
// Settings Sync Config
let GITHUB_AUTH_TOKEN = undefined;
let ENABLE_SYNC = false;
for (let idx = 0; idx <= process.argv.length - 2; idx++) {
const arg = process.argv[idx];
switch (arg) {
case '--port': PORT = Number(process.argv[idx + 1]); break;
case '--folder': FOLDER = process.argv[idx + 1]; break;
case '--workspace': WORKSPACE = process.argv[idx + 1]; break;
case '--driver': DRIVER = process.argv[idx + 1]; break;
case '--github-auth': GITHUB_AUTH_TOKEN = process.argv[idx + 1]; break;
case '--logsPath': LOGS_PATH = process.argv[idx + 1]; break;
case '--enable-sync': ENABLE_SYNC = true; break;
}
}
serverArgs.push('--port', String(PORT));
if (FOLDER) {
serverArgs.push('--folder', FOLDER);
}
if (WORKSPACE) {
serverArgs.push('--workspace', WORKSPACE);
}
if (DRIVER) {
serverArgs.push('--driver', DRIVER);
// given a DRIVER, we auto-shutdown when tests are done
serverArgs.push('--enable-remote-auto-shutdown', '--remote-auto-shutdown-without-delay');
}
if (LOGS_PATH) {
serverArgs.push('--logsPath', LOGS_PATH);
}
if (GITHUB_AUTH_TOKEN) {
serverArgs.push('--github-auth', GITHUB_AUTH_TOKEN);
}
if (ENABLE_SYNC) {
serverArgs.push('--enable-sync', true);
}
// Connection Token
serverArgs.push('--connectionToken', '00000');
// Server should really only listen from localhost
serverArgs.push('--host', '127.0.0.1');
const env = { ...process.env };
env['VSCODE_AGENT_FOLDER'] = env['VSCODE_AGENT_FOLDER'] || path.join(os.homedir(), '.vscode-web-dev');
const entryPoint = path.join(__dirname, '..', '..', '..', 'out', 'vs', 'server', 'main.js');
startServer();
function startServer() {
const proc = cp.spawn(process.execPath, [entryPoint, ...serverArgs], { env });
proc.stdout.on('data', data => {
// Log everything
console.log(data.toString());
});
// Log errors
proc.stderr.on('data', data => {
console.error(data.toString());
});
}

View File

@@ -0,0 +1,6 @@
@echo off
setlocal
SET VSCODE_PATH=%~dp0..\..\..
FOR /F "tokens=* USEBACKQ" %%g IN (`where /r "%VSCODE_PATH%\.build\node" node.exe`) do (SET "NODE=%%g")
call "%NODE%" "%VSCODE_PATH%\out\vs\server\cli.js" "Code Server - Dev" "" "" "code.cmd" %*
endlocal

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
if [[ "$OSTYPE" == "darwin"* ]]; then
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
VSCODE_PATH=$(dirname $(dirname $(dirname $(dirname $(realpath "$0")))))
else
VSCODE_PATH=$(dirname $(dirname $(dirname $(dirname $(readlink -f $0)))))
fi
PROD_NAME="Code Server - Dev"
VERSION=""
COMMIT=""
EXEC_NAME="$(basename "$(test -L "$0" && readlink "$0" || echo "$0")")"
CLI_SCRIPT="$VSCODE_PATH/out/vs/server/cli.js"
node "$CLI_SCRIPT" "$PROD_NAME" "$VERSION" "$COMMIT" "$EXEC_NAME" "$@"

View File

@@ -0,0 +1,6 @@
@echo off
setlocal
SET VSCODE_PATH=%~dp0..\..\..\..
FOR /F "tokens=* USEBACKQ" %%g IN (`where /r "%VSCODE_PATH%\.build\node" node.exe`) do (SET "NODE=%%g")
call "%NODE%" "%VSCODE_PATH%\out\vs\server\cli.js" "Code Server - Dev" "" "" "code.cmd" "--openExternal" %*
endlocal

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
if [[ "$OSTYPE" == "darwin"* ]]; then
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
VSCODE_PATH=$(dirname $(dirname $(dirname $(dirname $(dirname $(realpath "$0"))))))
else
VSCODE_PATH=$(dirname $(dirname $(dirname $(dirname $(dirname $(readlink -f $0))))))
fi
PROD_NAME="Code Server - Dev"
VERSION=""
COMMIT=""
EXEC_NAME=""
CLI_SCRIPT="$VSCODE_PATH/out/vs/server/cli.js"
node "$CLI_SCRIPT" "$PROD_NAME" "$VERSION" "$COMMIT" "$EXEC_NAME" "--openExternal" "$@"

View File

@@ -0,0 +1,43 @@
@echo off
setlocal
title VSCode Remote Agent
pushd %~dp0\..\..\..
:: Configuration
set NODE_ENV=development
set VSCODE_DEV=1
:: Sync built-in extensions
call yarn download-builtin-extensions
FOR /F "tokens=*" %%g IN ('node build/lib/node.js') do (SET NODE=%%g)
:: Download nodejs executable for remote
IF NOT EXIST "%NODE%" (
call yarn gulp node
)
:: Launch Agent
set _FIRST_ARG=%1
if "%_FIRST_ARG:~0,9%"=="--inspect" (
set INSPECT=%1
shift
) else (
set INSPECT=
)
:loop1
if "%~1"=="" goto after_loop
set RESTVAR=%RESTVAR% %1
shift
goto loop1
:after_loop
call "%NODE%" %INSPECT% "out\vs\server\main.js" %RESTVAR%
popd
endlocal

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
if [[ "$OSTYPE" == "darwin"* ]]; then
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
ROOT=$(dirname $(dirname $(dirname $(dirname $(realpath "$0")))))
else
ROOT=$(dirname $(dirname $(dirname $(dirname $(readlink -f $0)))))
fi
function code() {
cd $ROOT
# Sync built-in extensions
yarn download-builtin-extensions
NODE=$(node build/lib/node.js)
# Download nodejs
if [ ! -f $NODE ]; then
yarn gulp node
fi
NODE_ENV=development \
VSCODE_DEV=1 \
$NODE "$ROOT/out/vs/server/main.js" "$@"
}
code "$@"