mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
eng: cherry-pick 1.97.1 fixes (#240409)
This commit is contained in:
@@ -21,6 +21,7 @@ export interface IExtensionDefinition {
|
||||
sha256: string;
|
||||
repo: string;
|
||||
platforms?: string[];
|
||||
vsix?: string;
|
||||
metadata: {
|
||||
id: string;
|
||||
publisherId: {
|
||||
@@ -68,9 +69,17 @@ function isUpToDate(extension: IExtensionDefinition): boolean {
|
||||
}
|
||||
|
||||
function getExtensionDownloadStream(extension: IExtensionDefinition) {
|
||||
const galleryServiceUrl = productjson.extensionsGallery?.serviceUrl;
|
||||
return (galleryServiceUrl ? ext.fromMarketplace(galleryServiceUrl, extension) : ext.fromGithub(extension))
|
||||
.pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`));
|
||||
let input: Stream;
|
||||
|
||||
if (extension.vsix) {
|
||||
input = ext.fromVsix(path.join(root, extension.vsix), extension);
|
||||
} else if (productjson.extensionsGallery?.serviceUrl) {
|
||||
input = ext.fromMarketplace(productjson.extensionsGallery.serviceUrl, extension);
|
||||
} else {
|
||||
input = ext.fromGithub(extension);
|
||||
}
|
||||
|
||||
return input.pipe(rename(p => p.dirname = `${extension.name}/${p.dirname}`));
|
||||
}
|
||||
|
||||
export function getExtensionStream(extension: IExtensionDefinition) {
|
||||
|
||||
Reference in New Issue
Block a user