From 618018dd2fa8db20243e48125cf1c16db87f2d27 Mon Sep 17 00:00:00 2001 From: Aasim Malladi Date: Wed, 13 Apr 2022 11:44:31 -0700 Subject: [PATCH] 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 | 4 ++-- 4 files changed, 7 insertions(+), 9 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 9e431b80015b..c3b4d495a254 100644 --- a/Tasks/DownloadPackageV1/task.json +++ b/Tasks/DownloadPackageV1/task.json @@ -10,7 +10,7 @@ "version": { "Major": 1, "Minor": 202, - "Patch": 1 + "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 c40a663e1f84..3e843c421b88 100644 --- a/Tasks/DownloadPackageV1/task.loc.json +++ b/Tasks/DownloadPackageV1/task.loc.json @@ -10,7 +10,7 @@ "version": { "Major": 1, "Minor": 202, - "Patch": 1 + "Patch": 2 }, "demands": [], "releaseNotes": "ms-resource:loc.releaseNotes", @@ -187,4 +187,4 @@ "Info_Downloading": "ms-resource:loc.messages.Info_Downloading", "Info_UsingArtifactToolDownload": "ms-resource:loc.messages.Info_UsingArtifactToolDownload" } -} +} \ No newline at end of file