From a201c160e16546fa0a89d08a0b401e756d77f015 Mon Sep 17 00:00:00 2001 From: Aasim Malladi Date: Wed, 13 Apr 2022 11:44:31 -0700 Subject: [PATCH 1/3] Revert changes from PR #15877. (#16145) Co-authored-by: Aasim Malladi --- Tasks/DownloadPackageV1/multifilepackage.ts | 4 ++-- Tasks/DownloadPackageV1/packagebuilder.ts | 6 ++---- Tasks/DownloadPackageV1/task.json | 2 +- Tasks/DownloadPackageV1/task.loc.json | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Tasks/DownloadPackageV1/multifilepackage.ts b/Tasks/DownloadPackageV1/multifilepackage.ts index 4c37a4f4b2d0..89e544ecfb0b 100644 --- a/Tasks/DownloadPackageV1/multifilepackage.ts +++ b/Tasks/DownloadPackageV1/multifilepackage.ts @@ -49,7 +49,7 @@ export class MultiFilePackage extends Package { private async getPackageFileContent(fileMetadata: any): Promise> { return new Promise>(resolve => { var resultMap = new Map(); - resultMap[fileMetadata.name] = new PackageFileResult(fileMetadata.protocolMetadata.data.Content, false); + resultMap[fileMetadata.name] = new PackageFileResult(fileMetadata.protocolMetadata.data.content, false); return resolve(resultMap); }); } @@ -74,7 +74,7 @@ export class MultiFilePackage extends Package { if (filteredFileList.has(fileMetadatas[i].name)) { const fileMetadata = fileMetadatas[i]; pkgFileUrlPromises.push( - fileMetadata.protocolMetadata.data.StorageId != null + fileMetadata.protocolMetadata.data.storageId != null ? this.getPackageFileDownloadUrl(feedId, project, packageMetadata, fileMetadata) : this.getPackageFileContent(fileMetadata) ); diff --git a/Tasks/DownloadPackageV1/packagebuilder.ts b/Tasks/DownloadPackageV1/packagebuilder.ts index 086266bae031..c2b4935ead3c 100644 --- a/Tasks/DownloadPackageV1/packagebuilder.ts +++ b/Tasks/DownloadPackageV1/packagebuilder.ts @@ -125,12 +125,10 @@ export class PackageUrlsBuilder { } private getPythonRouteParams(feedId: string, project: string, packageMetadata: any, fileMetadata: any): any { - tl.debug(`file md ${JSON.stringify(fileMetadata)}`); - tl.debug(`pk md ${JSON.stringify(packageMetadata)}`); return { feedId: feedId, - packageName: packageMetadata.protocolMetadata.data.Name, - packageVersion: packageMetadata.protocolMetadata.data.Version, + packageName: packageMetadata.protocolMetadata.data.name, + packageVersion: packageMetadata.protocolMetadata.data.version, fileName: fileMetadata.name, project: project }; diff --git a/Tasks/DownloadPackageV1/task.json b/Tasks/DownloadPackageV1/task.json index 78b5680c9377..d507a1c69077 100644 --- a/Tasks/DownloadPackageV1/task.json +++ b/Tasks/DownloadPackageV1/task.json @@ -10,7 +10,7 @@ "version": { "Major": 1, "Minor": 202, - "Patch": 0 + "Patch": 2 }, "demands": [], "releaseNotes": "Adds support to download Maven, Python, Universal and Npm packages.", diff --git a/Tasks/DownloadPackageV1/task.loc.json b/Tasks/DownloadPackageV1/task.loc.json index 64972b50a9bb..3e843c421b88 100644 --- a/Tasks/DownloadPackageV1/task.loc.json +++ b/Tasks/DownloadPackageV1/task.loc.json @@ -10,7 +10,7 @@ "version": { "Major": 1, "Minor": 202, - "Patch": 0 + "Patch": 2 }, "demands": [], "releaseNotes": "ms-resource:loc.releaseNotes", From 2e3fb145e6b8ed7e3c57f0dcd830cbd03d070793 Mon Sep 17 00:00:00 2001 From: Aasim Malladi Date: Wed, 13 Apr 2022 14:22:27 -0700 Subject: [PATCH 2/3] Added ws --- Tasks/DownloadPackageV1/packagebuilder.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/Tasks/DownloadPackageV1/packagebuilder.ts b/Tasks/DownloadPackageV1/packagebuilder.ts index c2b4935ead3c..671e6b2c5abe 100644 --- a/Tasks/DownloadPackageV1/packagebuilder.ts +++ b/Tasks/DownloadPackageV1/packagebuilder.ts @@ -125,6 +125,7 @@ export class PackageUrlsBuilder { } private getPythonRouteParams(feedId: string, project: string, packageMetadata: any, fileMetadata: any): any { + return { feedId: feedId, packageName: packageMetadata.protocolMetadata.data.name, From 71813a8ee280ec8a1932f88bb894c689a19ec1f0 Mon Sep 17 00:00:00 2001 From: Aasim Malladi Date: Wed, 13 Apr 2022 14:23:02 -0700 Subject: [PATCH 3/3] Removed ws --- Tasks/DownloadPackageV1/packagebuilder.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/Tasks/DownloadPackageV1/packagebuilder.ts b/Tasks/DownloadPackageV1/packagebuilder.ts index 671e6b2c5abe..c2b4935ead3c 100644 --- a/Tasks/DownloadPackageV1/packagebuilder.ts +++ b/Tasks/DownloadPackageV1/packagebuilder.ts @@ -125,7 +125,6 @@ export class PackageUrlsBuilder { } private getPythonRouteParams(feedId: string, project: string, packageMetadata: any, fileMetadata: any): any { - return { feedId: feedId, packageName: packageMetadata.protocolMetadata.data.name,