mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Vscode merge (#4582)
* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd * fix issues with merges * bump node version in azpipe * replace license headers * remove duplicate launch task * fix build errors * fix build errors * fix tslint issues * working through package and linux build issues * more work * wip * fix packaged builds * working through linux build errors * wip * wip * wip * fix mac and linux file limits * iterate linux pipeline * disable editor typing * revert series to parallel * remove optimize vscode from linux * fix linting issues * revert testing change * add work round for new node * readd packaging for extensions * fix issue with angular not resolving decorator dependencies
This commit is contained in:
@@ -14,6 +14,8 @@ const fs = require("fs");
|
||||
const _rimraf = require("rimraf");
|
||||
const git = require("./git");
|
||||
const VinylFile = require("vinyl");
|
||||
const download_1 = require("../download/download");
|
||||
const REPO_ROOT = path.join(__dirname, '../../');
|
||||
const NoCancellationToken = { isCancellationRequested: () => false };
|
||||
function incremental(streamProvider, initial, supportsCancellation) {
|
||||
const input = es.through();
|
||||
@@ -180,7 +182,8 @@ function rimraf(dir) {
|
||||
return cb(err);
|
||||
});
|
||||
};
|
||||
return cb => retry(cb);
|
||||
retry.taskName = `clean-${path.basename(dir)}`;
|
||||
return retry;
|
||||
}
|
||||
exports.rimraf = rimraf;
|
||||
function getVersion(root) {
|
||||
@@ -220,3 +223,38 @@ function versionStringToNumber(versionStr) {
|
||||
return parseInt(match[1], 10) * 1e4 + parseInt(match[2], 10) * 1e2 + parseInt(match[3], 10);
|
||||
}
|
||||
exports.versionStringToNumber = versionStringToNumber;
|
||||
function download(requestOptions) {
|
||||
const result = es.through();
|
||||
const filename = path.join(REPO_ROOT, `.build/tmp-${Date.now()}-${path.posix.basename(requestOptions.path)}`);
|
||||
const opts = {
|
||||
requestOptions: requestOptions,
|
||||
destinationPath: filename
|
||||
};
|
||||
download_1.downloadInExternalProcess(opts).then(() => {
|
||||
fs.stat(filename, (err, stat) => {
|
||||
if (err) {
|
||||
result.emit('error', err);
|
||||
return;
|
||||
}
|
||||
fs.readFile(filename, (err, data) => {
|
||||
if (err) {
|
||||
result.emit('error', err);
|
||||
return;
|
||||
}
|
||||
fs.unlink(filename, () => {
|
||||
result.emit('data', new VinylFile({
|
||||
path: path.normalize(requestOptions.path),
|
||||
stat: stat,
|
||||
base: path.normalize(requestOptions.path),
|
||||
contents: data
|
||||
}));
|
||||
result.emit('end');
|
||||
});
|
||||
});
|
||||
});
|
||||
}, (err) => {
|
||||
result.emit('error', err);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
exports.download = download;
|
||||
|
||||
Reference in New Issue
Block a user