Skip to content

Commit 8b08ad7

Browse files
committed
Add /remote/
1 parent 0ec7149 commit 8b08ad7

8 files changed

Lines changed: 1218 additions & 1 deletion

File tree

build/azure-pipelines/common/installDistro.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import * as cp from 'child_process';
6+
import * as cp from 'child_process';
7+
import * as path from 'path';
78

89
function yarnInstall(packageName: string): void {
910
cp.execSync(`yarn add --no-lockfile ${packageName}`);
11+
cp.execSync(`yarn add --no-lockfile ${packageName}`, { cwd: path.join( process.cwd(), 'remote') });
1012
}
1113

1214
const product = require('../../../product.json');

build/npm/postinstall.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ function yarnInstall(location, opts) {
3636

3737
yarnInstall('extensions'); // node modules shared by all extensions
3838

39+
yarnInstall('remote'); // node modules used by vscode server
40+
3941
const allExtensionFolders = fs.readdirSync('extensions');
4042
const extensions = allExtensionFolders.filter(e => {
4143
try {

remote/.yarnrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
disturl "http://nodejs.org/dist"
2+
target "10.2.1"
3+
runtime "node"

remote/installDevModules.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
# Install Node and Yarn
5+
export NODE_VERSION=10.2.1
6+
export YARN_VERSION=1.10.1
7+
curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz"
8+
curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz"
9+
tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C "$HOME" --no-same-owner
10+
tar -xzf "yarn-v$YARN_VERSION.tar.gz" -C "$HOME"
11+
mkdir -p "$HOME/bin"
12+
ln -s "$HOME/node-v$NODE_VERSION-linux-x64/bin/node" "$HOME/bin/node"
13+
ln -s "$HOME/yarn-v$YARN_VERSION/bin/yarn" "$HOME/bin/yarn"
14+
ln -s "$HOME/yarn-v$YARN_VERSION/bin/yarnpkg" "$HOME/bin/yarnpkg"
15+
rm "node-v$NODE_VERSION-linux-x64.tar.xz" "yarn-v$YARN_VERSION.tar.gz"
16+
17+
# Compile native /remote node_modules
18+
PATH="$HOME/bin:$PATH" \
19+
PYTHON=/usr/bin/python2.7 \
20+
yarn --ignore-optional

remote/installDevPackagesAsRoot.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
# Install libraries and tools
5+
apt-get update
6+
apt-get install -y \
7+
curl \
8+
make \
9+
gcc \
10+
g++ \
11+
python2.7 \
12+
libx11-dev \
13+
libxkbfile-dev \
14+
libsecret-1-dev \
15+
xz-utils
16+
rm -rf /var/lib/apt/lists/*

remote/launchDevMode.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -e
3+
4+
export NODE_ENV=development
5+
export VSCODE_DEV=1
6+
export VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH="$HOME/.vscode-remote/bin/dev-remote/node_modules"
7+
8+
cd $VSCODE_REPO
9+
10+
if [ -z "$extensions" ] ; then
11+
echo No extensions to install.
12+
mkdir -p /root/.vscode-remote
13+
else
14+
(PATH="$HOME/bin:$PATH" node out/remoteExtensionHostAgent.js ${VSCODE_TELEMETRY_ARG} ${extensions} || true)
15+
fi
16+
17+
PATH="$HOME/bin:$PATH" node out/remoteExtensionHostAgent.js ${VSCODE_TELEMETRY_ARG} --port $PORT

remote/package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "vscode-reh",
3+
"version": "0.0.0",
4+
"dependencies": {
5+
"applicationinsights": "1.0.8",
6+
"getmac": "^1.4.6",
7+
"graceful-fs": "4.1.11",
8+
"http-proxy-agent": "^2.1.0",
9+
"https-proxy-agent": "^2.2.1",
10+
"iconv-lite": "0.4.23",
11+
"jschardet": "1.6.0",
12+
"keytar": "4.2.1",
13+
"minimist": "1.2.0",
14+
"native-watchdog": "1.0.0",
15+
"node-pty": "0.8.1",
16+
"semver": "^5.5.0",
17+
"spdlog": "0.8.1",
18+
"vscode-chokidar": "1.6.5",
19+
"vscode-nsfw": "1.1.1",
20+
"vscode-proxy-agent": "0.4.0",
21+
"vscode-ripgrep": "^1.2.5",
22+
"yauzl": "^2.9.1",
23+
"yazl": "^2.4.3"
24+
},
25+
"optionalDependencies": {
26+
"vscode-windows-ca-certs": "0.1.0"
27+
}
28+
}

0 commit comments

Comments
 (0)