chore(vscode): update to 1.54.2
This commit is contained in:
@@ -17,7 +17,7 @@ import { Stream } from 'stream';
|
||||
|
||||
const mkdirp = require('mkdirp');
|
||||
|
||||
interface IExtensionDefinition {
|
||||
export interface IExtensionDefinition {
|
||||
name: string;
|
||||
version: string;
|
||||
repo: string;
|
||||
|
||||
79
lib/vscode/build/lib/builtInExtensionsCG.js
Normal file
79
lib/vscode/build/lib/builtInExtensionsCG.js
Normal file
@@ -0,0 +1,79 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const got_1 = require("got");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const url = require("url");
|
||||
const ansiColors = require("ansi-colors");
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
const rootCG = path.join(root, 'extensionsCG');
|
||||
const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
|
||||
const builtInExtensions = productjson.builtInExtensions;
|
||||
const webBuiltInExtensions = productjson.webBuiltInExtensions;
|
||||
const token = process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || undefined;
|
||||
const contentBasePath = 'raw.githubusercontent.com';
|
||||
const contentFileNames = ['package.json', 'package-lock.json', 'yarn.lock'];
|
||||
async function downloadExtensionDetails(extension) {
|
||||
var _a, _b, _c;
|
||||
const extensionLabel = `${extension.name}@${extension.version}`;
|
||||
const repository = url.parse(extension.repo).path.substr(1);
|
||||
const repositoryContentBaseUrl = `https://${token ? `${token}@` : ''}${contentBasePath}/${repository}/v${extension.version}`;
|
||||
const promises = [];
|
||||
for (const fileName of contentFileNames) {
|
||||
promises.push(new Promise(resolve => {
|
||||
got_1.default(`${repositoryContentBaseUrl}/${fileName}`)
|
||||
.then(response => {
|
||||
resolve({ fileName, body: response.rawBody });
|
||||
})
|
||||
.catch(error => {
|
||||
if (error.response.statusCode === 404) {
|
||||
resolve({ fileName, body: undefined });
|
||||
}
|
||||
else {
|
||||
resolve({ fileName, body: null });
|
||||
}
|
||||
});
|
||||
}));
|
||||
}
|
||||
console.log(extensionLabel);
|
||||
const results = await Promise.all(promises);
|
||||
for (const result of results) {
|
||||
if (result.body) {
|
||||
const extensionFolder = path.join(rootCG, extension.name);
|
||||
fs.mkdirSync(extensionFolder, { recursive: true });
|
||||
fs.writeFileSync(path.join(extensionFolder, result.fileName), result.body);
|
||||
console.log(` - ${result.fileName} ${ansiColors.green('✔︎')}`);
|
||||
}
|
||||
else if (result.body === undefined) {
|
||||
console.log(` - ${result.fileName} ${ansiColors.yellow('⚠️')}`);
|
||||
}
|
||||
else {
|
||||
console.log(` - ${result.fileName} ${ansiColors.red('🛑')}`);
|
||||
}
|
||||
}
|
||||
// Validation
|
||||
if (!((_a = results.find(r => r.fileName === 'package.json')) === null || _a === void 0 ? void 0 : _a.body)) {
|
||||
// throw new Error(`The "package.json" file could not be found for the built-in extension - ${extensionLabel}`);
|
||||
}
|
||||
if (!((_b = results.find(r => r.fileName === 'package-lock.json')) === null || _b === void 0 ? void 0 : _b.body) &&
|
||||
!((_c = results.find(r => r.fileName === 'yarn.lock')) === null || _c === void 0 ? void 0 : _c.body)) {
|
||||
// throw new Error(`The "package-lock.json"/"yarn.lock" could not be found for the built-in extension - ${extensionLabel}`);
|
||||
}
|
||||
}
|
||||
async function main() {
|
||||
for (const extension of [...builtInExtensions, ...webBuiltInExtensions]) {
|
||||
await downloadExtensionDetails(extension);
|
||||
}
|
||||
}
|
||||
main().then(() => {
|
||||
console.log(`Built-in extensions component data downloaded ${ansiColors.green('✔︎')}`);
|
||||
process.exit(0);
|
||||
}, err => {
|
||||
console.log(`Built-in extensions component data could not be downloaded ${ansiColors.red('🛑')}`);
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
83
lib/vscode/build/lib/builtInExtensionsCG.ts
Normal file
83
lib/vscode/build/lib/builtInExtensionsCG.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import got from 'got';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as url from 'url';
|
||||
import ansiColors = require('ansi-colors');
|
||||
import { IExtensionDefinition } from './builtInExtensions';
|
||||
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
const rootCG = path.join(root, 'extensionsCG');
|
||||
const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
|
||||
const builtInExtensions = <IExtensionDefinition[]>productjson.builtInExtensions;
|
||||
const webBuiltInExtensions = <IExtensionDefinition[]>productjson.webBuiltInExtensions;
|
||||
const token = process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || undefined;
|
||||
|
||||
const contentBasePath = 'raw.githubusercontent.com';
|
||||
const contentFileNames = ['package.json', 'package-lock.json', 'yarn.lock'];
|
||||
|
||||
async function downloadExtensionDetails(extension: IExtensionDefinition): Promise<void> {
|
||||
const extensionLabel = `${extension.name}@${extension.version}`;
|
||||
const repository = url.parse(extension.repo).path!.substr(1);
|
||||
const repositoryContentBaseUrl = `https://${token ? `${token}@` : ''}${contentBasePath}/${repository}/v${extension.version}`;
|
||||
|
||||
const promises = [];
|
||||
for (const fileName of contentFileNames) {
|
||||
promises.push(new Promise<{ fileName: string, body: Buffer | undefined | null }>(resolve => {
|
||||
got(`${repositoryContentBaseUrl}/${fileName}`)
|
||||
.then(response => {
|
||||
resolve({ fileName, body: response.rawBody });
|
||||
})
|
||||
.catch(error => {
|
||||
if (error.response.statusCode === 404) {
|
||||
resolve({ fileName, body: undefined });
|
||||
} else {
|
||||
resolve({ fileName, body: null });
|
||||
}
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
console.log(extensionLabel);
|
||||
const results = await Promise.all(promises);
|
||||
for (const result of results) {
|
||||
if (result.body) {
|
||||
const extensionFolder = path.join(rootCG, extension.name);
|
||||
fs.mkdirSync(extensionFolder, { recursive: true });
|
||||
fs.writeFileSync(path.join(extensionFolder, result.fileName), result.body);
|
||||
console.log(` - ${result.fileName} ${ansiColors.green('✔︎')}`);
|
||||
} else if (result.body === undefined) {
|
||||
console.log(` - ${result.fileName} ${ansiColors.yellow('⚠️')}`);
|
||||
} else {
|
||||
console.log(` - ${result.fileName} ${ansiColors.red('🛑')}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Validation
|
||||
if (!results.find(r => r.fileName === 'package.json')?.body) {
|
||||
// throw new Error(`The "package.json" file could not be found for the built-in extension - ${extensionLabel}`);
|
||||
}
|
||||
if (!results.find(r => r.fileName === 'package-lock.json')?.body &&
|
||||
!results.find(r => r.fileName === 'yarn.lock')?.body) {
|
||||
// throw new Error(`The "package-lock.json"/"yarn.lock" could not be found for the built-in extension - ${extensionLabel}`);
|
||||
}
|
||||
}
|
||||
|
||||
async function main(): Promise<void> {
|
||||
for (const extension of [...builtInExtensions, ...webBuiltInExtensions]) {
|
||||
await downloadExtensionDetails(extension);
|
||||
}
|
||||
}
|
||||
|
||||
main().then(() => {
|
||||
console.log(`Built-in extensions component data downloaded ${ansiColors.green('✔︎')}`);
|
||||
process.exit(0);
|
||||
}, err => {
|
||||
console.log(`Built-in extensions component data could not be downloaded ${ansiColors.red('🛑')}`);
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -32,7 +32,7 @@ export const config = {
|
||||
version: util.getElectronVersion(),
|
||||
productAppName: product.nameLong,
|
||||
companyName: 'Microsoft Corporation',
|
||||
copyright: 'Copyright (C) 2019 Microsoft. All rights reserved',
|
||||
copyright: 'Copyright (C) 2021 Microsoft. All rights reserved',
|
||||
darwinIcon: 'resources/darwin/code.icns',
|
||||
darwinBundleIdentifier: product.darwinBundleIdentifier,
|
||||
darwinApplicationCategoryType: 'public.app-category.developer-tools',
|
||||
|
||||
@@ -218,6 +218,10 @@
|
||||
"name": "vs/workbench/contrib/webviewPanel",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/workspace",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/contrib/workspaces",
|
||||
"project": "vscode-workbench"
|
||||
@@ -294,6 +298,10 @@
|
||||
"name": "vs/workbench/services/files",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/history",
|
||||
"project": "vscode-workbench"
|
||||
},
|
||||
{
|
||||
"name": "vs/workbench/services/log",
|
||||
"project": "vscode-workbench"
|
||||
|
||||
Reference in New Issue
Block a user