Add windows support (#41)
* Add windows support * Improve multi-platform support * Install with network-concurrency 1 * Use file-glob to upload windows binary * Don't install packages in parallel if on windows * Rename vscode-remote to code-server * Add output at intervals so CI doesn't kill build * Update all tasks to provide timed output * Don't perform tasks sync otherwise we can't log
This commit is contained in:
parent
1e30831c91
commit
e8174095ca
@ -27,7 +27,8 @@ deploy:
|
||||
skip_cleanup: true
|
||||
api_key:
|
||||
secure: T/yqCIeqLifteriv8D3CnehNFzSBP309GZqeUfyx8Q+xSQEttA9Enxl+Qw9GkdedYTN4J56iucHIac6CwcvKSKIXqk80CeSEW0BNxZs5wIgv4rRMMy/GAX0NBWKNOkoGlH8M6VyQcM7eY2iGAn1EX755PHalk6rWwfsauRANOQyb2DXQBan5C0YUnogq2qcW1xkIwlXH7l0Ekbtego0f6QPv0rSyOcL1LKm6xk0Aq+xLNKJkT6TSL6xYpkPlZLjnql09Nspkqs6NehWlft2n09bHqAtjNnWw9OYCvxp8mdHeTE5uShuEqYPzdYU5LVFoE7wElI8uqS66noaA18ytZYGw2IrY6GZcn+wtR6WyM2+YXl2HclL1/Fs6Vn8+zwq2IBZchBNv3KJSn1dxiqLlD/s6YQyni17x/9FhtFoNUvsbY5zSC1xrnNQBQWFg0TRnoC9rPR+7hQtT1+5+CvRxpvcNWnPuA22919PFE79ejJulPmsnyF+YLs9c6APJgOpOO1f6fKt5Mcb02dubPqGcQ9NbqUUNTl4IUvEtjG0LnFAgEGerxAcsdnUTxzBVf0LJLlhRKW1BigUTbRwfUJL1DN0mWg9cg7fL5VqrogvNq3uRguxOsYr+bcHDbimQSAY3No3fAkTTqQSJh56Dx57/Un18KxuOTiRB9de1RtiudsI=
|
||||
file: packages/server/cli-$TRAVIS_OS_NAME
|
||||
file_glob: true
|
||||
file: packages/server/cli-*
|
||||
on:
|
||||
repo: codercom/vscode-online
|
||||
branch: master
|
||||
|
@ -33,7 +33,7 @@ const buildServerBinaryPackage = register("build:server:binary:package", async (
|
||||
}
|
||||
await buildServerBinaryCopy();
|
||||
await dependencyNexeBinary();
|
||||
const resp = await runner.execute("npm", ["run", "build:nexe"]);
|
||||
const resp = await runner.execute(isWin ? "npm.cmd" : "npm", ["run", "build:nexe"]);
|
||||
if (resp.exitCode !== 0) {
|
||||
throw new Error(`Failed to package binary: ${resp.stderr}`);
|
||||
}
|
||||
@ -133,7 +133,7 @@ const buildServerBinaryCopy = register("build:server:binary:copy", async (runner
|
||||
const buildServerBundle = register("build:server:bundle", async (runner) => {
|
||||
const cliPath = path.join(pkgsPath, "server");
|
||||
runner.cwd = cliPath;
|
||||
await runner.execute("npm", ["run", "build"]);
|
||||
await runner.execute(isWin ? "npm.cmd" : "npm", ["run", "build"]);
|
||||
});
|
||||
|
||||
const buildBootstrapFork = register("build:bootstrap-fork", async (runner) => {
|
||||
@ -142,7 +142,7 @@ const buildBootstrapFork = register("build:bootstrap-fork", async (runner) => {
|
||||
|
||||
const vscodePkgPath = path.join(pkgsPath, "vscode");
|
||||
runner.cwd = vscodePkgPath;
|
||||
await runner.execute("npm", ["run", "build:bootstrap-fork"]);
|
||||
await runner.execute(isWin ? "npm.cmd" : "npm", ["run", "build:bootstrap-fork"]);
|
||||
});
|
||||
|
||||
const buildAppBrowser = register("build:app:browser", async (runner) => {
|
||||
@ -151,7 +151,7 @@ const buildAppBrowser = register("build:app:browser", async (runner) => {
|
||||
const appPath = path.join(pkgsPath, "app/browser");
|
||||
runner.cwd = appPath;
|
||||
fse.removeSync(path.join(appPath, "out"));
|
||||
await runner.execute("npm", ["run", "build"]);
|
||||
await runner.execute(isWin ? "npm.cmd" : "npm", ["run", "build"]);
|
||||
});
|
||||
|
||||
const buildWeb = register("build:web", async (runner) => {
|
||||
@ -161,7 +161,7 @@ const buildWeb = register("build:web", async (runner) => {
|
||||
const webPath = path.join(pkgsPath, "web");
|
||||
runner.cwd = webPath;
|
||||
fse.removeSync(path.join(webPath, "out"));
|
||||
await runner.execute("npm", ["run", "build"]);
|
||||
await runner.execute(isWin ? "npm.cmd" : "npm", ["run", "build"]);
|
||||
});
|
||||
|
||||
const extDirPath = path.join("lib", "vscode-default-extensions");
|
||||
@ -169,8 +169,24 @@ const copyForDefaultExtensions = register("build:copy-vscode", async (runner) =>
|
||||
if (!fs.existsSync(defaultExtensionsPath)) {
|
||||
await ensureClean();
|
||||
await ensureInstalled();
|
||||
fse.removeSync(extDirPath);
|
||||
fse.copySync(vscodePath, extDirPath);
|
||||
await new Promise((resolve, reject): void => {
|
||||
fse.remove(extDirPath, (err) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
await new Promise((resolve, reject): void => {
|
||||
fse.copy(vscodePath, extDirPath, (err) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -178,7 +194,7 @@ const buildDefaultExtensions = register("build:default-extensions", async (runne
|
||||
if (!fs.existsSync(defaultExtensionsPath)) {
|
||||
await copyForDefaultExtensions();
|
||||
runner.cwd = extDirPath;
|
||||
const resp = await runner.execute("npx", ["gulp", "vscode-linux-x64"]);
|
||||
const resp = await runner.execute(isWin ? "npx.cmd" : "npx", [isWin ? "gulp.cmd" : "gulp", "vscode-linux-x64"]);
|
||||
if (resp.exitCode !== 0) {
|
||||
throw new Error(`Failed to build default extensions: ${resp.stderr}`);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@coder/vscode-remote",
|
||||
"repository": "https://github.com/codercom/vscode-remote",
|
||||
"name": "@coder/code-server",
|
||||
"repository": "https://github.com/codercom/code-server",
|
||||
"author": "Coder",
|
||||
"license": "MIT",
|
||||
"description": "Run VS Code remotely.",
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "@coder/app",
|
||||
"scripts": {
|
||||
"start": "../../../node_modules/.bin/webpack-dev-server --config ./webpack.config.js",
|
||||
"build": "../../../node_modules/.bin/webpack --config ./webpack.config.js"
|
||||
"start": "node ../../../node_modules/webpack-dev-server/bin/webpack-dev-server.js --config ./webpack.config.js",
|
||||
"build": "node ../../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@material/checkbox": "^0.44.1",
|
||||
|
@ -9,7 +9,8 @@
|
||||
<body>
|
||||
<div class="login">
|
||||
<div class="back">
|
||||
<- Back </div> <h4 class="title">AWS Cloud</h4>
|
||||
<- Back </div>
|
||||
<!-- <h4 class="title">AWS Cloud</h4> -->
|
||||
<h2 class="subtitle">
|
||||
Enter server password
|
||||
</h2>
|
||||
|
@ -34,6 +34,7 @@ class OS {
|
||||
case OperatingSystem.Mac: this._platform = "darwin"; break;
|
||||
default: this._platform = "linux"; break;
|
||||
}
|
||||
process.platform = this._platform;
|
||||
}
|
||||
|
||||
public release(): string {
|
||||
|
518
packages/ide/src/fill/path.js
Normal file
518
packages/ide/src/fill/path.js
Normal file
@ -0,0 +1,518 @@
|
||||
// Copyright Joyent, Inc. and other Node contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
// persons to whom the Software is furnished to do so, subject to the
|
||||
// following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
var os = require('os');
|
||||
var util = require('util');
|
||||
var isWindows = os.platform() === "win32";
|
||||
|
||||
// resolves . and .. elements in a path array with directory names there
|
||||
// must be no slashes, empty elements, or device names (c:\) in the array
|
||||
// (so also no leading and trailing slashes - it does not distinguish
|
||||
// relative and absolute paths)
|
||||
function normalizeArray(parts, allowAboveRoot) {
|
||||
// if the path tries to go above the root, `up` ends up > 0
|
||||
var up = 0;
|
||||
for (var i = parts.length - 1; i >= 0; i--) {
|
||||
var last = parts[i];
|
||||
if (last === '.') {
|
||||
parts.splice(i, 1);
|
||||
} else if (last === '..') {
|
||||
parts.splice(i, 1);
|
||||
up++;
|
||||
} else if (up) {
|
||||
parts.splice(i, 1);
|
||||
up--;
|
||||
}
|
||||
}
|
||||
|
||||
// if the path is allowed to go above the root, restore leading ..s
|
||||
if (allowAboveRoot) {
|
||||
for (; up--; up) {
|
||||
parts.unshift('..');
|
||||
}
|
||||
}
|
||||
|
||||
return parts;
|
||||
}
|
||||
|
||||
|
||||
if (isWindows) {
|
||||
// Regex to split a windows path into three parts: [*, device, slash,
|
||||
// tail] windows-only
|
||||
var splitDeviceRe =
|
||||
/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
||||
|
||||
// Regex to split the tail part of the above into [*, dir, basename, ext]
|
||||
var splitTailRe =
|
||||
/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
|
||||
|
||||
// Function to split a filename into [root, dir, basename, ext]
|
||||
// windows version
|
||||
var splitPath = function(filename) {
|
||||
// Separate device+slash from tail
|
||||
var result = splitDeviceRe.exec(filename),
|
||||
device = (result[1] || '') + (result[2] || ''),
|
||||
tail = result[3] || '';
|
||||
// Split the tail into dir, basename and extension
|
||||
var result2 = splitTailRe.exec(tail),
|
||||
dir = result2[1],
|
||||
basename = result2[2],
|
||||
ext = result2[3];
|
||||
return [device, dir, basename, ext];
|
||||
};
|
||||
|
||||
var normalizeUNCRoot = function(device) {
|
||||
return '\\\\' + device.replace(/^[\\\/]+/, '').replace(/[\\\/]+/g, '\\');
|
||||
};
|
||||
|
||||
// path.resolve([from ...], to)
|
||||
// windows version
|
||||
exports.resolve = function() {
|
||||
var resolvedDevice = '',
|
||||
resolvedTail = '',
|
||||
resolvedAbsolute = false;
|
||||
|
||||
for (var i = arguments.length - 1; i >= -1; i--) {
|
||||
var path;
|
||||
if (i >= 0) {
|
||||
path = arguments[i];
|
||||
} else if (!resolvedDevice) {
|
||||
path = process.cwd();
|
||||
} else {
|
||||
// Windows has the concept of drive-specific current working
|
||||
// directories. If we've resolved a drive letter but not yet an
|
||||
// absolute path, get cwd for that drive. We're sure the device is not
|
||||
// an unc path at this points, because unc paths are always absolute.
|
||||
path = process.env['=' + resolvedDevice];
|
||||
// Verify that a drive-local cwd was found and that it actually points
|
||||
// to our drive. If not, default to the drive's root.
|
||||
if (!path || path.substr(0, 3).toLowerCase() !==
|
||||
resolvedDevice.toLowerCase() + '\\') {
|
||||
path = resolvedDevice + '\\';
|
||||
}
|
||||
}
|
||||
|
||||
// Skip empty and invalid entries
|
||||
if (!util.isString(path)) {
|
||||
throw new TypeError('Arguments to path.resolve must be strings');
|
||||
} else if (!path) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var result = splitDeviceRe.exec(path),
|
||||
device = result[1] || '',
|
||||
isUnc = device && device.charAt(1) !== ':',
|
||||
isAbsolute = exports.isAbsolute(path),
|
||||
tail = result[3];
|
||||
|
||||
if (device &&
|
||||
resolvedDevice &&
|
||||
device.toLowerCase() !== resolvedDevice.toLowerCase()) {
|
||||
// This path points to another device so it is not applicable
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!resolvedDevice) {
|
||||
resolvedDevice = device;
|
||||
}
|
||||
if (!resolvedAbsolute) {
|
||||
resolvedTail = tail + '\\' + resolvedTail;
|
||||
resolvedAbsolute = isAbsolute;
|
||||
}
|
||||
|
||||
if (resolvedDevice && resolvedAbsolute) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert slashes to backslashes when `resolvedDevice` points to an UNC
|
||||
// root. Also squash multiple slashes into a single one where appropriate.
|
||||
if (isUnc) {
|
||||
resolvedDevice = normalizeUNCRoot(resolvedDevice);
|
||||
}
|
||||
|
||||
// At this point the path should be resolved to a full absolute path,
|
||||
// but handle relative paths to be safe (might happen when process.cwd()
|
||||
// fails)
|
||||
|
||||
// Normalize the tail path
|
||||
|
||||
function f(p) {
|
||||
return !!p;
|
||||
}
|
||||
|
||||
resolvedTail = normalizeArray(resolvedTail.split(/[\\\/]+/).filter(f),
|
||||
!resolvedAbsolute).join('\\');
|
||||
|
||||
return (resolvedDevice + (resolvedAbsolute ? '\\' : '') + resolvedTail) ||
|
||||
'.';
|
||||
};
|
||||
|
||||
// windows version
|
||||
exports.normalize = function(path) {
|
||||
var result = splitDeviceRe.exec(path),
|
||||
device = result[1] || '',
|
||||
isUnc = device && device.charAt(1) !== ':',
|
||||
isAbsolute = exports.isAbsolute(path),
|
||||
tail = result[3],
|
||||
trailingSlash = /[\\\/]$/.test(tail);
|
||||
|
||||
// If device is a drive letter, we'll normalize to lower case.
|
||||
if (device && device.charAt(1) === ':') {
|
||||
device = device[0].toLowerCase() + device.substr(1);
|
||||
}
|
||||
|
||||
// Normalize the tail path
|
||||
tail = normalizeArray(tail.split(/[\\\/]+/).filter(function(p) {
|
||||
return !!p;
|
||||
}), !isAbsolute).join('\\');
|
||||
|
||||
if (!tail && !isAbsolute) {
|
||||
tail = '.';
|
||||
}
|
||||
if (tail && trailingSlash) {
|
||||
tail += '\\';
|
||||
}
|
||||
|
||||
// Convert slashes to backslashes when `device` points to an UNC root.
|
||||
// Also squash multiple slashes into a single one where appropriate.
|
||||
if (isUnc) {
|
||||
device = normalizeUNCRoot(device);
|
||||
}
|
||||
|
||||
return device + (isAbsolute ? '\\' : '') + tail;
|
||||
};
|
||||
|
||||
// windows version
|
||||
exports.isAbsolute = function(path) {
|
||||
var result = splitDeviceRe.exec(path),
|
||||
device = result[1] || '',
|
||||
isUnc = !!device && device.charAt(1) !== ':';
|
||||
// UNC paths are always absolute
|
||||
return !!result[2] || isUnc;
|
||||
};
|
||||
|
||||
// windows version
|
||||
exports.join = function() {
|
||||
function f(p) {
|
||||
if (!util.isString(p)) {
|
||||
throw new TypeError('Arguments to path.join must be strings');
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
var paths = Array.prototype.filter.call(arguments, f);
|
||||
var joined = paths.join('\\');
|
||||
|
||||
// Make sure that the joined path doesn't start with two slashes, because
|
||||
// normalize() will mistake it for an UNC path then.
|
||||
//
|
||||
// This step is skipped when it is very clear that the user actually
|
||||
// intended to point at an UNC path. This is assumed when the first
|
||||
// non-empty string arguments starts with exactly two slashes followed by
|
||||
// at least one more non-slash character.
|
||||
//
|
||||
// Note that for normalize() to treat a path as an UNC path it needs to
|
||||
// have at least 2 components, so we don't filter for that here.
|
||||
// This means that the user can use join to construct UNC paths from
|
||||
// a server name and a share name; for example:
|
||||
// path.join('//server', 'share') -> '\\\\server\\share\')
|
||||
if (!/^[\\\/]{2}[^\\\/]/.test(paths[0])) {
|
||||
joined = joined.replace(/^[\\\/]{2,}/, '\\');
|
||||
}
|
||||
|
||||
return exports.normalize(joined);
|
||||
};
|
||||
|
||||
// path.relative(from, to)
|
||||
// it will solve the relative path from 'from' to 'to', for instance:
|
||||
// from = 'C:\\orandea\\test\\aaa'
|
||||
// to = 'C:\\orandea\\impl\\bbb'
|
||||
// The output of the function should be: '..\\..\\impl\\bbb'
|
||||
// windows version
|
||||
exports.relative = function(from, to) {
|
||||
from = exports.resolve(from);
|
||||
to = exports.resolve(to);
|
||||
|
||||
// windows is not case sensitive
|
||||
var lowerFrom = from.toLowerCase();
|
||||
var lowerTo = to.toLowerCase();
|
||||
|
||||
function trim(arr) {
|
||||
var start = 0;
|
||||
for (; start < arr.length; start++) {
|
||||
if (arr[start] !== '') break;
|
||||
}
|
||||
|
||||
var end = arr.length - 1;
|
||||
for (; end >= 0; end--) {
|
||||
if (arr[end] !== '') break;
|
||||
}
|
||||
|
||||
if (start > end) return [];
|
||||
return arr.slice(start, end + 1);
|
||||
}
|
||||
|
||||
var toParts = trim(to.split('\\'));
|
||||
|
||||
var lowerFromParts = trim(lowerFrom.split('\\'));
|
||||
var lowerToParts = trim(lowerTo.split('\\'));
|
||||
|
||||
var length = Math.min(lowerFromParts.length, lowerToParts.length);
|
||||
var samePartsLength = length;
|
||||
for (var i = 0; i < length; i++) {
|
||||
if (lowerFromParts[i] !== lowerToParts[i]) {
|
||||
samePartsLength = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (samePartsLength == 0) {
|
||||
return to;
|
||||
}
|
||||
|
||||
var outputParts = [];
|
||||
for (var i = samePartsLength; i < lowerFromParts.length; i++) {
|
||||
outputParts.push('..');
|
||||
}
|
||||
|
||||
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
||||
|
||||
return outputParts.join('\\');
|
||||
};
|
||||
|
||||
exports.sep = '\\';
|
||||
exports.delimiter = ';';
|
||||
|
||||
} else /* posix */ {
|
||||
|
||||
// Split a filename into [root, dir, basename, ext], unix version
|
||||
// 'root' is just a slash, or nothing.
|
||||
var splitPathRe =
|
||||
/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
|
||||
var splitPath = function(filename) {
|
||||
return splitPathRe.exec(filename).slice(1);
|
||||
};
|
||||
|
||||
// path.resolve([from ...], to)
|
||||
// posix version
|
||||
exports.resolve = function() {
|
||||
var resolvedPath = '',
|
||||
resolvedAbsolute = false;
|
||||
|
||||
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
||||
var path = (i >= 0) ? arguments[i] : process.cwd();
|
||||
|
||||
// Skip empty and invalid entries
|
||||
if (!util.isString(path)) {
|
||||
throw new TypeError('Arguments to path.resolve must be strings');
|
||||
} else if (!path) {
|
||||
continue;
|
||||
}
|
||||
|
||||
resolvedPath = path + '/' + resolvedPath;
|
||||
resolvedAbsolute = path.charAt(0) === '/';
|
||||
}
|
||||
|
||||
// At this point the path should be resolved to a full absolute path, but
|
||||
// handle relative paths to be safe (might happen when process.cwd() fails)
|
||||
|
||||
// Normalize the path
|
||||
resolvedPath = normalizeArray(resolvedPath.split('/').filter(function(p) {
|
||||
return !!p;
|
||||
}), !resolvedAbsolute).join('/');
|
||||
|
||||
return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
|
||||
};
|
||||
|
||||
// path.normalize(path)
|
||||
// posix version
|
||||
exports.normalize = function(path) {
|
||||
var isAbsolute = exports.isAbsolute(path),
|
||||
trailingSlash = path[path.length - 1] === '/',
|
||||
segments = path.split('/'),
|
||||
nonEmptySegments = [];
|
||||
|
||||
// Normalize the path
|
||||
for (var i = 0; i < segments.length; i++) {
|
||||
if (segments[i]) {
|
||||
nonEmptySegments.push(segments[i]);
|
||||
}
|
||||
}
|
||||
path = normalizeArray(nonEmptySegments, !isAbsolute).join('/');
|
||||
|
||||
if (!path && !isAbsolute) {
|
||||
path = '.';
|
||||
}
|
||||
if (path && trailingSlash) {
|
||||
path += '/';
|
||||
}
|
||||
|
||||
return (isAbsolute ? '/' : '') + path;
|
||||
};
|
||||
|
||||
// posix version
|
||||
exports.isAbsolute = function(path) {
|
||||
return path.charAt(0) === '/';
|
||||
};
|
||||
|
||||
// posix version
|
||||
exports.join = function() {
|
||||
var path = '';
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var segment = arguments[i];
|
||||
if (!util.isString(segment)) {
|
||||
throw new TypeError('Arguments to path.join must be strings');
|
||||
}
|
||||
if (segment) {
|
||||
if (!path) {
|
||||
path += segment;
|
||||
} else {
|
||||
path += '/' + segment;
|
||||
}
|
||||
}
|
||||
}
|
||||
return exports.normalize(path);
|
||||
};
|
||||
|
||||
|
||||
// path.relative(from, to)
|
||||
// posix version
|
||||
exports.relative = function(from, to) {
|
||||
from = exports.resolve(from).substr(1);
|
||||
to = exports.resolve(to).substr(1);
|
||||
|
||||
function trim(arr) {
|
||||
var start = 0;
|
||||
for (; start < arr.length; start++) {
|
||||
if (arr[start] !== '') break;
|
||||
}
|
||||
|
||||
var end = arr.length - 1;
|
||||
for (; end >= 0; end--) {
|
||||
if (arr[end] !== '') break;
|
||||
}
|
||||
|
||||
if (start > end) return [];
|
||||
return arr.slice(start, end + 1);
|
||||
}
|
||||
|
||||
var fromParts = trim(from.split('/'));
|
||||
var toParts = trim(to.split('/'));
|
||||
|
||||
var length = Math.min(fromParts.length, toParts.length);
|
||||
var samePartsLength = length;
|
||||
for (var i = 0; i < length; i++) {
|
||||
if (fromParts[i] !== toParts[i]) {
|
||||
samePartsLength = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var outputParts = [];
|
||||
for (var i = samePartsLength; i < fromParts.length; i++) {
|
||||
outputParts.push('..');
|
||||
}
|
||||
|
||||
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
||||
|
||||
return outputParts.join('/');
|
||||
};
|
||||
|
||||
exports.sep = '/';
|
||||
exports.delimiter = ':';
|
||||
}
|
||||
|
||||
exports.dirname = function(path) {
|
||||
var result = splitPath(path),
|
||||
root = result[0],
|
||||
dir = result[1];
|
||||
|
||||
if (!root && !dir) {
|
||||
// No dirname whatsoever
|
||||
return '.';
|
||||
}
|
||||
|
||||
if (dir) {
|
||||
// It has a dirname, strip trailing slash
|
||||
dir = dir.substr(0, dir.length - 1);
|
||||
}
|
||||
|
||||
return root + dir;
|
||||
};
|
||||
|
||||
|
||||
exports.basename = function(path, ext) {
|
||||
var f = splitPath(path)[2];
|
||||
// TODO: make this comparison case-insensitive on windows?
|
||||
if (ext && f.substr(-1 * ext.length) === ext) {
|
||||
f = f.substr(0, f.length - ext.length);
|
||||
}
|
||||
return f;
|
||||
};
|
||||
|
||||
|
||||
exports.extname = function(path) {
|
||||
return splitPath(path)[3];
|
||||
};
|
||||
|
||||
|
||||
exports.exists = util.deprecate(function(path, callback) {
|
||||
require('fs').exists(path, callback);
|
||||
}, 'path.exists is now called `fs.exists`.');
|
||||
|
||||
|
||||
exports.existsSync = util.deprecate(function(path) {
|
||||
return require('fs').existsSync(path);
|
||||
}, 'path.existsSync is now called `fs.existsSync`.');
|
||||
|
||||
|
||||
if (isWindows) {
|
||||
exports._makeLong = function(path) {
|
||||
// Note: this will *probably* throw somewhere.
|
||||
if (!util.isString(path))
|
||||
return path;
|
||||
|
||||
if (!path) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var resolvedPath = exports.resolve(path);
|
||||
|
||||
if (/^[a-zA-Z]\:\\/.test(resolvedPath)) {
|
||||
// path is local filesystem path, which needs to be converted
|
||||
// to long UNC path.
|
||||
return '\\\\?\\' + resolvedPath;
|
||||
} else if (/^\\\\[^?.]/.test(resolvedPath)) {
|
||||
// path is network UNC path, which needs to be converted
|
||||
// to long UNC path.
|
||||
return '\\\\?\\UNC\\' + resolvedPath.substring(2);
|
||||
}
|
||||
|
||||
return path;
|
||||
};
|
||||
} else {
|
||||
exports._makeLong = function(path) {
|
||||
return path;
|
||||
};
|
||||
}
|
||||
|
||||
exports.posix = exports;
|
@ -34,7 +34,7 @@ export class EvalHelper {
|
||||
// their locations.
|
||||
public modules = {
|
||||
spdlog: require("spdlog") as typeof import("spdlog"),
|
||||
pty: require("node-pty-prebuilt") as typeof import("node-pty-prebuilt"),
|
||||
pty: require("node-pty-prebuilt") as typeof import("node-pty"),
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -43,7 +43,6 @@ const execute = (command: string, args: string[] = [], options: cp.SpawnOptions,
|
||||
export type TaskFunction = (runner: Runner) => void | Promise<void>;
|
||||
|
||||
export interface Runner {
|
||||
|
||||
cwd: string;
|
||||
execute(command: string, args?: string[], env?: object): Promise<CommandResult>;
|
||||
}
|
||||
@ -84,6 +83,7 @@ export const run = (name: string = process.argv[2]): void | Promise<void> => {
|
||||
let cwd: string = process.cwd();
|
||||
const log = logger.named(name);
|
||||
const timer = time(Number.MAX_SAFE_INTEGER);
|
||||
let outputTimer: NodeJS.Timer | undefined;
|
||||
log.info("Starting...");
|
||||
const prom = task.func({
|
||||
set cwd(path: string) {
|
||||
@ -99,7 +99,19 @@ export const run = (name: string = process.argv[2]): void | Promise<void> => {
|
||||
|
||||
if (prom) {
|
||||
activated.set(name, prom);
|
||||
|
||||
const doOutput = (): void => {
|
||||
outputTimer = setTimeout(() => {
|
||||
log.info("Still running...");
|
||||
doOutput();
|
||||
}, 60 * 1000 * 5);
|
||||
};
|
||||
doOutput();
|
||||
|
||||
prom.then(() => {
|
||||
if (outputTimer) {
|
||||
clearTimeout(outputTimer);
|
||||
}
|
||||
log.info("Completed!", field("time", timer));
|
||||
}).catch((ex) => {
|
||||
activated.delete(name);
|
||||
|
@ -5,7 +5,7 @@
|
||||
"files": [],
|
||||
"scripts": {
|
||||
"start": "node --max-old-space-size=32384 --require ts-node/register --require tsconfig-paths/register src/cli.ts",
|
||||
"build": "rm -rf ./out && export CLI=true && UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js",
|
||||
"build": "rm -rf ./out && cross-env CLI=true UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js",
|
||||
"build:nexe": "node scripts/nexe.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -45,7 +45,7 @@ export class Entry extends Command {
|
||||
}
|
||||
|
||||
const { args, flags } = this.parse(Entry);
|
||||
const dataDir = flags["data-dir"] || path.join(os.homedir(), ".vscode-remote");
|
||||
const dataDir = flags["data-dir"] || path.join(os.homedir(), ".code-server");
|
||||
const workingDir = args["workdir"];
|
||||
|
||||
setupNativeModules(dataDir);
|
||||
@ -112,9 +112,9 @@ export class Entry extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("\u001B[1mvscode-remote v1.0.0");
|
||||
logger.info("\u001B[1mcode-server v1.0.0");
|
||||
// TODO: fill in appropriate doc url
|
||||
logger.info("Additional documentation: https://coder.com/docs");
|
||||
logger.info("Additional documentation: http://github.com/codercom/code-server");
|
||||
logger.info("Initializing", field("data-dir", dataDir), field("working-dir", workingDir), field("log-dir", logDir));
|
||||
const sharedProcess = new SharedProcess(dataDir, builtInExtensionsDir);
|
||||
const sendSharedProcessReady = (socket: WebSocket): void => {
|
||||
|
@ -13,13 +13,13 @@ export const setup = (dataDirectory: string): void => {
|
||||
try {
|
||||
fs.mkdirSync(currentDir);
|
||||
} catch (ex) {
|
||||
if (ex.code !== "EEXIST" && ex.code !== "EISDIR") {
|
||||
if (ex.code !== "EEXIST" && ex.code !== "EISDIR" && ex.code !== "ENOENT") {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
return currentDir;
|
||||
}, path.sep);
|
||||
}); // Might need path.sep here for linux. Having it for windows causes an error because \C:\Users ...
|
||||
|
||||
const unpackModule = (moduleName: string): void => {
|
||||
const memFile = path.join(isCli ? buildDir! : path.join(__dirname, ".."), "build/dependencies", moduleName);
|
||||
@ -37,12 +37,13 @@ export const setup = (dataDirectory: string): void => {
|
||||
unpackModule("pty.node");
|
||||
unpackModule("spdlog.node");
|
||||
unpackModule("rg");
|
||||
const nodePtyUtils = require("../../protocol/node_modules/node-pty-prebuilt/lib/utils") as typeof import("../../protocol/node_modules/node-pty-prebuilt/src/utils");
|
||||
// const nodePtyUtils = require("../../protocol/node_modules/node-pty-prebuilt/lib/utils") as typeof import("../../protocol/node_modules/node-pty-prebuilt/src/utils");
|
||||
// tslint:disable-next-line:no-any
|
||||
nodePtyUtils.loadNative = (modName: string): any => {
|
||||
return (typeof __non_webpack_require__ !== "undefined" ? __non_webpack_require__ : require)(path.join(dataDirectory, "dependencies", modName + ".node"));
|
||||
};
|
||||
// nodePtyUtils.loadNative = (modName: string): any => {
|
||||
// return (typeof __non_webpack_require__ !== "undefined" ? __non_webpack_require__ : require)(path.join(dataDirectory, "dependencies", modName + ".node"));
|
||||
// };
|
||||
(<any>global).RIPGREP_LOCATION = path.join(dataDirectory, "dependencies", "rg");
|
||||
(<any>global).NODEPTY_LOCATION = path.join(dataDirectory, "dependencies", "pty.node");
|
||||
// tslint:disable-next-line:no-any
|
||||
(<any>global).SPDLOG_LOCATION = path.join(dataDirectory, "dependencies", "spdlog.node");
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
|
@ -23,7 +23,7 @@ export type SharedProcessEvent = {
|
||||
};
|
||||
|
||||
export class SharedProcess {
|
||||
public readonly socketPath: string = path.join(os.tmpdir(), `.vscode-remote${Math.random().toString()}`);
|
||||
public readonly socketPath: string = os.platform() === "win32" ? path.join("\\\\?\\pipe", os.tmpdir(), `.code-server${Math.random().toString()}`) : path.join(os.tmpdir(), `.code-server${Math.random().toString()}`);
|
||||
private _state: SharedProcessState = SharedProcessState.Stopped;
|
||||
private activeProcess: ChildProcess | undefined;
|
||||
private ipcHandler: StdioIpcHandler | undefined;
|
||||
|
@ -31,7 +31,7 @@ module.exports = merge(
|
||||
entry: "./packages/server/src/cli.ts",
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"process.env.BUILD_DIR": `"${__dirname}"`,
|
||||
"process.env.BUILD_DIR": `"${__dirname.replace(/\\/g, "\\\\")}"`,
|
||||
"process.env.CLI": `"${process.env.CLI ? "true" : "false"}"`,
|
||||
}),
|
||||
],
|
||||
|
@ -3,7 +3,7 @@
|
||||
"description": "VS Code implementation of the browser-based IDE client.",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"build:bootstrap-fork": "UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.bootstrap.config.js"
|
||||
"build:bootstrap-fork": "cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.bootstrap.config.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"iconv-lite": "^0.4.24",
|
||||
|
@ -2,5 +2,5 @@ module.exports = function(source) {
|
||||
if (this.resourcePath.endsWith(".ts")) {
|
||||
this.resourcePath = this.resourcePath.replace(".ts", ".css");
|
||||
}
|
||||
return `module.exports = require("${this.resourcePath}");`;
|
||||
return `module.exports = require("${this.resourcePath.replace(/\\/g, "\\\\")}");`;
|
||||
};
|
||||
|
@ -20,6 +20,7 @@ if (platform.language === "en-US") {
|
||||
(platform as any).isLinux = os.platform() === "linux";
|
||||
(platform as any).isWindows = os.platform() === "win32";
|
||||
(platform as any).isMacintosh = os.platform() === "darwin";
|
||||
(platform as any).platform = os.platform() === "linux" ? platform.Platform.Linux : os.platform() === "win32" ? platform.Platform.Windows : platform.Platform.Mac;
|
||||
|
||||
// This is used for keybindings, and in one place to choose between \r\n and \n
|
||||
// (which we change to use platform.isWindows instead).
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { IProductConfiguration } from "vs/platform/node/product";
|
||||
|
||||
const product = {
|
||||
nameShort: "VSCode",
|
||||
nameLong: "VSCode Remote",
|
||||
dataFolderName: ".vscode-remote",
|
||||
nameShort: "code-server",
|
||||
nameLong: "code-server",
|
||||
dataFolderName: ".code-server",
|
||||
extensionsGallery: {
|
||||
serviceUrl: "https://marketplace.visualstudio.com/_apis/public/gallery",
|
||||
cacheUrl: "https://vscode.blob.core.windows.net/gallery/index",
|
||||
|
120
packages/vscode/src/vscode-coder.svg
Normal file
120
packages/vscode/src/vscode-coder.svg
Normal file
@ -0,0 +1,120 @@
|
||||
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1931.4829 673.2347" style="enable-background:new 0 0 1931.4829 673.2347;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:rgba(255, 255, 255, 0.5);}
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M1929.7632,603.9686c1.4396-0.5971,1.7089-1.3402,1.7086-2.713
|
||||
c-0.0248-163.9854-0.0234-327.9708-0.0234-491.9562c0-12.4924-0.0243-24.985,0.0344-37.4771
|
||||
c0.0066-1.3833-0.3817-2.0183-1.689-2.5611c-54.9606-22.8242-109.9023-45.6934-164.8444-68.5619
|
||||
c-0.48-0.1997-0.9326-0.4648-1.3981-0.6993c-0.1173,0-0.2346,0-0.3519,0c0.4673,0.5191,0.5168,1.1617,0.5333,1.8131
|
||||
c0.0194,0.7623,0.0111,1.5249,0.0111,2.2873c0.0002,189.9129,0.0002,379.8259,0,569.7389c0,0.8211,0.0226,1.6429-0.0151,2.4631
|
||||
c-0.0931,2.0226-0.4724,2.3998-2.474,2.1327c-4.3596-0.5821-8.7021-1.2866-13.0532-1.9301
|
||||
c-45.832-6.7784-91.6566-13.6085-137.4861-20.4042c-41.0143-6.0818-82.0256-12.1832-123.0378-18.2783
|
||||
c-38.0541-5.6555-76.1079-11.3119-114.1622-16.9656c-35.3278-5.2487-70.6526-10.5182-105.9854-15.7336
|
||||
c-2.0853-0.3079-4.1615-0.6696-6.1982-1.2027c-0.2684-0.063-0.5308-0.1476-0.7754-0.23
|
||||
c-0.0117,0.0124-0.0236,0.0247-0.0353,0.0371c0.0353,0.0127,0.0707,0.0252,0.1068,0.0349
|
||||
c1.5455,0.3428,3.0636,0.7721,4.5651,1.2682c19.8765,6.5677,39.6877,13.3294,59.5316,19.994
|
||||
c22.5669,7.579,45.1259,15.1822,67.6832,22.7897c22.7241,7.6638,45.4596,15.2939,68.181,22.9655
|
||||
c22.3882,7.559,44.7914,15.0738,67.1809,22.6284c22.8896,7.7234,45.7966,15.3951,68.6785,23.1408
|
||||
c11.3302,3.8354,22.6963,7.5626,34.0179,11.4222c22.7544,7.7571,45.5649,15.3473,68.3439,23.0312
|
||||
c20.6123,6.9529,41.218,13.9249,61.8394,20.851c0.8097,0.2719,1.9276,0.1942,2.1981,1.381c0.2346,0,0.4692,0,0.7039,0
|
||||
c4.7661-2.3583,9.75-4.2104,14.6504-6.2518C1828.7076,645.9431,1879.2242,624.929,1929.7632,603.9686z"/>
|
||||
<path class="st0" d="M1763.1943,575.5533c0,0.4692-0.0424,0.943,0.0083,1.4066c0.1128,1.0324-0.2142,1.2241-1.2738,1.0616
|
||||
c-9.8422-1.509-19.6963-2.9406-29.5464-4.3994c-12.8628-1.9051-25.7256-3.8115-38.5875-5.7233
|
||||
c-13.9615-2.0753-27.9218-4.1604-41.8833-6.2358c-12.9198-1.9206-25.8412-3.8302-38.7609-5.7515
|
||||
c-13.8464-2.0591-27.6913-4.1281-41.5374-6.1891c-13.0929-1.9489-26.1864-3.8943-39.2799-5.8396
|
||||
c-12.9778-1.928-25.9557-3.8548-38.9337-5.7805c-13.8469-2.0547-27.6942-4.1067-41.541-6.1614
|
||||
c-13.8469-2.0547-27.6935-4.1117-41.5403-6.1669c-12.9779-1.9261-25.9567-3.8469-38.934-5.7776
|
||||
c-13.7881-2.0515-27.5741-4.1171-41.3624-6.1669c-13.847-2.0586-27.6954-4.1081-41.5441-6.1562
|
||||
c-9.27-1.3709-18.5415-2.7323-27.8123-4.098c-0.0365,0.0385-0.0729,0.0769-0.1094,0.1153c0.2446,0.0824,0.507,0.167,0.7754,0.23
|
||||
c2.0367,0.5331,4.1129,0.8949,6.1982,1.2027c35.3328,5.2154,70.6576,10.4848,105.9854,15.7336
|
||||
c38.0543,5.6537,76.1082,11.3101,114.1622,16.9656c41.0122,6.0951,82.0236,12.1964,123.0378,18.2783
|
||||
c45.8295,6.7958,91.6541,13.6258,137.4861,20.4042c4.3511,0.6435,8.6936,1.348,13.0532,1.9301
|
||||
c2.0016,0.2672,2.3809-0.1101,2.474-2.1327c0.0377-0.8202,0.0151-1.642,0.0151-2.4631c0.0002-189.913,0.0002-379.8259,0-569.7389
|
||||
c0-0.7624,0.0083-1.525-0.0111-2.2873c-0.0165-0.6513-0.066-1.2939-0.5333-1.8131c-0.0017,0.821-0.005,1.6421-0.005,2.4631
|
||||
C1763.1943,193.4932,1763.1943,384.5232,1763.1943,575.5533z"/>
|
||||
<path class="st0" d="M1760.6494,671.8537c-20.6213-6.9261-41.2271-13.898-61.8394-20.851
|
||||
c-22.7789-7.684-45.5895-15.2742-68.3439-23.0312c-11.3217-3.8596-22.6877-7.5867-34.0179-11.4222
|
||||
c-22.8818-7.7457-45.7888-15.4174-68.6785-23.1408c-22.3895-7.5546-44.7927-15.0693-67.1809-22.6284
|
||||
c-22.7214-7.6716-45.4569-15.3017-68.181-22.9655c-22.5574-7.6075-45.1163-15.2106-67.6832-22.7897
|
||||
c-19.8439-6.6646-39.6552-13.4264-59.5316-19.994c-1.5015-0.4961-3.0195-0.9254-4.5651-1.2682
|
||||
c-0.0361-0.0097-0.0715-0.0222-0.1068-0.0349c-0.0531,0.056-0.1063,0.112-0.1594,0.168c0.1714,0.0404,0.3473,0.0671,0.5133,0.1231
|
||||
c44.8008,15.0995,89.598,30.2094,134.4016,45.3005c53.5636,18.0416,107.1333,36.0649,160.699,54.1002
|
||||
c62.9932,21.2097,125.9878,42.4147,188.9722,63.6505c5.9792,2.0159,12.027,3.838,17.8998,6.1647
|
||||
C1762.577,672.0479,1761.4591,672.1256,1760.6494,671.8537z"/>
|
||||
<path class="st0" d="M1301.9984,195.5446c30.6482,30.312,61.2968,60.6236,91.9856,90.8944
|
||||
c1.0867,1.0718,0.9404,1.5428-0.0563,2.5262c-26.7173,26.3633-53.4128,52.7488-80.0759,79.1672
|
||||
c-4.366,4.3259-8.5625,8.8227-12.9098,13.3153c11.8278,3.9569,23.8206,7.9355,35.7803,12.0113
|
||||
c1.5485,0.5277,2.5947,0.3879,3.9293-0.6207c30.0209-22.6888,60.0891-45.3149,90.1223-67.9876
|
||||
c0.9867-0.7448,1.4767-0.5905,2.2823,0.2107c9.7728,9.718,19.5835,19.3979,29.3835,29.0886
|
||||
c40.8278,40.3716,81.661,80.7377,122.4548,121.1434c1.2091,1.1975,2.0908,1.4453,3.7167,0.7505
|
||||
c29.4891-12.6023,59.0061-25.1399,88.5415-37.6335c1.5291-0.6468,2.004-1.429,2.0033-3.0745
|
||||
c-0.0433-98.4719-0.0432-196.9438,0.0006-295.4156c0.0007-1.5864-0.4436-2.3221-1.9178-2.9456
|
||||
c-29.642-12.5382-59.264-25.1236-88.8638-37.7613c-1.427-0.6093-2.2021-0.4203-3.2786,0.6452
|
||||
c-50.5996,50.0887-101.2366,100.1396-151.8346,150.2299c-1.0571,1.0466-1.6373,1.0657-2.8074,0.182
|
||||
c-30.0752-22.7139-60.1871-45.3791-90.2747-68.0768c-0.9258-0.6984-1.6973-0.8858-2.8372-0.4931
|
||||
c-7.1377,2.4584-14.3036,4.8349-21.4633,7.2294c-5.0376,1.6849-10.08,3.3555-15.1321,5.0364
|
||||
C1300.9674,194.7592,1301.5529,195.1039,1301.9984,195.5446z M1586.4037,207.6721c0,53.3866,0,106.567,0,159.9999
|
||||
c-35.4253-26.6811-70.7408-53.2795-106.2178-79.9995C1515.6472,260.9639,1550.9338,234.3869,1586.4037,207.6721z"/>
|
||||
<path class="st0" d="M1260.3132,503.6394c0.0011-0.01,0.0028-0.0196,0.0054-0.0284c-0.0653-0.0223-0.1327-0.0454-0.1934-0.0656
|
||||
C1260.1838,503.5753,1260.2473,503.6077,1260.3132,503.6394z"/>
|
||||
<path class="st0" d="M1260.3132,503.6394c-0.0659-0.0318-0.1294-0.0642-0.188-0.0939c-0.1263-0.0419-0.2438-0.0787-0.345-0.1039
|
||||
c0.0796-0.025,0.1997,0.0302,0.345,0.1039c0.0607,0.0201,0.1281,0.0432,0.1934,0.0656c0.0271-0.096,0.1327-0.1175,0.3472-0.0357
|
||||
c-0.4587-0.3762-0.9508-0.4537-1.6847-0.0989c0.569,0.1729,0.9749,0.2961,1.3806,0.4194c0,0,0,0,0,0l0,0
|
||||
C1260.3226,503.7886,1260.3059,503.7026,1260.3132,503.6394z"/>
|
||||
<path class="st0" d="M1259.7803,503.4417c0.1012,0.0251,0.2186,0.0619,0.345,0.1039
|
||||
C1259.98,503.4718,1259.8599,503.4167,1259.7803,503.4417z"/>
|
||||
<path class="st0" d="M1260.3132,503.6394c0.0665,0.0322,0.1359,0.0625,0.2079,0.0884c0.0117-0.0124,0.0236-0.0247,0.0353-0.0371
|
||||
c-0.0829-0.0279-0.1603-0.0531-0.2378-0.0796C1260.316,503.6199,1260.3143,503.6294,1260.3132,503.6394z"/>
|
||||
<path class="st0" d="M1260.3617,503.8958L1260.3617,503.8958c0.0531-0.056,0.1063-0.112,0.1594-0.168
|
||||
c-0.072-0.0259-0.1414-0.0562-0.2079-0.0884C1260.3059,503.7026,1260.3226,503.7886,1260.3617,503.8958z"/>
|
||||
<path class="st0" d="M1260.3186,503.6111c0.0775,0.0265,0.1549,0.0517,0.2378,0.0796c0.0365-0.0384,0.0729-0.0768,0.1094-0.1153
|
||||
C1260.4513,503.4936,1260.3457,503.5151,1260.3186,503.6111z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M835.941,281.8761c-17.0706,0-28.4509-9.8285-28.4509-30.0028v-115.873
|
||||
c0-73.9725-31.0374-114.8384-111.2174-114.8384h-37.2449v78.1108h11.3804c31.5547,0,46.5561,17.0706,46.5561,47.5907v102.4235
|
||||
c0,44.487,13.4496,62.5921,42.9351,71.9033c-29.4855,8.7939-42.9351,27.4164-42.9351,71.9034c0,25.3472,0,50.6945,0,76.0417
|
||||
c0,21.2089,0,41.9005-5.6902,63.1094c-5.6902,19.657-15.0013,38.2795-27.9336,54.3154
|
||||
c-7.2421,9.3113-15.5187,17.0706-24.83,24.3126v10.3458h37.2449c80.18,0,111.2174-40.8659,111.2174-114.8384V390.507
|
||||
c0-20.6916,10.8631-30.0028,28.4509-30.0028h21.2089v-78.1108H835.941V281.8761L835.941,281.8761z"/>
|
||||
<path class="st0" d="M582.4688,139.1039H467.6303c-2.5865,0-4.6556-2.0692-4.6556-4.6556v-8.7939
|
||||
c0-2.5865,2.0692-4.6556,4.6556-4.6556H582.986c2.5865,0,4.6556,2.0692,4.6556,4.6556v8.7939
|
||||
C587.6417,137.0348,585.0552,139.1039,582.4688,139.1039z"/>
|
||||
<path class="st0" d="M602.1258,250.8386h-83.801c-2.5865,0-4.6556-2.0692-4.6556-4.6556v-8.7939
|
||||
c0-2.5864,2.0692-4.6556,4.6556-4.6556h83.801c2.5865,0,4.6556,2.0692,4.6556,4.6556v8.7939
|
||||
C606.7814,248.2522,604.7122,250.8386,602.1258,250.8386z"/>
|
||||
<path class="st0" d="M635.2324,194.9713h-167.602c-2.5865,0-4.6556-2.0692-4.6556-4.6556v-8.7939
|
||||
c0-2.5865,2.0692-4.6556,4.6556-4.6556H634.715c2.5865,0,4.6556,2.0692,4.6556,4.6556v8.7939
|
||||
C639.3707,192.3848,637.8188,194.9713,635.2324,194.9713z"/>
|
||||
<g>
|
||||
<path class="st0" d="M334.6868,164.4512c11.3804,0,22.7608,1.0346,33.6239,3.621v-21.2089
|
||||
c0-30.0028,15.5187-47.5907,46.5561-47.5907h11.3804V21.1618h-37.2449c-80.18,0-111.2174,40.8659-111.2174,114.8384v38.2795
|
||||
C295.89,168.0722,315.0297,164.4512,334.6868,164.4512z"/>
|
||||
</g>
|
||||
<path class="st0" d="M670.4081,445.857c-8.2767-65.6958-58.9711-120.5286-124.1497-132.9436
|
||||
c-18.1052-3.621-36.2103-4.1383-53.7982-1.0346c-0.5173,0-0.5173-0.5173-1.0346-0.5173
|
||||
c-28.451-59.4884-89.4912-98.8024-155.7043-98.8024S208.9852,250.8386,180.017,310.327c-0.5173,0-0.5173,0.5173-1.0346,0.5173
|
||||
c-18.6224-2.0692-37.2449-1.0346-55.8673,3.621C58.9711,329.984,10.3458,383.7822,1.5519,448.9608
|
||||
C0.5173,455.6855,0,462.4103,0,468.6178c0,19.657,13.4495,37.7622,33.1066,40.3487c24.3126,3.621,45.5215-15.0014,45.0042-38.7968
|
||||
c0-3.621,0-7.7594,0.5173-11.3804c4.1383-33.1066,29.4855-61.0403,62.5921-68.7996c10.3458-2.5865,20.6916-3.1037,30.5201-1.5519
|
||||
c31.5547,4.1383,62.5921-11.8977,76.0417-39.8314c9.8285-20.6916,25.3472-38.7968,46.0388-48.6253
|
||||
c22.7608-10.8631,48.6253-12.4149,72.4206-4.1383c24.83,8.7939,43.4524,27.4164,54.8328,50.6944
|
||||
c11.8977,22.7608,17.5879,38.7968,42.9351,41.9005c10.3458,1.5519,39.3141,1.0345,50.1772,0.5173
|
||||
c21.2089,0,42.4178,7.2421,57.4192,22.2435c9.8286,10.3458,17.0706,23.278,20.1743,37.7622
|
||||
c4.6556,23.278-1.0345,46.5561-15.0014,64.144c-9.8286,12.415-23.2781,21.7262-38.2795,25.8645
|
||||
c-7.2421,2.0692-14.4841,2.5865-21.7262,2.5865c-4.1383,0-9.8285,0-16.5533,0c-20.6916,0-64.6613,0-97.7679,0
|
||||
c-22.7608,0-40.8659-18.1052-40.8659-40.866v-76.559v-75.0071c0-6.2075-5.1729-11.3804-11.3804-11.3804h-16.036
|
||||
c-31.5547,0.5173-56.9019,35.693-56.9019,72.9379s0,136.0473,0,136.0473c0,40.3487,32.5893,72.9379,72.9379,72.9379
|
||||
c0,0,179.4997-0.5173,182.0862-0.5173c41.3832-4.1383,79.6627-25.3472,105.5272-57.9365
|
||||
C663.6833,529.6581,675.581,488.2748,670.4081,445.857z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M1089.9685,243.7693v67.6499h64.1846v30.1948h-64.1846v67.98h-33v-67.98H993.113v-30.1948h63.8555v-67.6499
|
||||
H1089.9685z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 10 KiB |
@ -41,3 +41,10 @@
|
||||
min-width: -moz-fit-content;
|
||||
}
|
||||
}
|
||||
|
||||
.window-appicon {
|
||||
background-image: url(./vscode-coder.svg) !important;
|
||||
background-size: 56px !important;
|
||||
width: 56px !important;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
@ -36,12 +36,12 @@ module.exports = merge(
|
||||
loader: "ignore-loader",
|
||||
}],
|
||||
}, {
|
||||
test: /(\/vs\/code\/electron-main\/)|(\/test\/)|(OSSREADME\.json$)|(\.(test\.ts|test\.js|d\.ts|qwoff|node|html|txt|exe|wuff|md|sh|scpt|less)$)/,
|
||||
test: /((\\|\/)vs(\\|\/)code(\\|\/)electron-main(\\|\/))|((\\|\/)test(\\|\/))|(OSSREADME\.json$)|(\.(test\.ts|test\.js|d\.ts|qwoff|node|html|txt|exe|wuff|md|sh|scpt|less)$)/,
|
||||
use: [{
|
||||
loader: "ignore-loader",
|
||||
}],
|
||||
}],
|
||||
noParse: /\/test\/|\.test\.jsx?|\.test\.tsx?|tsconfig.+\.json$/,
|
||||
noParse: /(\\|\/)test(\\|\/)|\.test\.jsx?|\.test\.tsx?|tsconfig.+\.json$/,
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@coder/web",
|
||||
"scripts": {
|
||||
"build": "UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js"
|
||||
"build": "cross-env UV_THREADPOOL_SIZE=100 node --max-old-space-size=32384 ../../node_modules/webpack/bin/webpack.js --config ./webpack.config.js"
|
||||
}
|
||||
}
|
@ -48,7 +48,7 @@ module.exports = merge(
|
||||
// path.posix and path.parse are undefined (among other things possibly).
|
||||
// Also if we don't provide the full path, the code in vscode will import
|
||||
// from vscode's node_modules which is the wrong version.
|
||||
"path": path.join(root, "node_modules", "path-browserify"),
|
||||
"path": path.join(fills, "path.js"),
|
||||
"crypto": "crypto-browserify",
|
||||
"http": "http-browserify",
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
npm install -g cross-env
|
||||
yarn task build:server:binary
|
||||
|
@ -7,9 +7,11 @@ import { logger, field } from "../packages/logger";
|
||||
/**
|
||||
* Install dependencies for a single package.
|
||||
*/
|
||||
const doInstall = (pkg: string, path: string): void => {
|
||||
const doInstall = (pkg: string, path: string): Promise<void> => {
|
||||
logger.info(`Installing "${pkg}" dependencies...`);
|
||||
exec("yarn", {
|
||||
|
||||
return new Promise((resolve): void => {
|
||||
exec("yarn --network-concurrency 1", {
|
||||
cwd: path,
|
||||
maxBuffer: 1024 * 1024 * 10,
|
||||
}, (error, stdout, stderr) => {
|
||||
@ -24,28 +26,29 @@ const doInstall = (pkg: string, path: string): void => {
|
||||
}
|
||||
|
||||
logger.info(`Successfully grabbed \"${pkg}\" dependencies!`);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Install dependencies for all packages.
|
||||
*/
|
||||
const handlePackages = (dir: string): void => {
|
||||
readdirSync(dir).forEach((pkg) => {
|
||||
const handlePackages = async (dir: string): Promise<void> => {
|
||||
const dirs = readdirSync(dir);
|
||||
for (let i = 0; i < dirs.length; i++) {
|
||||
const pkg = dirs[i];
|
||||
const pkgDir = join(dir, pkg);
|
||||
const pkgJsonPath = join(pkgDir, "package.json");
|
||||
if (existsSync(pkgJsonPath)) {
|
||||
doInstall(pkg, pkgDir);
|
||||
const ip = doInstall(pkg, pkgDir);
|
||||
if (os.platform() === "win32") {
|
||||
await ip;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (os.platform() === "win32") {
|
||||
execSync("yarn", {
|
||||
cwd: resolve(__dirname, "..", "packages", "vscode"),
|
||||
maxBuffer: 1024 * 1024 * 10,
|
||||
});
|
||||
}
|
||||
|
||||
handlePackages(resolve(__dirname, "..", "packages"));
|
||||
handlePackages(resolve(__dirname, "..", "packages", "app"));
|
||||
handlePackages(resolve(__dirname, "..", "packages")).then(() => {
|
||||
return handlePackages(resolve(__dirname, "..", "packages", "app"));
|
||||
});
|
||||
|
@ -282,7 +282,7 @@ index 605c1209e1..e8131513de 100644
|
||||
- platform.isMacintosh
|
||||
+ browser.isMacintosh
|
||||
diff --git a/src/vs/loader.js b/src/vs/loader.js
|
||||
index 4eddcab3a0..5d80768406 100644
|
||||
index 4eddcab3a0..abda3c04f9 100644
|
||||
--- a/src/vs/loader.js
|
||||
+++ b/src/vs/loader.js
|
||||
@@ -671,4 +671,4 @@ var AMDLoader;
|
||||
@ -294,15 +294,20 @@ index 4eddcab3a0..5d80768406 100644
|
||||
+ this._vm = require('vm');
|
||||
+ this._path = require('path');
|
||||
+ this._crypto = require('crypto');
|
||||
@@ -736,0 +737,7 @@ var AMDLoader;
|
||||
@@ -736,0 +737,12 @@ var AMDLoader;
|
||||
+ const context = require.context("../", true, /.*/);
|
||||
+ if (scriptSrc.indexOf("file:///") !== -1) {
|
||||
+ const vsSrc = scriptSrc.split("file:///")[1].split(".js")[0];
|
||||
+ if (this._env.isWindows) {
|
||||
+ const vsSrcSplit = vsSrc.split(":/");
|
||||
+ vsSrcSplit.shift();
|
||||
+ vsSrc = vsSrcSplit.join(":/");
|
||||
+ }
|
||||
+ if (vsSrc && vsSrc.startsWith("vs/")) {
|
||||
+ scriptSrc = `node|./${vsSrc}`;
|
||||
+ }
|
||||
+ }
|
||||
@@ -741 +748 @@ var AMDLoader;
|
||||
@@ -741 +753 @@ var AMDLoader;
|
||||
- moduleExports_1 = nodeRequire(pieces[1]);
|
||||
+ moduleExports_1 = context(pieces[1]);
|
||||
diff --git a/src/vs/platform/clipboard/electron-browser/clipboardService.ts b/src/vs/platform/clipboard/electron-browser/clipboardService.ts
|
||||
|
@ -45,7 +45,7 @@ module.exports = (options = {}) => ({
|
||||
type: "javascript/auto",
|
||||
}, {
|
||||
// Fixes spdlog.
|
||||
test: /spdlog\/index\.js/,
|
||||
test: /spdlog(\\|\/)index\.js/,
|
||||
loader: "string-replace-loader",
|
||||
options: {
|
||||
multiple: [{
|
||||
@ -56,7 +56,7 @@ module.exports = (options = {}) => ({
|
||||
},
|
||||
}, {
|
||||
// This is required otherwise it attempts to require("package.json")
|
||||
test: /@oclif\/command\/lib\/index\.js/,
|
||||
test: /@oclif(\\|\/)command(\\|\/)lib(\\|\/)index\.js/,
|
||||
loader: "string-replace-loader",
|
||||
options: {
|
||||
multiple: [{
|
||||
@ -66,7 +66,7 @@ module.exports = (options = {}) => ({
|
||||
}],
|
||||
},
|
||||
}, {
|
||||
test: /node\-pty\/lib\/index\.js/,
|
||||
test: /node\-pty\-prebuilt(\\|\/)lib(\\|\/)index\.js/,
|
||||
loader: "string-replace-loader",
|
||||
options: {
|
||||
multiple: [{
|
||||
@ -75,6 +75,16 @@ module.exports = (options = {}) => ({
|
||||
flags: "g",
|
||||
}],
|
||||
},
|
||||
}, {
|
||||
test: /node\-pty\-prebuilt(\\|\/)lib(\\|\/)windowsPtyAgent\.js/,
|
||||
loader: "string-replace-loader",
|
||||
options: {
|
||||
multiple: [{
|
||||
search: "var pty = .*;",
|
||||
replace: "var pty = __non_webpack_require__(global.NODEPTY_LOCATION);",
|
||||
flags: "g",
|
||||
}],
|
||||
},
|
||||
}],
|
||||
},
|
||||
resolve: {
|
||||
|
Loading…
Reference in New Issue
Block a user