Add /remote/

This commit is contained in:
Alex Dima 2019-05-22 15:59:37 +02:00
parent 0ec7149950
commit 8b08ad7e8a
8 changed files with 1218 additions and 1 deletions

View file

@ -3,10 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as cp from 'child_process';
import * as cp from 'child_process';
import * as path from 'path';
function yarnInstall(packageName: string): void {
cp.execSync(`yarn add --no-lockfile ${packageName}`);
cp.execSync(`yarn add --no-lockfile ${packageName}`, { cwd: path.join( process.cwd(), 'remote') });
}
const product = require('../../../product.json');

View file

@ -36,6 +36,8 @@ function yarnInstall(location, opts) {
yarnInstall('extensions'); // node modules shared by all extensions
yarnInstall('remote'); // node modules used by vscode server
const allExtensionFolders = fs.readdirSync('extensions');
const extensions = allExtensionFolders.filter(e => {
try {

3
remote/.yarnrc Normal file
View file

@ -0,0 +1,3 @@
disturl "http://nodejs.org/dist"
target "10.2.1"
runtime "node"

20
remote/installDevModules.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
set -ex
# Install Node and Yarn
export NODE_VERSION=10.2.1
export YARN_VERSION=1.10.1
curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz"
curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz"
tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C "$HOME" --no-same-owner
tar -xzf "yarn-v$YARN_VERSION.tar.gz" -C "$HOME"
mkdir -p "$HOME/bin"
ln -s "$HOME/node-v$NODE_VERSION-linux-x64/bin/node" "$HOME/bin/node"
ln -s "$HOME/yarn-v$YARN_VERSION/bin/yarn" "$HOME/bin/yarn"
ln -s "$HOME/yarn-v$YARN_VERSION/bin/yarnpkg" "$HOME/bin/yarnpkg"
rm "node-v$NODE_VERSION-linux-x64.tar.xz" "yarn-v$YARN_VERSION.tar.gz"
# Compile native /remote node_modules
PATH="$HOME/bin:$PATH" \
PYTHON=/usr/bin/python2.7 \
yarn --ignore-optional

View file

@ -0,0 +1,16 @@
#!/bin/bash
set -ex
# Install libraries and tools
apt-get update
apt-get install -y \
curl \
make \
gcc \
g++ \
python2.7 \
libx11-dev \
libxkbfile-dev \
libsecret-1-dev \
xz-utils
rm -rf /var/lib/apt/lists/*

17
remote/launchDevMode.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
set -e
export NODE_ENV=development
export VSCODE_DEV=1
export VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH="$HOME/.vscode-remote/bin/dev-remote/node_modules"
cd $VSCODE_REPO
if [ -z "$extensions" ] ; then
echo No extensions to install.
mkdir -p /root/.vscode-remote
else
(PATH="$HOME/bin:$PATH" node out/remoteExtensionHostAgent.js ${VSCODE_TELEMETRY_ARG} ${extensions} || true)
fi
PATH="$HOME/bin:$PATH" node out/remoteExtensionHostAgent.js ${VSCODE_TELEMETRY_ARG} --port $PORT

28
remote/package.json Normal file
View file

@ -0,0 +1,28 @@
{
"name": "vscode-reh",
"version": "0.0.0",
"dependencies": {
"applicationinsights": "1.0.8",
"getmac": "^1.4.6",
"graceful-fs": "4.1.11",
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.1",
"iconv-lite": "0.4.23",
"jschardet": "1.6.0",
"keytar": "4.2.1",
"minimist": "1.2.0",
"native-watchdog": "1.0.0",
"node-pty": "0.8.1",
"semver": "^5.5.0",
"spdlog": "0.8.1",
"vscode-chokidar": "1.6.5",
"vscode-nsfw": "1.1.1",
"vscode-proxy-agent": "0.4.0",
"vscode-ripgrep": "^1.2.5",
"yauzl": "^2.9.1",
"yazl": "^2.4.3"
},
"optionalDependencies": {
"vscode-windows-ca-certs": "0.1.0"
}
}

1129
remote/yarn.lock Normal file

File diff suppressed because it is too large Load diff