提交 42ff2b41 编写于 作者: J Joao Moreno

speed up extension query

fixes #439
上级 4d908945
......@@ -20,6 +20,7 @@ export interface IExtensionManifest {
export interface IGalleryInformation {
galleryApiUrl: string;
id: string;
downloadUrl: string;
publisherId: string;
publisherDisplayName: string;
date: string;
......
......@@ -117,7 +117,7 @@ export class ExtensionsService implements IExtensionsService {
return TPromise.wrapError(new Error(nls.localize('missingGalleryInformation', "Gallery information is missing")));
}
const url = `${ galleryInformation.galleryApiUrl }/publisher/${ extension.publisher }/extension/${ extension.name }/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage?install=true`;
const url = galleryInformation.downloadUrl;
const zipPath = path.join(tmpdir(), galleryInformation.id);
const extensionPath = path.join(this.extensionsPath, `${ extension.publisher }.${ extension.name }`);
const manifestPath = path.join(extensionPath, 'package.json');
......
......@@ -21,6 +21,7 @@ export interface IGalleryExtensionFile {
export interface IGalleryExtensionVersion {
version: string;
lastUpdated: string;
assetUri: string;
files: IGalleryExtensionFile[];
}
......@@ -68,7 +69,7 @@ export class GalleryService implements IGalleryService {
value: 'vscode'
}]
}],
flags: 0x1 | 0x2 | 0x4 | 0x8 | 0x10
flags: 0x1 | 0x4 | 0x80
});
const request = {
......@@ -94,6 +95,7 @@ export class GalleryService implements IGalleryService {
galleryInformation: {
galleryApiUrl: this.extensionsGalleryUrl,
id: extension.extensionId,
downloadUrl: `${ extension.versions[0].assetUri }/Microsoft.VisualStudio.Services.VSIXPackage?install=true`,
publisherId: extension.publisher.publisherId,
publisherDisplayName: extension.publisher.displayName,
date: extension.versions[0].lastUpdated
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册